[PATCH] D110939: [PHIElimination] Update LiveVariables after handling an unspillable terminator
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 5 06:26:03 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf65458df32f7: [PHIElimination] Update LiveVariables after handling an unspillable terminator (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110939/new/
https://reviews.llvm.org/D110939
Files:
llvm/lib/CodeGen/PHIElimination.cpp
Index: llvm/lib/CodeGen/PHIElimination.cpp
===================================================================
--- llvm/lib/CodeGen/PHIElimination.cpp
+++ llvm/lib/CodeGen/PHIElimination.cpp
@@ -461,6 +461,15 @@
assert(MRI->use_empty(SrcReg) &&
"Expected a single use from UnspillableTerminator");
SrcRegDef->getOperand(0).setReg(IncomingReg);
+
+ // Update LiveVariables.
+ if (LV) {
+ LiveVariables::VarInfo &SrcVI = LV->getVarInfo(SrcReg);
+ LiveVariables::VarInfo &IncomingVI = LV->getVarInfo(IncomingReg);
+ IncomingVI.AliveBlocks = std::move(SrcVI.AliveBlocks);
+ SrcVI.AliveBlocks.clear();
+ }
+
continue;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110939.377184.patch
Type: text/x-patch
Size: 700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211005/3354b4cd/attachment.bin>
More information about the llvm-commits
mailing list