[PATCH] D140564: [IPSCCP] Create a Pass parameter to control specialization of functions.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 23 03:57:15 PST 2022


nikic 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
----------------
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).


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