[PATCH] D145374: [FuncSpec] Consider constant struct arguments when specializing.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 10:40:11 PDT 2023
labrinea updated this revision to Diff 512885.
labrinea added a comment.
This is basically the same revision as https://reviews.llvm.org/D145374?id=502612, where `markArgInFuncSpecialization` was adapted to support struct arguments. As @chill pointed out in D147132 <https://reviews.llvm.org/D147132>, the deprecated function has the potential to be more efficient if `funcspec-for-literal-constant` gets enabled by default, so I am putting it back in. To answer @ChuanqiXu's comment: arguments we are not specializating on, must be present either in `ValueState`or `StructValueState` therefore the specialization can inherit their lattice value from the original function. The existing code does not handle structs, hence the check I suppose? (a struct won't be present in the standard value map)
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.512885.patch
Type: text/x-patch
Size: 10788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230412/5db93dc3/attachment.bin>
More information about the llvm-commits
mailing list