[PATCH] D25364: [LCSSA] Use linear algorithm for isRecursivelyLCSSAForm

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 09:52:03 PDT 2016


mzolotukhin added a comment.

Hi Igor,

Thanks for working on this! I have two concerns/thoughts:

1. Is it actually equivalent to the original implementation? It looks so, but we need to check the corner cases and be 100% sure that it's the case. Usually the bugs we detect with such verifiers are in corner cases.
2. If it's equivalent to the original, why do we need to be recursive at all? We can go through all blocks of the given loop but for each block find the innermost loop containing it and check if the value isn't used outside of it. What do you think?

As for the slowdown, we can put it under some flag, but I'm a bit reluctant to it - we've found quite a few bugs when we started to verify LCSSA, and it's good to have it turned on by default. And unfortunately checking only the current loop is not sufficient, because transformations can change outer loops.

Thanks,
Michael


https://reviews.llvm.org/D25364





More information about the llvm-commits mailing list