<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Good morning,<br>
</p>
<p>Thank you for the quick response. That tutorial helped with
finding most of the parts that I needed to modify in order to run
my pass but it seems that code changes in the past couple of years
cause the option parsing to ignore the added code generator option
in the "Real" CompilerInvocation, and as a consequence the passes
are never ran. In particular it seems to be related to the new
codegen options definition file, so I want to be perfectly sure of
properly adding what is needed.<br>
</p>
<p>Kindest regards,</p>
<p>Jose Luis<br>
</p>
<div class="moz-cite-prefix">On 7/10/21 18:01, Min-Yih Hsu wrote:<br>
</div>
<blockquote type="cite"
cite="mid:947FF44C-F69E-4FCA-BFC7-918A1D762468@uci.edu">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="">Hi,</div>
<div class=""><br class="">
</div>
I wrote a small tutorial about this very topic: <a
href="https://medium.com/@mshockwave/writing-llvm-pass-in-2018-part-iv-d69dac57171d"
class="" moz-do-not-send="true">https://medium.com/@mshockwave/writing-llvm-pass-in-2018-part-iv-d69dac57171d</a>
<div class="">Details might differ from ToT codebase but I think
the workflow hasn’t changed since then.</div>
<div class="">Hope this helps.</div>
<div class=""><br class="">
</div>
<div class="">-Min</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Oct 7, 2021, at 7:44 AM, Jose Luis Vázquez
via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org"
class="" moz-do-not-send="true">cfe-dev@lists.llvm.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Good afternoon<br class="">
<br class="">
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?<br class="">
<br class="">
Kindest regards<br class="">
<br class="">
Jose Luis<br class="">
<br class="">
_______________________________________________<br
class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" class=""
moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br
class="">
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br
class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
</body>
</html>