[PATCH] Move the *PassPrinter passes from opt.cpp to a separate file

Eli Bendersky eliben at google.com
Mon Feb 10 15:40:13 PST 2014


On Mon, Feb 10, 2014 at 3:30 PM, Eric Christopher <echristo at gmail.com>wrote:

> On Mon, Feb 10, 2014 at 3:26 PM, Eli Bendersky <eliben at google.com> wrote:
> > On Mon, Feb 10, 2014 at 2:00 PM, Eric Christopher <echristo at gmail.com>
> > wrote:
> >>
> >> Any reason not to go ahead and just put it into lib/IR (alongside the
> >> PassManager infrastructure) or some such?
> >
> >
> >
> > I guess just the principle of least impact :-) What I mean by that is -
> this
> > seems to be only useful within the context of the opt tool now. My
> > medium-range goal is being able to create opt-like tools easily without
> > copy-pasting most of opt.cpp; so for this reason, and just because this
> > functionality is self contained and thus living in a separate module is
> good
> > engineering practice, moving it into a separate file in tools/opt made
> > sense. I agree that if there's a need to use this tool outside tools/opt,
> > putting it in lib/IR or some such is a better idea. But we don't know in
> > advance, so taking this in smaller steps made sense to me. What do you
> > think?
> >
>
> Mostly just that the default factoring for things in tools/ doesn't
> include "auxiliary files" and that we normally would pull those out
> into their own library. We should probably have done that for a few
> things already - there's some pretty good boilerplate cut and paste
> already :)
>
> But for now splitting it into a separate module inside tools/opt seems
> reasonable. (i.e. LGTM).
>

Thanks. r201116.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140210/eca54ee8/attachment.html>


More information about the llvm-commits mailing list