[PATCH] D96646: [NFC] update LangRef for D88645
Tyker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 8 09:39:28 PST 2021
Tyker added a comment.
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.
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.
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