[llvm] r210641 - Create macro INITIALIZE_TM_PASS.
atrick at apple.com
Wed Jun 11 11:32:09 PDT 2014
On Jun 11, 2014, at 11:17 AM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> On 11 June 2014 14:00, Quentin Colombet <qcolombet at apple.com> wrote:
>> I think this needs more discussion.
>> I have proposed something similar back in January and we agreed it was not a
>> good idea to expose such interface:
>> The bottom line is, this situation is supposed to be the exception and we do
>> not want to provide support for it. The rational is that using target
>> interface, you may violate the layer of LLVM, i.e., you may create a
>> libraries dependencies.
> Thanks for the pointer.
> If I understand it correctly, the objection is not so much to the
> macro, but to spreading the use of TM in IR passes.
> Andrew, given what GlobalMerge is doing, do you think it should be
> rewritten to use TTI?
My understanding is that we don’t want IR passes in libScalarOpts to depend on libCodeGen and that’s why we invented the TTI interface.
So, if GlobalMerge belongs in Transforms, then it should use TTI, not TLI.
Aside from that, I think it would be nice to be very explicit when a Pass depends on TTI, but don’t have a concrete proposal. I even think some optional passes should be able to state that they require TTI rather than silently doing nothing when no backend is linked. i.e. don’t use this pass without a target!
> The macro would still be used in AtomicExpandLoadLinkedPass and
> CodeGenPrepare. IMHO it actually makes it easier to spot the llvm
> passes that are using TM.
More information about the llvm-commits