diff options
author | Hongtao Yu <hoy@fb.com> | 2021-04-12 23:51:44 -0700 |
---|---|---|
committer | Hongtao Yu <hoy@fb.com> | 2021-04-19 17:55:35 -0700 |
commit | b98807df05cb4cd728e744c3349a9dfd341f6f61 (patch) | |
tree | 7288dd26f041df9f156887793a1bcb301c4c4d3f /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 1812319292e0041e7e32ad7b61d7252a450b95c2 (diff) | |
download | llvm-b98807df05cb4cd728e744c3349a9dfd341f6f61.zip llvm-b98807df05cb4cd728e744c3349a9dfd341f6f61.tar.gz llvm-b98807df05cb4cd728e744c3349a9dfd341f6f61.tar.bz2 |
[CSSPGO] Exclude pseudo probes from slot index
Pseudo probe are currently given a slot index like other regular instructions. This affects register pressure and lifetime weight computation because of enlarged lifetime length with pseudo probe instructions. As a consequence, program could get different code generated w/ and w/o pseudo probes. I'm closing the gap by excluding pseudo probes from stack index and downstream register allocation related passes.
Reviewed By: wmi
Differential Revision: https://reviews.llvm.org/D100334
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index cf22230..d792ad4 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1515,7 +1515,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->isDebugOrPseudoInstr()) continue; --N; @@ -1553,7 +1553,7 @@ MachineBasicBlock::computeRegisterLiveness(const TargetRegisterInfo *TRI, do { --I; - if (I->isDebugInstr()) + if (I->isDebugOrPseudoInstr()) continue; --N; @@ -1587,7 +1587,7 @@ MachineBasicBlock::computeRegisterLiveness(const TargetRegisterInfo *TRI, // If all the instructions before this in the block are debug instructions, // skip over them. - while (I != begin() && std::prev(I)->isDebugInstr()) + while (I != begin() && std::prev(I)->isDebugOrPseudoInstr()) --I; // Did we get to the start of the block? |