[PATCH] D102934: [unroll] Use value domain for symbolic execution based cost model

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 21 10:20:44 PDT 2021


reames created this revision.
reames added reviewers: nikic, mkazantsev.
Herald added subscribers: zzheng, bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.

The current full unroll cost model does a symbolic evaluation of the loop up to a fixed limit. That symbolic evaluation currently simplifies to constants, but we can generalize to arbitrary Values using the InstructionSimplify infrastructure at very low cost.

By itself, this enables some simplifications, but it's mainly useful when combined with the branch simplification over in D102928 <https://reviews.llvm.org/D102928>.

(FYI, current tests are a bit lacking.  Planning to pre-commit some tests and rebase in the near future.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102934

Files:
  llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
  llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
  llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
  llvm/test/Transforms/LoopUnroll/unroll-cost-symbolic-execute.ll
  llvm/unittests/Analysis/UnrollAnalyzerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102934.347073.patch
Type: text/x-patch
Size: 21960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210521/4538d056/attachment.bin>


More information about the llvm-commits mailing list