[PATCH] D15124: Use @llvm.invariant.start/end intrinsics to extend basic AA with invariant range analysis for GVN-based load elimination purposes [Local objects only]

Larisse Voufo via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 07:53:27 PDT 2016


lvoufo added a comment.

Update: 
Over the past few weeks, I have been researching how to best benchmark this work, and am finalizing an infrastructure that will help with this and other similar extensions (where existing benchmarks do not cover enough of some given extensions' use case).
I am hoping to use that infrastructure next week or so to crunch some useful data for this discussion.

Benchmarking put aside, could someone please remind what the fundamental concern to pushing this in right now is?
The only thing that comes to mind is that this makes use of undefined behavior that is currently not handled by UBSan; which is thus likely to cause regressions on some systems. To get around this, until UBSan checks for const objects, we could disable the  pass by default.

After this patch goes in, note that there is still a lot of work that must be done, incrementally, to:
1 - teach other LLVM passes about the invariant intrinsics,
2 - broaden the application of the intrinsics to more complex const objects like const member objects, and
3 - generate the intrinsics from the frontend.

So, the sooner this goes in, the quicker the progress in actually using "const" (and similar features) for optimization purposes. 
The later the goes in, the more outdated my gazilion previous patches (which are waiting in the background), will be. :)

Please advice.

Thanks,

- Larisse.


http://reviews.llvm.org/D15124





More information about the llvm-commits mailing list