[llvm-dev] The Trouble with Triples

Daniel Sanders via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 17 06:39:51 PDT 2015


> -----Original Message-----
> From: Renato Golin [mailto:renato.golin at linaro.org]
> Sent: 17 September 2015 14:32
> To: Daniel Sanders
> Cc: Eric Christopher; Jim Grosbach; llvm-dev at lists.llvm.org
> Subject: Re: The Trouble with Triples
> 
> On 17 September 2015 at 14:21, Daniel Sanders
> <Daniel.Sanders at imgtec.com> wrote:
> >> What can't be done to TargetMachine to avoid this serialization?
> >
> > TargetMachine already has the serialization (see
> > TargetMachine::TargetTriple). We're not doing anything new here. We're
> > simply replacing one object holding faulty information with a new object
> > holding reliable information.
> 
> I'd like to point out that we can't *replace* the triple
> serialization, or we'd have a serious backward compatibility issue. We
> can add new stuff, either to the triple field or to a new field,
> however, without serious problems.
> 
> What this new information will look like, I don't know. But we have to
> keep compatibility with triples in IR for *at least* a few major
> releases.
> 
> cheers,
> --renato

To clarify, I'm not talking about format in IR files here, just the instantiated object held by TargetMachine. We've been talking about it as a serialization of the target description so I stuck to the same terms.
TargetTuple has a Triple inside it at the moment and will probably have it for a little while yet, even after making the predicates consult TargetTuple's own data.

The serialization you're referring to is covered at:
> The justification for the IR serialization in phase 5 is simply that we need to deliver the Triple/TargetTuple
> to LTO for it to operate correctly and we currently do this by serializing Triple in the IR.


More information about the llvm-dev mailing list