<div dir="ltr">These are the bitcode at different stages of the LTO portion of the compile. LTO merges the IR for all files being linked and optimizes them as a single monolithic module. The preopt.bc is the merged IR just after merging and before performing any LTO optimizations. internalize.bc is after performing whole program internalization. opt.bc is after the optimization pipeline, and .precodegen.bc is immediately before native code generation.<div><br></div><div>The emit-llvm option will give you the IR for a single source file when you compile it with -c. All of those files when combined give the IR in the preopt.bc temp file.</div><div><br></div><div>Hope that helps,</div><div>Teresa</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 15, 2018 at 4:43 AM Muhui Jiang via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <div><br></div><div>I use the LDFLAGS=" -flto -fuse-ld=gold  -Wl,-plugin-opt=save-temps " to generate the makefile and to make the whole program. However,  found four different kinds of bitcode for each target. For example, I am compiling coreutils. For the program "nohup", I can get</div><div> </div><div><div> nohup.0.0.preopt.bc</div><div> nohup.0.2.internalize.bc</div><div> nohup.0.4.opt.bc </div><div> nohup.0.5.precodegen.bc </div></div><div><br></div><div>If I am right, I can also get the bitcode with emit-llvm option in clang. May I know which bc among the above four should be the same as the one I generated with emit-llvm. More information are very thankful. </div><div><br></div><div>Regards</div><div>Muhui</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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 clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>