summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-08-06 18:41:19 +0000
committerAdrian Prantl <aprantl@apple.com>2014-08-06 18:41:19 +0000
commite2d637597c58d566fcc4999e97b60f9010ec2319 (patch)
treec8787f6ef7c83f237f9e2999e1b44010d40c4fed /llvm/lib/CodeGen
parent6e9477af8c935844ad65a3cf59f2c23faa861dca (diff)
downloadbcm5719-llvm-e2d637597c58d566fcc4999e97b60f9010ec2319.tar.gz
bcm5719-llvm-e2d637597c58d566fcc4999e97b60f9010ec2319.zip
Cleanup collectChangingRegs
The handling of the epilogue is best expressed as an early exit and there is no reason to look for register defs in DbgValue MIs. Patch by Frederic Riss! llvm-svn: 214986
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp b/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
index f557ccddb47..143b0135c8c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
@@ -152,10 +152,11 @@ static void collectChangingRegs(const MachineFunction *MF,
std::set<unsigned> &Regs) {
for (const auto &MBB : *MF) {
auto FirstEpilogueInst = getFirstEpilogueInst(MBB);
- bool IsInEpilogue = false;
+
for (const auto &MI : MBB) {
- IsInEpilogue |= &MI == FirstEpilogueInst;
- if (!MI.getFlag(MachineInstr::FrameSetup) && !IsInEpilogue)
+ if (&MI == FirstEpilogueInst)
+ break;
+ if (!MI.getFlag(MachineInstr::FrameSetup))
collectClobberedRegisters(MI, TRI, Regs);
}
}
OpenPOWER on IntegriCloud