[PATCH] D50501: [LICM] Hoist guards with invariant conditions
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 9 14:26:18 PDT 2018
reames requested changes to this revision.
reames added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:461
+ // Keep track of whether the prefix instructions could have written memory.
+ bool IsMemoryNotModified = true;
----------------
Bug: Can only start true if a) readonly loop or b) header block.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:523
+ CurLoop->hasLoopInvariantOperands(&I)) {
+ bool Hoisted = hoist(I, DT, CurLoop, SafetyInfo, ORE);
+ Changed |= Hoisted;
----------------
hoist always returns true. Separately, change it to return void and update other caller.
https://reviews.llvm.org/D50501
More information about the llvm-commits
mailing list