summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp4
-rw-r--r--llvm/lib/CodeGen/BranchFolding.h2
-rw-r--r--llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp9
-rw-r--r--llvm/lib/CodeGen/MachineBlockPlacement.cpp2
4 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index d148a9dbac5..4a9e15ebd76 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -497,7 +497,9 @@ BranchFolder::MBFIWrapper::printBlockFreq(raw_ostream &OS,
return MBFI.printBlockFreq(OS, Freq);
}
-void BranchFolder::MBFIWrapper::view(bool isSimple) { MBFI.view(isSimple); }
+void BranchFolder::MBFIWrapper::view(const Twine &Name, bool isSimple) {
+ MBFI.view(Name, isSimple);
+}
uint64_t
BranchFolder::MBFIWrapper::getEntryFreq() const {
diff --git a/llvm/lib/CodeGen/BranchFolding.h b/llvm/lib/CodeGen/BranchFolding.h
index c547e3a8ebd..0773a2c86de 100644
--- a/llvm/lib/CodeGen/BranchFolding.h
+++ b/llvm/lib/CodeGen/BranchFolding.h
@@ -122,7 +122,7 @@ namespace llvm {
const MachineBasicBlock *MBB) const;
raw_ostream &printBlockFreq(raw_ostream &OS,
const BlockFrequency Freq) const;
- void view(bool isSimple = true);
+ void view(const Twine &Name, bool isSimple = true);
uint64_t getEntryFreq() const;
private:
diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
index 557b5f8824d..9c7367b4c78 100644
--- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
+++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
@@ -181,7 +181,7 @@ void MachineBlockFrequencyInfo::calculate(
if (ViewMachineBlockFreqPropagationDAG != GVDT_None &&
(ViewBlockFreqFuncName.empty() ||
F.getName().equals(ViewBlockFreqFuncName))) {
- view();
+ view("MachineBlockFrequencyDAGS." + F.getName());
}
}
@@ -197,10 +197,9 @@ void MachineBlockFrequencyInfo::releaseMemory() { MBFI.reset(); }
/// Pop up a ghostview window with the current block frequency propagation
/// rendered using dot.
-void MachineBlockFrequencyInfo::view(bool isSimple) const {
-// This code is only for debugging.
- ViewGraph(const_cast<MachineBlockFrequencyInfo *>(this),
- "MachineBlockFrequencyDAGs", isSimple);
+void MachineBlockFrequencyInfo::view(const Twine &Name, bool isSimple) const {
+ // This code is only for debugging.
+ ViewGraph(const_cast<MachineBlockFrequencyInfo *>(this), Name, isSimple);
}
BlockFrequency
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
index 8a57f009975..bfc90e0d8cd 100644
--- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -2381,7 +2381,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) {
if (ViewBlockLayoutWithBFI != GVDT_None &&
(ViewBlockFreqFuncName.empty() ||
F->getFunction()->getName().equals(ViewBlockFreqFuncName))) {
- MBFI->view(false);
+ MBFI->view("MBP." + MF.getName(), false);
}
OpenPOWER on IntegriCloud