[PATCH] D75977: [JumpThreading] Fix PR44611
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 12:35:04 PDT 2020
kazu added a comment.
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75977/new/
https://reviews.llvm.org/D75977
More information about the llvm-commits
mailing list