[PATCH] D98422: [Alias] Add a ah-hoc pattern with two PHI for isKnownNonEqual

JinGu Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 05:09:17 PDT 2021


jaykang10 added a comment.

In D98422#2624369 <https://reviews.llvm.org/D98422#2624369>, @jaykang10 wrote:

> In D98422#2623306 <https://reviews.llvm.org/D98422#2623306>, @reames wrote:
>
>> If I'm reading the code right, this looks potentially expensive for compile time.  You're recursing on each phi operand individually.  Can we narrow the scope any without loosing your motivating example?
>>
>> I agree that this seems to make more sense in isKnownNonEqual than basic aa.  In that context, it would naturally follow to handle two phis with N-1 trivially different values (e.g. constants), and recurse through at most one input pair.  Would that handle your example?
>
> @reames In order to check the recursive operand of PHI node, I thought it is enough to check backedge from PHI node's incoming block to the block with PHI node using dominance relation. I could be mis-understanding what you suggest . If I missed something, please let me know.

@reames I guess you meant to skip `isKnownNonEqual` for each operand of PHI. um... I think we need to check all operands of two PHIs are not same... I agree It could increase compile time... um...


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

https://reviews.llvm.org/D98422



More information about the llvm-commits mailing list