<div dir="ltr">Thank you!<div><br></div><div>For my code at least, adding -tail-dup-placement-aggressive-threshold=4 makes the output match O3.</div><div><br></div><div>I understand this is fragile though as there could be other spots in the code doing something special for O3, and perhaps not exposing the equivalent flag.</div><div><br></div><div>I really appreciate your help, </div><div>-Chad</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 4, 2020 at 6:58 PM Mehdi AMINI <<a href="mailto:joker.eph@gmail.com">joker.eph@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 4, 2020 at 5:19 PM Chad Verbowski via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello, <div><br></div><div>I'm trying to minimize the processing time for llc -O3 by using a three step compilation process of </div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>1. llc input.bc -stopafter=targetlibinfo -o input.mir</div><div>2. llc -run-pass={....min passes...} input.mir -o opt.mir</div><div>3. llc -startafter=machine-opt-remark-emitter -filetype=obj opt.mir -o final.obj</div></blockquote><div><br></div><div>Examining the passes produced by llc for O1,O2,O3 I compared (with XXX = {1,2,3}):</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>llc input.bc -filetype=obj -OXXX  -o XXXfinal.obj  -debug-pass=Executions </div></blockquote><div><br></div><div>This showed the passes were identical for O1,O2,O3 yet the .obj produced was different for O3 versus O1 and O2 (which were the same). </div><div><br></div><div>Does anyone happen to know why O3 is different, I'm wondering if this is caused by some other llc flag unrelated to the passes which appear to be the same looking at -debug-pass=Executions.</div></div></blockquote><div><br></div><div>The opt flag (-O0 -> -O3) are impacting more than the list of passes, it would also impact some threshold for some optimizations for example (both for opt and llc).</div><div><br></div><div>For example in the backend here as branch on O3: <a href="https://github.com/llvm/llvm-project/blob/master/llvm/lib/CodeGen/MachineBlockPlacement.cpp#L3330" target="_blank">https://github.com/llvm/llvm-project/blob/master/llvm/lib/CodeGen/MachineBlockPlacement.cpp#L3330</a></div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks for considering this, </div><div><br></div><div>-Chad</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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></div>
</blockquote></div>