[PATCH] Experiment with keeping GEPs near calls
Daniel Jasper
djasper at google.com
Sun Mar 15 06:59:49 PDT 2015
Addressed comments and submitted as r232262.
================
Comment at: lib/CodeGen/MachineLICM.cpp:797
@@ +796,3 @@
+ // We need to ensure that we can safely move this instruction into the loop.
+ // As such, it must have side-effects, e.g. such as a call has.
+ if (IsLoopInvariantInst(*I))
----------------
qcolombet wrote:
> -> it must *not* have...
Fixed.
================
Comment at: lib/CodeGen/MachineLICM.cpp:798
@@ +797,3 @@
+ // As such, it must have side-effects, e.g. such as a call has.
+ if (IsLoopInvariantInst(*I))
+ Candidates.push_back(I);
----------------
qcolombet wrote:
> The test for HasLoopPHIUse is not strictly necessary, but it acts as an optimization for the next check I believe.
> Indeed, if the candidate is used within a phi for the loop, it won’t be sunken.
Re-instated.
http://reviews.llvm.org/D7259
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list