[PATCH] D23050: CommandFlags.h/llc: Move StopAfter/StartBefore options to llc.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 14:10:03 PDT 2016


MatzeB added a comment.

In https://reviews.llvm.org/D23050#503698, @tejohnson wrote:

> In https://reviews.llvm.org/D23050#503658, @MatzeB wrote:
>
> > In https://reviews.llvm.org/D23050#503625, @tejohnson wrote:
> >
> > > In https://reviews.llvm.org/D23050#503612, @MatzeB wrote:
> > >
> > > > > I am mainly looking for confirmation that the gold plugin doesn't need -stop-after/-start-after in this review!
> > > >
> > > >
> > > > I just realized that I can answer my own question: neither StartAfter nor StopAfter are used in gold-plugin.cpp so they can't have any effect in the gold plugin.
> > >
> > >
> > > Sorry for the delayed response. I'm not personally familiar with -stop-after and -start-after. However, the gold-plugin will pass along any unrecognized options to the LLVM backend. So presumably a gold plugin user could specify them like -Wl,-plugin-opt,-start-after=pass-name.
> > >
> > > I assume they are useful for debugging? Are they currently also supported for clang? E.g. clang -O2 -mllvm -start-after=pass-name ...?
> >
> >
> > Yes they are used for debugging, but as I just realized in my second comment the only place that actually reads the cl::opts is llc.cpp, so they are available in the gold plugin but will not have any effect. Same with clang. Seems like an accident that the cl::opt ended up in CommandFlags.h.
>
>
> I see. In that case they should be in llc.cpp. But since the support for them is wired all the way through CodeGen, *should* it be supported for debugging via clang and gold-plugin?


I guess there is a point to be made to move the option from llc.cpp to CodeGen/TargetPassConfig.cpp instead. But I guess there is no reason not to do the easier move to llc.cpp right now? We can do the move to TargetPassConfig.cpp another time in another patch. (I just wanted to get this done as a cleanup before I add -start-before/-stop-before flags because I need that for a test...).


Repository:
  rL LLVM

https://reviews.llvm.org/D23050





More information about the llvm-commits mailing list