[cfe-commits] [llvm-commits] [PATCH] Inline assembly dialect attribute for IR

Chandler Carruth chandlerc at google.com
Thu Aug 9 14:33:55 PDT 2012


On Thu, Aug 9, 2012 at 2:29 PM, Chad Rosier <mcrosier at apple.com> wrote:

>
> On Aug 9, 2012, at 2:25 PM, Chandler Carruth wrote:
>
> Why two bits? Couldn't we say that there are two dialects, the default is
> ATT, and there is a bit to select the intel dialect?
>
>
> I'm fine with that approach.
>
> Do you expect us to ever need to have the IR model more dialects?
>
>
> I don't expect it, but it's not out of the realm of possibilities.
>

Ok, not sure how much future-proofing you want to do here...

If we're going to want more than 2 dialects, I would have the one bit say
"non-standard dialect" and store which dialect in a side structure that can
be omitted in most cases.

I suspect that this would be a graceful progression though:

Today: 1 bit, if it is set, "other" dialect is used. No need for side
datastructure if the other dialect happens to be the Intel dialect. So we
don't even include the side data structure.

Future: We add the side datastructure, and if there is no further
information there, assume Intel.


The patches LGTM with the changes discussed. Comment appropriately the
single-bit flag semantics of course. ;]

Could you test (and implement) both ATT and Intel dialect setting in Clang?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120809/e88b526b/attachment.html>


More information about the cfe-commits mailing list