[PATCH] Adding a timing option for IR parsing

Andrew Trick atrick at apple.com
Wed Mar 20 20:23:22 PDT 2013


On Mar 20, 2013, at 10:54 AM, Eli Bendersky <eliben at google.com> wrote:

> On Wed, Mar 20, 2013 at 10:53 AM, David Blaikie <dblaikie at gmail.com> wrote:
> On Wed, Mar 20, 2013 at 8:39 AM, Eli Bendersky <eliben at google.com> wrote:
> > On Tue, Mar 19, 2013 at 5:59 PM, Nadav Rotem <nrotem at apple.com> wrote:
> >> Hi Eli,
> >>
> >>  The timer code LGTM.   Why do we need an additional command line flag ?
> >>
> >> Nadav
> >>
> >
> > time-passes is defined in PassManager so we'd have to make IRReader
> > aware of that, which is a layering violation. In addition, many LLVM
> > tools use IRReader but don't link PassManager in.
> 
> Could we put it somewhere more common?
> 
> I'm not sure what you mean. Suggestions welcome.

I don't pretend to understand the layering rules. But how can someone use IRReader without linking LLVMCore? I'm not even sure why IRReader is in Support given that it needs a context. Would there be a problem declaring EnableTimer (or whatever) in LLVMContext.h? If that's a problem (unable to link w/ just LLVMSupport), then you could make it a field in the LLVMContext object instead.

-Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130320/581d1a63/attachment.html>


More information about the llvm-commits mailing list