[PATCH] D145374: [FuncSpec] Consider constant struct arguments when specializing.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 06:22:30 PDT 2023


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

Changes from last revision:

- Renamed `markArgInFuncSpecialization` to `handleSpecializationArguments` as a better description.
- Rewrote the above function such that:
  - the lattice state of non constant arguments is copied from the original function without recomputing
  - the arguments are not pushed to the solver's worklists (there's no need for it)
  - `Function::arg_iterator` is used rather than `Argument *` directly
- Inlined `isValidArgumentType` and removed repeated check for int/float types


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145374

Files:
  llvm/include/llvm/Transforms/Utils/SCCPSolver.h
  llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
  llvm/lib/Transforms/Utils/SCCPSolver.cpp
  llvm/test/Transforms/FunctionSpecialization/constant-struct.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145374.513561.patch
Type: text/x-patch
Size: 13857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230414/922cdd69/attachment.bin>


More information about the llvm-commits mailing list