[PATCH] D75977: [JumpThreading] Fix PR44611
JunMa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 18:35:48 PDT 2020
junparser added a comment.
In D75977#1925178 <https://reviews.llvm.org/D75977#1925178>, @kazu wrote:
> Sorry, the infinite recursion seems to come from EvaluateOnPredecessorEdge, a function that I recently added to support jump threading across two basic blocks. EvaluateOnPredecessorEdge does not have a guard against infinite recursion while its close cousin ComputeValueKnownInPredecessors does.
>
> The best thing to do is to get rid of the code duplication I introduced, namely EvaluateOnPredecessorEdge, but for now we can detect infinite recursion by maintaining RecursionSet much like ComputeValueKnownInPredecessors. Alternatively, we could pass a recursion depth and stop recursion when we reach a certain limit. We have a limit on the number of LLVM IR statements we duplicate, so we could use that as a starting point.
>
> Anyway, let me try to come up with something.
Thanks for the clarification, I'll let you handle this:)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75977/new/
https://reviews.llvm.org/D75977
More information about the llvm-commits
mailing list