[llvm-commits] PATCH: Add 64-bit architecture predicate to llvm::Triple
chandlerc at gmail.com
Mon Jan 30 05:56:27 CST 2012
On Mon, Jan 30, 2012 at 3:51 AM, Anton Korobeynikov <anton at korobeynikov.info
> > This predicate doesn't make much sense inside of LLVM currently because
> > of the backends track 64-bitness separately for some (likely historical)
> > reason. However, Clang could benefit greatly from this predicate, it
> > 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
> > 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...
More information about the llvm-commits