[PATCH] D140564: [IPSCCP] Create a Pass parameter to control specialization of functions.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 23 04:13:56 PST 2022
labrinea marked an inline comment as not done.
labrinea added inline comments.
================
Comment at: llvm/test/Transforms/FunctionSpecialization/function-specialization.ll:1
-; RUN: opt -passes=ipsccp -specialize-functions -func-specialization-size-threshold=3 -S < %s | FileCheck %s
+; RUN: opt -passes="ipsccp<func-spec>" -func-specialization-size-threshold=3 -S < %s | FileCheck %s
+; RUN: opt -passes=ipsccp -specialize-functions=true -func-specialization-size-threshold=3 -S < %s | FileCheck %s
----------------
labrinea wrote:
> nikic wrote:
> > chill wrote:
> > > nikic wrote:
> > > > chill wrote:
> > > > > For completeness, I'd suggest a few more run lines, so ultimately we cover:
> > > > >
> > > > > | **Passes** | **Options** |
> > > > > | `ipsccp` | none | +
> > > > > | `ipsccp` | `-specialize-functions=true` |
> > > > > | `ipsccp` | `-specialize-functions=false` |
> > > > > | `ipsccp<func-spec>` | none | +
> > > > > | `ipsccp<func-spec>` | `-specialize-functions=false` |
> > > > > | `ipsccp<no-func-spec>` | none |
> > > > > | `ipsccp<no-func-spec>` | `-specialize-functions=true` | +
> > > > >
> > > > >
> > > > >
> > > > Maybe drop `-specialize-functions` entirely? Is there any benefit to keeping it if we already have the pass parameter?
> > > Agree.
> > > When we were discussing it we weren't sure what's the policy and looking at some other passes they have both a pass option and a command line option equivalent, but of course, that may well have been for retaining compatibility (not update thousand tests, etc).
> > I think this may be a LegacyPM leftover, where pass options didn't exist (or rather, they existed, but not in a form that's directly accessible via opt).
> What happens in case like `--passes='default<O3>' -specialize-functions` (see compiler-crash-58759.ll) ?
Transform to `--passes='default<O3>,ipsccp<func-spec>'` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140564/new/
https://reviews.llvm.org/D140564
More information about the llvm-commits
mailing list