<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I find it difficult to say something about this, but have you e.g. looked at the Hello pass:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://github.com/llvm/llvm-project/tree/master/llvm/lib/Transforms/Hello" id="LPlnk226338">https://github.com/llvm/llvm-project/tree/master/llvm/lib/Transforms/Hello</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
A copy-paste of that and some search/replace will probably get you started? Hello.cpp also refers to the guide how to write a pass. Looking at your cmake file, I am wondering if the "add_llvm_module" is correct.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> llvm-dev <llvm-dev-bounces@lists.llvm.org> on behalf of ¿ìÀÌÁ¤ via llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Sent:</b> 27 March 2020 06:51<br>
<b>To:</b> llvm-dev@lists.llvm.org <llvm-dev@lists.llvm.org><br>
<b>Subject:</b> [llvm-dev] We have a problem about pass.</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Dear, LLVM developers.</div>
<div>We appreciate your interest.</div>
<div><br>
</div>
We contacted to solve the problem of setting the pass. Our pass setup process is as follows:<br>
<br>
1. Add pass subdirectory from CMakeLists.txt in llvm/lib/Tranform<br>
2. Change CMakeLists.txt in llvm/lib/Transform/pass<br>
3. Run make in llvm/build/lib<br>
<br>
However, the desired pass file was not created. There were no errors in the make process.<br>
<div><br>
</div>
<div>Installed version is LLVM & clang 8.0.0, CMAKE 3.4.3.<br>
Here is the contents of CMakeLists.txt set in the pass:
<div><br>
<div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div>add_llvm_module ( Filter MODULE </div>
</blockquote>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div>Filter.cpp</div>
<div><br>
</div>
</blockquote>
</div>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">DEPENDS<br>
intrinsics_gen<br>
PLUGIN_TOOL<br>
opt<br>
)<br>
<br>
</blockquote>
</blockquote>
We are looking forward to hearing from you. </div>
<div><br>
</div>
<div>Best regards.</div>
</div>
</div>
</div>
</body>
</html>