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

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 05:55:43 PDT 2021


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:97-100
+static cl::opt<unsigned> FuncSpecializationMaxIters(
+    "func-specialization-max-iters", cl::Hidden,
+    cl::desc("The maximum number of iterations function specialization is run"),
+    cl::init(1));
----------------
ChuanqiXu wrote:
> It looks like we need to re-evaluate the performance, compile-time and code-size for different parameters now.
Agreed. This patch might be a candidate for a first version, and with a few things changed, it is time to measure things again to see where are, so am going to do that right now.


================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:904
+      // FIXME: Only one argument per function.
+      return true;
+    }
----------------
ChuanqiXu wrote:
> SjoerdMeijer wrote:
> > .... here!
> > 
> > It stops after specialising one argument. This is very arbitrary and probably what we want to fix in the first version.
> > This requires a bit of a reshuffle, which is what I am addressing now.
> I am OK to fix this in successive patches.
That will work for me.


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

https://reviews.llvm.org/D93838



More information about the llvm-commits mailing list