[PATCH] D22599: GVN-hoist: improve code generation for recursive GEPs
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 11:12:09 PDT 2016
dberlin accepted this revision.
dberlin added a comment.
This revision is now accepted and ready to land.
LGTM for now
================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:622
@@ +621,3 @@
+ if (!allGepOperandsAvailable(GepOp, HoistPt))
+ return false;
+ // Gep is available if all operands of GepOp are available.
----------------
Just a note:
You can cache the result here, since you may try to hoist something deeper and end up trying to make the same gep available again and again :)
(Not sure it happens enough to do it yet, you probably have better data than me)
https://reviews.llvm.org/D22599
More information about the llvm-commits
mailing list