[PATCH] D16612: [LoopVersioning] Expose loop versioning as a pass too

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 03:54:20 PST 2016

sbaranga requested changes to this revision.
sbaranga added a comment.
This revision now requires changes to proceed.

I have to retract my previous LGTM, I just spotted something that needs updating.

Comment at: lib/Transforms/Utils/LoopVersioning.cpp:180
@@ +179,3 @@
+      const LoopAccessInfo &LAI = LAA->getInfo(L, ValueToValueMap());
+      if (LAI.getNumRuntimePointerChecks()) {
+        LoopVersioning LVer(LAI, L, LI, DT, SE);
This needs to be (LAI.getNumRuntimePointerChecks() || !LAI.PSE.getUnionPredicate().isAlwaysTrue()).

Maybe it would also make sense to have a separate method in LAI for this logic (something like needsRuntimeChecks()?)


More information about the llvm-commits mailing list