[PATCH] D110939: [PHIElimination] Update LiveVariables after handling an unspillable terminator
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 12:32:29 PDT 2021
MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.
LGTM.
Please try if the suggested changes work. If not then I'm fine with the change as-is.
================
Comment at: llvm/lib/CodeGen/PHIElimination.cpp:465-471
+ // 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();
+ }
----------------
As far as I can tell, the other code here that creates COPYs etc. does not bother creating a information for `IncomingReg`. So maybe we should do the same here and just concern ourself with dropping the old info?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110939/new/
https://reviews.llvm.org/D110939
More information about the llvm-commits
mailing list