[PATCH] D126455: [FuncSpec] Make the Function Specializer part of the IPSCCP pass.

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 08:02:47 PST 2022


chill added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:671-680
+
+  for (unsigned I = 0; I < Clones.size(); ++I) {
+    Function *Clone = Clones[I];
+    CallSpecBinding &Specialization = Specializations[I];
 
-    // Replace some unresolved constant arguments.
-    constantArgPropagation(FuncDecls, M, Solver);
+    LLVM_DEBUG(dbgs() << "FnSpecialization: Replacing call sites of "
+                      << F->getName() << " with " << Clone->getName() << "\n");
----------------
You can swap the order of the loops and get rid of `CallSiteToRewrite`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126455



More information about the llvm-commits mailing list