[LLVMdev] The Trouble with Triples

Renato Golin renato.golin at linaro.org
Thu Jul 9 02:21:01 PDT 2015


Hi Vedant,

Welcome to the community! :)

On 8 July 2015 at 19:24, Vedant Kumar <vsk at apple.com> wrote:
> I’ve recently been tasked with cleaning this up.

That's great news! It's one of the biggest driver pains for
complicated targets, like ARM.


>  1. Replace the call to Driver::computeTargetTriple() in getToolChain() with
>     some variety of ComputeEffectiveClangTriple().
>
>  2. Cache the result of ComputeEffectiveClangTriple() so we can avoid
>     re-parsing the argument list.

That's a good plan. It may be easier to do that now and make sure we
don't need to re-parse the triple, but ultimately, both steps will be
replaced by TargetTuple.

TargetParser will parse the triple/cpu/fpu/arch, then TargetTuple will
use that to create a full representation of the target (for now, using
llvm::Triple), then any need for target information would be fulfilled
by that object.

If your work is completed before Daniel gets to work in Clang, it will
likely be a lot simpler for him to implement the Tuple there.

cheers,
--renato




More information about the llvm-dev mailing list