[PATCH] D115437: [GVN] Try to use an equivalent PHI after constructing one for load set
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 10 09:18:24 PST 2021
reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:897
// Perform PHI construction.
- return SSAUpdate.GetValueInMiddleOfBlock(Load->getParent());
+ auto *V = SSAUpdate.GetValueInMiddleOfBlock(Load->getParent());
+
----------------
Doing this specifically for PRE/FRE is definitely the wrong place. Particularly, doing so by hacking up the implementation this way.
I think you should look at extending EliminateDuplicatePHINodes, or adding something new which matches recurrences at about the same call point. That is, let the phi-cycle be created, but then erase it again on the next iteration.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115437/new/
https://reviews.llvm.org/D115437
More information about the llvm-commits
mailing list