summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues.cpp12
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp6
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
-rw-r--r--llvm/unittests/CodeGen/MachineInstrTest.cpp3
4 files changed, 16 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues.cpp
index 2ac3fe20fff..7f95e12186f 100644
--- a/llvm/lib/CodeGen/LiveDebugValues.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues.cpp
@@ -457,7 +457,9 @@ void LiveDebugValues::insertTransferDebugPair(
VarLoc VL(*NewDebugInstr, LS);
ProcessVarLoc(VL, NewDebugInstr);
LLVM_DEBUG(dbgs() << "Creating DBG_VALUE inst for register copy: ";
- NewDebugInstr->print(dbgs(), false, false, false, TII));
+ NewDebugInstr->print(dbgs(), /*IsStandalone*/false,
+ /*SkipOpers*/false, /*SkipDebugLoc*/false,
+ /*AddNewLine*/true, TII));
return;
}
case TransferKind::TransferSpill: {
@@ -474,7 +476,9 @@ void LiveDebugValues::insertTransferDebugPair(
SpillLocation.SpillOffset, LS);
ProcessVarLoc(VL, NewDebugInstr);
LLVM_DEBUG(dbgs() << "Creating DBG_VALUE inst for spill: ";
- NewDebugInstr->print(dbgs(), false, false, false, TII));
+ NewDebugInstr->print(dbgs(), /*IsStandalone*/false,
+ /*SkipOpers*/false, /*SkipDebugLoc*/false,
+ /*AddNewLine*/true, TII));
return;
}
case TransferKind::TransferRestore: {
@@ -488,7 +492,9 @@ void LiveDebugValues::insertTransferDebugPair(
VarLoc VL(*NewDebugInstr, LS);
ProcessVarLoc(VL, NewDebugInstr);
LLVM_DEBUG(dbgs() << "Creating DBG_VALUE inst for register restore: ";
- NewDebugInstr->print(dbgs(), false, false, false, TII));
+ NewDebugInstr->print(dbgs(), /*IsStandalone*/false,
+ /*SkipOpers*/false, /*SkipDebugLoc*/false,
+ /*AddNewLine*/true, TII));
return;
}
}
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index 218484715db..0584ec0bd2b 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -561,10 +561,12 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) {
dbgs() << "\tFor the Pattern (" << (int)P
<< ") these instructions could be removed\n";
for (auto const *InstrPtr : DelInstrs)
- InstrPtr->print(dbgs(), false, false, false, TII);
+ InstrPtr->print(dbgs(), /*IsStandalone*/false, /*SkipOpers*/false,
+ /*SkipDebugLoc*/false, /*AddNewLine*/true, TII);
dbgs() << "\tThese instructions could replace the removed ones\n";
for (auto const *InstrPtr : InsInstrs)
- InstrPtr->print(dbgs(), false, false, false, TII);
+ InstrPtr->print(dbgs(), /*IsStandalone*/false, /*SkipOpers*/false,
+ /*SkipDebugLoc*/false, /*AddNewLine*/true, TII);
});
bool SubstituteAlways = false;
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index be39a726140..894d0abea3e 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1472,7 +1472,7 @@ void MachineInstr::print(raw_ostream &OS, bool IsStandalone, bool SkipOpers,
ModuleSlotTracker MST(M);
if (F)
MST.incorporateFunction(*F);
- print(OS, MST, IsStandalone, SkipOpers, SkipDebugLoc, TII);
+ print(OS, MST, IsStandalone, SkipOpers, SkipDebugLoc, AddNewLine, TII);
}
void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
diff --git a/llvm/unittests/CodeGen/MachineInstrTest.cpp b/llvm/unittests/CodeGen/MachineInstrTest.cpp
index bfdd940bf37..21b5eb6f4e1 100644
--- a/llvm/unittests/CodeGen/MachineInstrTest.cpp
+++ b/llvm/unittests/CodeGen/MachineInstrTest.cpp
@@ -265,7 +265,8 @@ TEST(MachineInstrPrintingTest, DebugLocPrinting) {
std::string str;
raw_string_ostream OS(str);
- MI->print(OS);
+ MI->print(OS, /*IsStandalone*/true, /*SkipOpers*/false, /*SkipDebugLoc*/false,
+ /*AddNewLine*/false);
ASSERT_TRUE(
StringRef(OS.str()).startswith("$noreg = UNKNOWN debug-location "));
ASSERT_TRUE(
OpenPOWER on IntegriCloud