[PATCH] D132076: [KnownBits] Limited recursion through phi operands
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 05:38:55 PDT 2022
foad added a comment.
> Specifically, the remaining depth limit is even divided across the number of operands with the depth per operand adjusted upwards so that the total number of recursion steps is limited to the same value we'd perform on a tree of e.g. binary instructions.
I don't quite get the logic here. Are you saying that for a tree of **binary** instructions we do about 2^6 recursive steps, and for a tree of N-operand phis you'd like to keep the same limit of about 2^6 steps instead of risking it blow up to N^6 steps? If so then I think you'd need to reduce depth by log2(N) at each step. Or perhaps max(log2(N), 1) to handle the 1-operand phi case gracefully.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132076/new/
https://reviews.llvm.org/D132076
More information about the llvm-commits
mailing list