<div dir="ltr"><div style="font-family:tahoma,sans-serif" class="gmail_default"><font color="#000000" size="3" face="Times New Roman">
</font><p style="margin:0in 0in 10pt" class="MsoNormal"><font color="#000000" size="3" face="Times New Roman">Hello everybody.</font></p><font color="#000000" size="3" face="Times New Roman">
</font><p style="margin:0in 0in 10pt" class="MsoNormal"><font color="#000000" size="3" face="Times New Roman">I write and run some llvm regular passes with opt with these
simple commands:</font></p><font color="#000000" size="3" face="Times New Roman">
</font><p style="margin:0in 0in 10pt" class="MsoNormal"><font color="#000000" size="3" face="Times New Roman">clang++ -c mypass.cpp `llvm-config --cxxflags`<br>
clang++ -shared -o mypass.so mypass.o `llvm-config --ldflags`<br>
opt -load ./mypass.so -mypass < sample.bc > /dev/null</font></p><font color="#000000" size="3" face="Times New Roman">
</font><p style="margin:0in 0in 10pt" class="MsoNormal"><font color="#000000" size="3" face="Times New Roman">But I would like to write, register and run machine function
pass. I know these passes cannot generally be run from the opt or bugpoint
commands. What do I do and how? I didn’t find any example.</font></p><font color="#000000" size="3" face="Times New Roman">
</font><p style="margin:0in 0in 10pt" class="MsoNormal"><font color="#000000" size="3" face="Times New Roman">I am newbie on llvm. </font></p><font color="#000000" size="3" face="Times New Roman">
</font><p style="margin:0in 0in 10pt" class="MsoNormal"><font color="#000000" size="3" face="Times New Roman">Thanks.</font></p><font color="#000000" size="3" face="Times New Roman">
</font></div></div>