[PATCH] D96646: [NFC] update LangRef for D88645

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 12:13:12 PST 2021


andrew.w.kaylor added a comment.

In D96646#2611589 <https://reviews.llvm.org/D96646#2611589>, @Tyker wrote:

> In D96646#2594843 <https://reviews.llvm.org/D96646#2594843>, @andrew.w.kaylor wrote:
>
>> I'm not trying to be difficult, but I genuinely still don't understand the additional arguments pointer. Is it intended to allow proprietary extensions? Is there an example somewhere?
>>
>> If these intrinsics are meant as a general mechanism to enable arbitrary communication between custom front ends and custom optimization passes, that's fine. I'd just like to see something explicitly explaining that.
>
> the pointer is to a global struct containing the the provided arguments. I use it to communicate from source code to custom passes. but the front-end doesn't need to be custom. since the code to generate theses extra arguments is in clang trunk.
> here is a basic example: https://godbolt.org/z/Tavcv9.
> how the passes use this information is not defined it can be used for many things.
> the major benefit I see is that it can pass arbitrary information and works well with template and constexpr programing. but the front-end does not do any semantic checking on the meaning of the information.

I was reminded today that this never landed and the LangRef is still wrong. Can you incorporate the explanation above about how this is used into the LangRef documentation?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96646



More information about the llvm-commits mailing list