[llvm-commits] PATCH: Add 64-bit architecture predicate to llvm::Triple

Chandler Carruth chandlerc at gmail.com
Mon Jan 30 03:56:27 PST 2012


On Mon, Jan 30, 2012 at 3:51 AM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:

> > This predicate doesn't make much sense inside of LLVM currently because
> all
> > of the backends track 64-bitness separately for some (likely historical)
> > reason. However, Clang could benefit greatly from this predicate, it
> would
> > remove one of the most commonly repeated queries about a triple. It also
> > seems likely that targets could move toward relying more heavily on the
> > triple to deduce these things, or at least start asserting that the
> explicit
> > 64-bitness of the subtarget objects matches the triple.
> This looks ok to me. One random thought - msp430 is 16 bit target. And
> I have some plans to do something  in msp430 world again.
> Does this make sense to query for "bitness" of the platform instead?
> So, we can return e.g. whether the platform is 16 or 32 or 64 bits?


I'd be down with having is32Bit and is16Bit.... but I hesitate to go too
far in this direction.

At a certain point, you want to query the TargetData that we have properly
built up. This isn't the right layer of abstraction for that. This should
be extremely coarse grained, requiring the query to have utility both to
code generation and to potential frontends, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120130/174880e0/attachment.html>


More information about the llvm-commits mailing list