[PATCH] D154852: [FuncSpec] Add Phi nodes to the InstCostVisitor.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 08:11:12 PDT 2023
labrinea created this revision.
labrinea added reviewers: ChuanqiXu, chill.
Herald added subscribers: hoy, ormris, hiraditya.
Herald added a project: All.
labrinea requested review of this revision.
Herald added a project: LLVM.
This patch allows constant folding of PHIs when estimating the user bonus. Phi
nodes are a special case since some of their inputs may remain unresolved until
all the specialization arguments have been processed by the InstCostVisitor.
Therefore, we keep a list of dead basic blocks and then lazily visit the Phi nodes
once the user bonus has been computed for all the specialization arguments.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D154852
Files:
llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
llvm/unittests/Transforms/IPO/FunctionSpecializationTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154852.538650.patch
Type: text/x-patch
Size: 7102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230710/f3644fcc/attachment.bin>
More information about the llvm-commits
mailing list