<div dir="ltr">"<span style="font-size:12.8px">(2) -</span><span class="" style="font-size:12.8px;background-color:rgb(255,255,255)">gvn</span><span style="font-size:12.8px"> already requires -basicaa. So, -basicaa would be redundant in '-basicaa -</span><span class="" style="font-size:12.8px;background-color:rgb(255,255,255)">gvn</span><span style="font-size:12.8px">'. I could add it for clarity if you prefer.</span><div class="" style="font-size:12.8px"></div>"<br>-gvn does not require -basicaa.<div>You've stated this a few times, and i'm not sure why you think this.</div><div><br></div><div><from GVN>:</div><div><div> void getAnalysisUsage(AnalysisUsage &AU) const override {</div><div>       AU.addRequired<AssumptionCacheTracker>();</div><div>       AU.addRequired<DominatorTreeWrapperPass>();</div><div>       AU.addRequired<TargetLibraryInfoWrapperPass>();</div><div>       if (!NoLoads)</div><div>         AU.addRequired<MemoryDependenceAnalysis>();</div><div>       AU.addRequired<AAResultsWrapperPass>();</div></div><div><br></div><div>}</div><div><br></div><div>GVN requires AC, DominatorTree, and TLI all the time.</div><div>It uses AA results, which is "whatever aa you have enabled".</div><div>It requires memorydependence if you want to optimize loads.</div><div>Memory dependence, in turn, does not require basicaa either:<br><br></div><div><div>void MemoryDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {</div><div>   AU.setPreservesAll();</div><div>   AU.addRequired<AssumptionCacheTracker>();</div><div>   AU.addRequiredTransitive<AAResultsWrapperPass>();</div><div>   AU.addRequiredTransitive<TargetLibraryInfoWrapperPass>();</div><div> }</div></div><div><br></div><div><br></div><div>No passes *require* basicaa, because basicaa is an optional pass providing AA results.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 9, 2015 at 9:33 AM, Larisse Voufo via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">lvoufo marked 5 inline comments as done.<br>
<br>
================<br>
<span class="">Comment at: test/Transforms/LoadElim/invariant.ll:1<br>
@@ +1,2 @@<br>
+; RUN: opt < %s -gvn -S | FileCheck %s<br>
+<br>
----------------<br>
</span><span class="">nlewycky wrote:<br>
> Why are you creating a new test/Transforms subdirectory? The directories there are named for the passes, this should go into test/Transforms/GVN.<br>
><br>
> 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?<br>
<br>
</span>(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.<br>
As we progress through the next incremental patches, there will be more test cases that will require the same kind of duplicate tests.<br>
To avoid all this duplication. It looks fitting to just keep all the test cases in one new folder, LoadElim.<br>
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.<br>
<br>
(2) -gvn already requires -basicaa. So, -basicaa would be redundant in '-basicaa -gvn'. I could add it for clarity if you prefer.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<a href="http://reviews.llvm.org/D15124" rel="noreferrer" target="_blank">http://reviews.llvm.org/D15124</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>