diff options
author | Robert Lougher <rob.lougher@gmail.com> | 2019-07-05 12:20:21 +0000 |
---|---|---|
committer | Robert Lougher <rob.lougher@gmail.com> | 2019-07-05 12:20:21 +0000 |
commit | 3bea2b15f5366eb706282085b494b2b99c5ec28f (patch) | |
tree | b7d7e7fa8b67062d183471ee447883fd6ce98c57 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 5e17ee1e35e4535b51c749186ffbec694b06494b (diff) | |
download | bcm5719-llvm-3bea2b15f5366eb706282085b494b2b99c5ec28f.tar.gz bcm5719-llvm-3bea2b15f5366eb706282085b494b2b99c5ec28f.zip |
This reverts r365061 and r365062 (test update)
Revision r365061 changed a skip of debug instructions for a skip
of meta instructions. This is not safe, as IMPLICIT_DEF is classed
as a meta instruction.
llvm-svn: 365198
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index c3e9c185be9..6f69a0f0bd3 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1384,7 +1384,7 @@ MachineBasicBlock::computeRegisterLiveness(const TargetRegisterInfo *TRI, // Try searching forwards from Before, looking for reads or defs. const_iterator I(Before); for (; I != end() && N > 0; ++I) { - if (I->isDebugInstr()) + if (I->isMetaInstruction()) continue; --N; @@ -1423,7 +1423,7 @@ MachineBasicBlock::computeRegisterLiveness(const TargetRegisterInfo *TRI, do { --I; - if (I->isDebugInstr()) + if (I->isMetaInstruction()) continue; --N; @@ -1456,6 +1456,11 @@ MachineBasicBlock::computeRegisterLiveness(const TargetRegisterInfo *TRI, } while (I != begin() && N > 0); } + // Check for the edge condition where the only instructions between I and + // begin() are meta instructions. + if (I != begin() && std::prev(I)->isMetaInstruction()) + I = skipMetaInstructionsBackward(std::prev(I), begin()); + // Did we get to the start of the block? if (I == begin()) { // If so, the register's state is definitely defined by the live-in state. |