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

James Molloy james.molloy at arm.com
Mon Jan 30 03:53:18 PST 2012


Hi Chandler,

 

The predicate looks good, however I’d suggest adding a few more for orthogonality while you’re there?

 

·         isArch32Bit() – this is not necessarily !isArch64Bit() (although probably currently is for the architectures we currently support).

·         get[32,64]BitArch() – take the current arch, and return the [32,64] bit version of it. This could be used to massively simplify –m32/-m64 in Clang.

What do you think?

 

James

 

From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Chandler Carruth
Sent: 30 January 2012 11:30
To: <llvm-commits at cs.uiuc.edu>
Subject: [llvm-commits] PATCH: Add 64-bit architecture predicate to llvm::Triple

 

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120130/0ad23e27/attachment.html>


More information about the llvm-commits mailing list