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/MachineScheduler.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/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 35facee..dd6e3a2 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -297,7 +297,7 @@ priorNonDebug(MachineBasicBlock::const_iterator I, MachineBasicBlock::const_iterator Beg) { assert(I != Beg && "reached the top of the region, cannot decrement"); while (--I != Beg) { - if (!I->isDebugInstr()) + if (!I->isDebugOrPseudoInstr()) break; } return I; @@ -317,7 +317,7 @@ static MachineBasicBlock::const_iterator nextIfDebug(MachineBasicBlock::const_iterator I, MachineBasicBlock::const_iterator End) { for(; I != End; ++I) { - if (!I->isDebugInstr()) + if (!I->isDebugOrPseudoInstr()) break; } return I; @@ -508,7 +508,7 @@ getSchedRegions(MachineBasicBlock *MBB, MachineInstr &MI = *std::prev(I); if (isSchedBoundary(&MI, &*MBB, MF, TII)) break; - if (!MI.isDebugInstr()) { + if (!MI.isDebugOrPseudoInstr()) { // MBB::size() uses instr_iterator to count. Here we need a bundle to // count as a single instruction. ++NumRegionInstrs; |