<div dir="ltr"><span style="color:rgb(80,0,80)">> The Apple ld (shipped with Xcode, open-source) saves the 3 files if</span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>
> -save-temps is applied:<br>
>   - xxx.lto.bc : the merged bit-code before IPA<br>
>   - xxx.lto.opt.bc: the optimized bit-code of the *.lto.bc<br>
>   - xxx.lto.o : the object file of xxx.lto.bc<br>
><br>
> I think it is better way to go, often time we need IR both after and after<br>
> the transformation.<br>
<br>
</div>Agreed. Jonas, would it work for you if the also-emit-llvm option did this?<br></blockquote><div><br></div><div>Certainly! I think this is an idea that would satisfy the needs of most people.</div><div>
<br></div><div>The question remains how to name this option. If it is called also-emit-llvm, I would expect to yield xxx.lto.opt.bc, i.e., the LLVM corresponding to the regular linker output. If the option is called -save-temps, it should give me all the intermediate files as explained by Shuxin Yang.</div>


<div><br></div><div>Cheers,</div><div>Jonas </div></div></div></div>