[PATCH] D37195: [InstCombine] Teach canEvaluateTruncated and EvaluateInDifferentType to handle expression tree with multi-used nodes.

Amjad Aboud via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 06:17:29 PDT 2017


aaboud added a comment.

In https://reviews.llvm.org/D37195#855376, @spatel wrote:

> I didn't look closely at the implementation, but extending instcombine with visitation/evaluation maps may cross the boundary of what instcombine should handle. Adding some more potential reviewers.


We could implement this by passing a clean set of visitedInsts/ToVisitInsts per call to these functions, instead of having a member instance in InstCombine.
I do not see why it is much different that passing the demandedBits map and update it recursively!

The only thing that we need to be aware of regarding these two functions I modified, is that they have no "depth" guard, like many others!


https://reviews.llvm.org/D37195





More information about the llvm-commits mailing list