[PATCH] D93838: [LLVM] [SCCP] [WIP] : Add Function Specialization pass

Yifeng Dong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 7 18:26:29 PST 2021


dongAxis1944 added inline comments.


================
Comment at: lib/Transforms/IPO/FunctionSpecialization.cpp:247
+  unsigned getSpecializationBonus(Argument *A, Constant *C) {
+    // TODO: Yet to implement
+    return 2;
----------------
mivnay wrote:
> dongAxis1944 wrote:
> > by the way,  could we use the inline cost model to get this bonus?
> > 
> > The inline cost might calculate the cost that considering sora,const-prop,dce, etc. I think it might be great for this function.  
> > 
> > Any thoughts?
>  Inline cost model works for the function pointer like arguments. We are specializing other type arguments as well. I have a patch ready for proposal but waiting for D93762 to be checked-in first..
D93762 looks good to me.  But I think it might be better to wait for fhahn's comment


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