<div dir="ltr">If you look for all the calls to the INITIALIZE_PASS_BEGIN macro in LLVM (all in lib/{Transforms,Analysis}/**/*.cpp) you should find all the short/long name pairs, I think.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 11, 2016 at 6:31 AM, Adrien DEGRANGE via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I apologize for bothering you, but even after many efforts, I can't solve my issue.<br>
<br>
There is a great command-line optimizer tool, "opt", which can apply optimization passes to the IR code :<br>
opt -mem2reg -S myFile.ll -o myFile.ll<br>
<br>
With that tool, an optimization pass is referred as its "short name" (mem2reg), and these passes are pretty well documented, for instance here: <a href="http://llvm.org/docs/Passes.html" rel="noreferrer" target="_blank">http://llvm.org/docs/Passes.html</a><br>
<br>
However, if I want to apply the same optimization pass in a C++ code, I have to call a specific function, such as:<br>
myPassManager->add(createPromoteMemoryToRegisterPass());<br>
<br>
The link between the "mem2reg" short name and the "createPromoteMemoryToRegister" function is pretty obvious, but not completely straightforward.<br>
Is there any dictionary, or at least a comprehensive documentation about these translations?<br>
<br>
Thanks a lot in advance!<br>
<br>
Have a great day,<br>
<br>
AD<br>
<br>
Adrien Dégrange<br>
Recherche & Développement<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>