[LLVMdev] [RFC] CGContext skeleton implementation

Chandler Carruth chandlerc at google.com
Thu Dec 5 17:14:56 PST 2013


On Thu, Dec 5, 2013 at 5:04 PM, Andrew Trick <atrick at apple.com> wrote:

> Right. On the flip side, some passes should be able to make hard queries
> against target/subtarget that fail if the driver doesn’t initialize them. I
> don’t want any way to accidentally run the vectorizer or LSR without
> initializing my subtarget info. Also, I want to prevent early passes from
> getting at subtarget info.
>

<snip>

>
> Passes that depend on TargetMachine can use CGContext for hard target and
> subtarget info queries. Since they must depend on TargetMachine anyway,
> they can do something like TM.getCGContext(Function).
>

This sounds like you want IR-level passes which have direct, hard
dependencies on the target and codegen. That would be a radical departure
from the core design of the IR / MI separation. We have discussed this
directly in the past and Chris and others have argued *very strongly*
against this. If you want to reverse this design direction, it really
should be a totally separate discussion from the current discussion. I'm
not actually in the "strongly against" camp on this subject, but I *am*
strongly against trying to design CGContext to address these needs when we
don't yet have either a concrete design or agreement on that design. I
think we should restrain our design considerations to what we need to solve
the limited problem we have today, and not *breaking* the existing design
around TTI, and the IR/Target layering we currently use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131205/c368f207/attachment.html>


More information about the llvm-dev mailing list