[PATCH] D82862: [ThinLTO] Always parse module level inline asm with At&t dialect

Anirudh Prasad via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 25 07:23:27 PST 2021


anirudhp added a comment.

In D82862#2513044 <https://reviews.llvm.org/D82862#2513044>, @rnk wrote:

> In D82862#2512908 <https://reviews.llvm.org/D82862#2512908>, @uweigand wrote:
>
>> So why do you want GNU inline asm for clang-cl anyway?   I thought the whole point of clang-cl was to be compatible with the Microsoft Visual Studio compiler, which I understand only supports the MS asm syntax?
>
> We have users, in this case, I think it's V8, who would prefer to use gcc-style module level assembly if it is available. Their motivation is somewhat arbitrary, but generally, clang-cl supports a variety of extensions, some inherited from GCC, in all modes. Part of the point of switching compilers from MSVC to clang is to get access to those extensions.

I might be mistaken here  but couldn't this be done by introducing an option and tying it to setting the AssemblerDialect field in the target's respective `MCAsmInfo` instance and then querying that? Wouldn't this remove the dependency on setting the dialect on the parser. Module level assembly are only going to be treated as GNU statements (from Uli's comment above), and if its just the case of using a different variant (within the gnu dialect), then this can be set in the respective (Target)MCAsmInfo instances appropriately?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82862/new/

https://reviews.llvm.org/D82862



More information about the cfe-commits mailing list