[PATCH] D146158: [FuncSpec] Track the return values of specializations.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 09:10:03 PDT 2023


labrinea updated this revision to Diff 509693.
labrinea added a comment.

Changes from last revision:

- Fixed unused variable warning on release builds.
- Erase each value, which is popped from the solver's worklists, from the set of invalidated values.
- Factored out code from resolvedUndefsIn which applies to an individual instruction, so that we can call it on the remaining invalidated instructions which didn't pop from the solver's worklists.

This guarantees that all the invalidated instructions will become overdefined if they are still unknown after the solver has run.

**Testing**:

- Passed stage2 build of clang (with LTO, specialization of constants enabled and max-iters=10).
- The compile times for the llvm-test-suite have actually gone down too (-0.066% geomean for non-lto, -0.087% geomean for lto)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146158/new/

https://reviews.llvm.org/D146158

Files:
  llvm/include/llvm/Transforms/Utils/SCCPSolver.h
  llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
  llvm/lib/Transforms/Utils/SCCPSolver.cpp
  llvm/test/Transforms/FunctionSpecialization/function-specialization-constant-expression.ll
  llvm/test/Transforms/FunctionSpecialization/track-return.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146158.509693.patch
Type: text/x-patch
Size: 15967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230330/e076da4b/attachment-0001.bin>


More information about the llvm-commits mailing list