[llvm] r210641 - Create macro INITIALIZE_TM_PASS.
Jiangning Liu
liujiangning1 at gmail.com
Fri Jun 13 02:54:53 PDT 2014
OK. I will give follow-up soon.
Is there be any objection if I move GlobalMerge pass to CodeGen?
Thanks,
-Jiangning
2014-06-12 3:03 GMT+08:00 Rafael EspĂndola <rafael.espindola at gmail.com>:
> > I think we're mixing concepts up here. Sorry I didn't jump on the earlier
> > review thread.
> >
> > The key is that we *really must not* add more passes to lib/Transforms
> which
> > accept a TargetMachine. We can still have plenty of IR-operating passes
> in
> > lib/CodeGen that take a TargetMachine, that's fine. If you want to have a
> > macro to automate it, put it in
> include/llvm/CodeGen/CodeGenPassSupport.h or
> > some other *clearly* backend header file so that it is really obvious
> that
> > it should not be used in purportedly target-independent passes.
> >
> > TargetTransformInfo is a generic interface by which a target can expose
> > information to a lib/Transform pass. This allows truly target independent
> > passes to be tested without even having a target around because the
> > interface they use to communicate with the target is very nicely
> abstracted.
> > But there are plenty of passes which really aren't that target
> independent,
> > and those should just stay in lib/CodeGen.
> >
> > AFAIK, CodeGenPrep is the only pass that violates these principles
> today. I
> > think it should just be moved to lib/CodeGen personally, but haven't
> worked
> > with it enough to really tell whether it should instead be reduced to
> use a
> > easily abstracted interface like TargetTransformInfo.
>
> OK, that makes sense.
>
> Jiangning, can you move the macro to some header in
> include/llvm/CodeGen and figure out if GlobalMerge.cpp should move to
> lib/CodeGen or be implemented on top of TargetTransformInfo?
>
> Thanks,
> Rafael
> _______________________________________________
> 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/20140613/f61d723a/attachment.html>
More information about the llvm-commits
mailing list