HomePhabricator

Add an analysis printer for must execute reasoning

Description

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

Details

Committed
reamesMar 20 2018, 10:09 AM
Differential Revision
D44524: Add an analysis printer for must execute reasoning
Parents
rL328003: MC: fix layering violation introduced in r325139.
Branches
Unknown
Tags
Unknown