[PATCH] D93838: [LLVM] [SCCP] [WIP] : Add Function Specialization pass
Yifeng Dong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 18 19:32:18 PST 2021
dongAxis1944 added inline comments.
================
Comment at: lib/Transforms/IPO/FunctionSpecialization.cpp:209
+ // IPSCCP to propagate the constant arguments.
+ Function *Clone = cloneCandidateFunction(F);
+ Argument *ClonedArg = Clone->arg_begin() + A.getArgNo();
----------------
i think cloneCandidateFunction might become ‘compile time killer’, think the following case:
```
f(int arg1, int arg2) {...}
g(1, 2);
```
this patch might clone 'f' twice. But i think it might be avoid.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93838/new/
https://reviews.llvm.org/D93838
More information about the llvm-commits
mailing list