[cfe-dev] Lessening the driver's reliance on default target triples

Vedant Kumar via cfe-dev cfe-dev at lists.llvm.org
Thu Jul 14 09:48:01 PDT 2016


Hi everybody,

Thanks for the feedback!

A heads-up to out-of-tree target owners:

I'm planning on committing some clang driver changes tomorrow. The commit
messages will include instructions for updating out-of-tree targets. I expect
the changes to be simple/mechanical (see D22290). Please let me know if you'd
like me to wait a bit longer.

vedant

> On Jul 14, 2016, at 8:13 AM, Reid Kleckner <rnk at google.com> wrote:
> 
> Yep, sounds good.
> 
> On Tue, Jul 12, 2016 at 4:55 PM, Vedant Kumar via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> Hi cfe-dev,
> 
> The clang driver uses "default" and "effective" target triples in a rather ad
> hoc way. Cleaning this up would have a few benefits:
> 
>   - Better error reporting. We have a few open bugs about error messages
>     derived from default target triples, instead of more specific ones.
> 
>   - Less waste. Effective triples are needlessly recomputed in several
>     different parts of the driver. This just needs to happen once per job.
> 
>   - Less confusion about which kind of triple to use in a given context. It
>     should basically always be easy to use an effective triple.
> 
> We can't do away with default triples entirely. They appear to be needed to get
> ToolChains. Once a ToolChain is available, we can get effective triples.
> 
> My plan is to remove uses of default triples in the driver until they are
> *only* needed to compute effective triples. I don't know if this goal is
> realistic, but I still expect incremental progress towards it to be beneficial.
> 
> What do people think of this plan?
> 
> best,
> vedant
> 
> p.s:
> 
> To make this a bit more concrete, here are some initial patches:
> 
>   http://reviews.llvm.org/D22289 [Driver] Make Driver::DefaultTargetTriple private (NFCI)
>   http://reviews.llvm.org/D22290 [Driver] Compute effective target triples once per job (NFCI)
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 




More information about the cfe-dev mailing list