[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 11:52:59 PDT 2016


MatzeB added a comment.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D23050





More information about the llvm-commits mailing list