[cfe-commits] [llvm-commits] [PATCH] Inline assembly dialect attribute for IR
Chad Rosier
mcrosier at apple.com
Thu Aug 9 14:49:44 PDT 2012
On Aug 9, 2012, at 2:33 PM, Chandler Carruth wrote:
> 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…
Agreed.
> 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.
Sounds fine.
> Future: We add the side datastructure, and if there is no further information there, assume Intel.
The underlying data structure of the Attribute class is a bit vector. Adding a side data structure would fundamentally change this class… but I don't think it's something we need to worry about..
>
> The patches LGTM with the changes discussed. Comment appropriately the single-bit flag semantics of course. ;]
Will do.
> Could you test (and implement) both ATT and Intel dialect setting in Clang?
I believe I have enough of the code in place now to do proper testing.. so, sure!
Thanks for the feedback, Chandler.
Chad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120809/fe884f5f/attachment.html>
More information about the cfe-commits
mailing list