[PATCH] D157807: [ValueTracking] Strengthen analysis in `computeKnownBits` of phi

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 12 18:29:28 PDT 2023


goldstein.w.n created this revision.
goldstein.w.n added reviewers: nikic, RKSimon, foad.
Herald added subscribers: StephenFan, zzheng, hiraditya.
Herald added a project: All.
goldstein.w.n requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The changes are twofold.

1. Base the recursion limit on how many incoming edges there actually are. If there are only a few we don't need to worry so much about the exponential explosion.
2. Use the comparison based analysis to strengthen the standard knownbits analysis rather than choosing either/or.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157807

Files:
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/test/Analysis/ScalarEvolution/outer_phi.ll
  llvm/test/Transforms/InstCombine/catchswitch-phi.ll
  llvm/test/Transforms/InstCombine/known-phi-recurse.ll
  llvm/test/Transforms/LoopUnroll/AArch64/runtime-unroll-generic.ll
  llvm/test/Transforms/LoopUnroll/runtime-unroll-remainder.ll
  llvm/test/Transforms/PhaseOrdering/X86/pr38280.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157807.549679.patch
Type: text/x-patch
Size: 9801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230813/cf0c501c/attachment.bin>


More information about the llvm-commits mailing list