[cfe-dev] Integrating a pass as a clang option
Jose Luis Vázquez via cfe-dev
cfe-dev at lists.llvm.org
Fri Oct 8 01:38:13 PDT 2021
Using the pass plugin infrastructure wasn't something that I had in
mind, considering that the option to load them requires a file path and
we also wanted it to be integrated within our compiler, but it's
something I'll keep in mind now considering it seems to be the more
accepted way to do it.
Kindest regards
Jose Luis
On 7/10/21 18:09, Michael Kruse wrote:
> There is a pass plugin infrastructure for such cases [1]. There is an
> example Bye pass[2] and Polly using it in-tree to see how to use it.
>
> [1] https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Passes/PassPlugin.h
> [2] https://github.com/llvm/llvm-project/tree/main/llvm/examples/Bye
>
> Michael
>
>
> Am Do., 7. Okt. 2021 um 09:44 Uhr schrieb Jose Luis Vázquez via
> cfe-dev <cfe-dev at lists.llvm.org>:
>> Good afternoon
>>
>> I've developed a pass that I want to run directly from a clang
>> invocation by setting an option in the command line. The pass has been
>> ran through opt and tested for correctness. I've defined the option and
>> the driver can parse it but I haven't been able to trigger the execution
>> of the pass by the pass manager. Is there any particular structure I
>> need to follow to convert the flag I added in
>> include/clang/Driver/Options.td into an option parsed by the frontend?
>>
>> Kindest regards
>>
>> Jose Luis
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list