[PATCH] D145374: [FuncSpec] Consider constant struct arguments when specializing.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 11:18:42 PDT 2023


labrinea added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SCCPSolver.cpp:868-869
+    } else {
+      const ValueLatticeElement &LV = getValueState(V);
+      mergeInValue(getValueState(NewArg), NewArg, LV);
     }
----------------
ChuanqiXu wrote:
> labrinea wrote:
> > ChuanqiXu wrote:
> > > This looks not the same with the original statements. For example, we won't do anything if V is the OldArg and ValueState doesn't contain the OldArg.
> > Looking at what `handleCallArguments()` does, makes me think that `OldArg` ought to be in either `ValueState` or `StructValueState`. That said I am wondering whether it's better to just call `Solver.visit(CallSite)` for the callsites of specializations right after we've updated them. This would essentially make `markArgInFuncSpecialization()` obsolete. Lemme try this and run a few tests.
> Agreed. It looks cleaner at least.
I've raised D146158.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145374



More information about the llvm-commits mailing list