[PATCH] D15124: Use @llvm.invariant.start/end intrinsics to extend the meaning of basic AA's pointsToConstantMemory(), for GVN-based load elimination purposes [Local objects only]

Larisse Voufo via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 09:33:58 PST 2015


lvoufo marked 5 inline comments as done.

================
Comment at: test/Transforms/LoadElim/invariant.ll:1
@@ +1,2 @@
+; RUN: opt < %s -gvn -S | FileCheck %s
+
----------------
nlewycky wrote:
> Why are you creating a new test/Transforms subdirectory? The directories there are named for the passes, this should go into test/Transforms/GVN.
> 
> Also, this should be -basicaa -gvn to test your changes to -basicaa, right? Or do you want a separate testcase in test/Analysis/BasicAA for that?

(1) This test case is eventually merged with other passes besides -gvn, like -instcombine. See for example D15136. You can also take a look at earlier patches linked from the design doc where we explore even more complex pass combinations. Keeping things in their respective pass directories, like GVN/ or InstCombine/, essentially duplicates the same test case several times. 
As we progress through the next incremental patches, there will be more test cases that will require the same kind of duplicate tests.
To avoid all this duplication. It looks fitting to just keep all the test cases in one new folder, LoadElim. 
I should probably rename it to InvariantInfo since these test cases are really more about the effects of manipulating InvariantInfo's more than they are about -gvn, -instcombine, or -globalopt.

(2) -gvn already requires -basicaa. So, -basicaa would be redundant in '-basicaa -gvn'. I could add it for clarity if you prefer.




http://reviews.llvm.org/D15124





More information about the llvm-commits mailing list