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

Eli Bendersky eliben at google.com
Mon Feb 10 15:26:42 PST 2014


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?

Eli






> -eric
>
> On Mon, Feb 10, 2014 at 1:49 PM, Eli Bendersky <eliben at google.com> wrote:
> > I'm looking into cleaning up the main file of the opt tool (more on the
> > motivation in a separate post). One things that immediately sprints up is
> > moving all kinds of self-contained functionality into their own modules
> > within tools/opt;
> >
> > This patch does the same for the *PassPrinter passes. This code is very
> old
> > (seems to be from ~2007) and since then new chunks of functionality was
> > often added in separate modules, though the analysis pass printers were
> left
> > out.
> >
> > PTAL
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140210/84fb5819/attachment.html>


More information about the llvm-commits mailing list