[PATCH] D109855: [LoopPredication] Report changes correctly when attempting loop exit predication

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 10:28:07 PDT 2021


reames added a comment.

In D109855#3004245 <https://reviews.llvm.org/D109855#3004245>, @DaniilSuchkov wrote:

> In D109855#3004169 <https://reviews.llvm.org/D109855#3004169>, @reames wrote:
>
>> From what I can tell, the changes being missed were strictly mutations/moves of instructions, not manipulations of the CFG.  As a result, the CFG analysis you're testing being invalidated could actually be preserved with a bit of extra work.
>
> I agree with that, that's why left a note about it in the test in case someone breaks the test by making the pass preserve this analysis:
>
>   ; NOTE: PreservedCFGCheckerAnalysis is an arbitrary analysis that just happens
>   ;       to be calculated before this pass and isn't preserved by it.
>
> To fix the test that person will need to find some other analysis that isn't preserved. Maybe it makes sense to add that to the note.
>
> But, I think, the same can be said about basically any analysis: with some extra effort you can preserve all of them. The best solution would be to introduce some debug print that says either "this pass didn't preserve all analyses" or "this pass preserved everything", but I think at the moment just having a note in the test is somewhat adequate.

Makes sense, thanks for the explanation.  Sorry for missing the comment in the test.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109855/new/

https://reviews.llvm.org/D109855



More information about the llvm-commits mailing list