Commit Graph

6 Commits

Author SHA1 Message Date
Benjamin Kramer
ab9704d95e Make helpers static. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329170 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-04 11:45:11 +00:00
Philip Reames
1c3e6b6d3c Fix an accidental circular dependence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328816 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-29 19:22:12 +00:00
Philip Reames
16193ef0b3 [MustExecute] Shwo the effect of using full loop info variant
Most basic possible test for the logic used by LICM.

Also contains a speculative build fix for compiles which complain about a definition of a stuct K; followed by a declaration as class K;



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328058 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-20 23:00:54 +00:00
Philip Reames
16a143ef90 [MustExecute] Move isGuaranteedToExecute and related rourtines to Analysis
Next step is to actually merge the implementations and get both implementations tested through the new printer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328055 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-20 22:45:23 +00:00
Philip Reames
284e7ac42d [MustExecute] Use the annotation style printer
As suggested in the original review (https://reviews.llvm.org/D44524), use an annotation style printer instead.

Note: The switch from -analyze to -disable-output in tests was driven by the fact that seems to be the idiomatic style used in annoation passes.  I tried to keep both working, but the old style pass API for printers really doesn't make this easy.  It invokes (runOnFunction, print(Module)) repeatedly.  I decided the extra state wasn't worth it given the old pass manager is going away soonish anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328015 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-20 18:43:44 +00:00
Philip Reames
4961d4cd76 Add an analysis printer for must execute reasoning
Many of our loop passes make use of so called "must execute" or "guaranteed to execute" facts to prove the legality of code motion. The basic notion is that we know (by assumption) an instruction didn't fault at it's original location, so if the location we move it to is strictly post dominated by the original, then we can't have introduced a new fault.

At the moment, the testing for this logic is somewhat adhoc and done mostly through LICM. Since I'm working on that code, I want to improve the testing. This patch is the first step in that direction. It doesn't actually test the variant used by the loop passes - I need to move that to the Analysis library first - but instead exercises an alternate implementation used by SCEV. (I plan on merging both implementations.)

Note: I'll be replacing the printing logic within this with an annotation based version in the near future.  Anna suggested this in review, and it seems like a strictly better format.  

Differential Revision: https://reviews.llvm.org/D44524



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328004 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-20 17:09:21 +00:00