From b98807df05cb4cd728e744c3349a9dfd341f6f61 Mon Sep 17 00:00:00 2001 From: Hongtao Yu Date: Mon, 12 Apr 2021 23:51:44 -0700 Subject: [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 --- llvm/lib/CodeGen/SplitKit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SplitKit.cpp') diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index d778a9e8c3ef..597f516a1979 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -819,7 +819,7 @@ void SplitEditor::removeBackCopies(SmallVectorImpl &Copies) { MachineBasicBlock::iterator MBBI(MI); bool AtBegin; do AtBegin = MBBI == MBB->begin(); - while (!AtBegin && (--MBBI)->isDebugInstr()); + while (!AtBegin && (--MBBI)->isDebugOrPseudoInstr()); LLVM_DEBUG(dbgs() << "Removing " << Def << '\t' << *MI); LIS.removeVRegDefAt(*LI, Def); -- cgit v1.2.3