[PATCH] D13606: [Introduction] Redundant load reduction with invariant intrinsics

Larisse Voufo via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 10 08:55:10 PDT 2015


lvoufo marked 2 inline comments as done.

================
Comment at: lib/IR/Instructions.cpp:4030-4035
@@ +4029,8 @@
+
+/// If the given Query is a load from writeonce readonly memory, we can speed
+/// backward scaning by jumping to the associated invariant_start instruction,
+/// *if* the instruction is in the BB block.
+/// Then, since we would be scanning backward, undo the invariant_start
+/// intrinsic marking so that getModRefInfo() knows that the load does not
+/// point to constant memory from this point on.
+void llvm::setPreservedInvariantInfo(PreservedInvariantInfo &Preserved,
----------------
TODO: Revise this description and simplify the function signature.

================
Comment at: lib/Transforms/IPO/Inliner.cpp:481-483
@@ -480,5 +480,5 @@
         // If this isn't a call, or it is a call to an intrinsic, it can
-        // never be inlined.
-        if (!CS || isa<IntrinsicInst>(I))
-          continue;
-        
+        // never be inlined. invariant_start/end intrinsics are excepted
+        // because they should be processed when inlining other calls.
+        if (!CS || isa<IntrinsicInst>(I)) continue;
+
----------------
TODO: Remove this change.


http://reviews.llvm.org/D13606





More information about the llvm-commits mailing list