[PATCH] D28459: Make processing @llvm.assume more efficient - Add affected values to the assumption cache

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 8 13:55:34 PST 2017


hfinkel added a comment.

In https://reviews.llvm.org/D28459#639387, @chandlerc wrote:

> Can you provide an explanation at a high level for why you're going with this approach rather than having the AC for ephemeral value finding and operand bundles for affected values? Essentially, why not just use both previous approaches rather than adding the affected values to the AC? (I'm not questioning what you've done here, just trying to understand the thought process behind it.)


There are potential downsides to the operand-bundle approach. First, values in operand bundles are, by default, assumed to be captured, alias, etc. which could cause undesirable side effects for pointer-typed values. This could have been fixed, but there is another issue which is that adding all of the extra uses on intermediate values could inhibit simplification of more--complex conditions because of hasOneUse interference. Perhaps a minor problem, but a less tractable one. Also, depending on how you look at it, having the affected values "cached" in the IR, and having a dependence on InstCombine for them to work even for other passes, was suboptimal. As a result, I think that if we can't get rid of the assumption cache, we should use it.


https://reviews.llvm.org/D28459





More information about the llvm-commits mailing list