[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
Tue Dec 8 15:03:10 PST 2015


lvoufo added a comment.

In http://reviews.llvm.org/D15124#305326, @dnovillo wrote:

> In http://reviews.llvm.org/D15124#302904, @lvoufo wrote:
>
> >
>
>
>
>
> > For the time being, it seems more effective to take the current approach. But perhaps I am missing something about LLVM's print analyses... I am also going from this notion that test cases are about confidence more than completeness. So, it is perfectly okay to center them around specific use cases showing the end results of the print messages (i.e. load removal) rather than the print messages themselves(?).
>
>
> What I'm proposing is to make this analysis pass runnable via opt.  Kind of like the other analyses in lib/Analysis.  So, we could run, for instance, 'opt -invariant-info-marker file.ll' and it would print the invariant ranges in file.ll.  From this we can then create tests specifically for the pass, without having to go through another pass.


Making this analysis pass more substantial and printable is very doable. I don't see a problem with printing out appropriate invariant info for each instruction. The only difficulty I find with this is showing load removal using this pass alone, without -gvn which in turns also performs additional analysis to remove loads. Anyhow, let's see how you like the next patch update...


http://reviews.llvm.org/D15124





More information about the llvm-commits mailing list