<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Well we do both, we schedule before and after register allocation. Most targets use the MachineScheduler before register allocation and some opt in to the PostMachineScheduler after register allocation. You can look at the enableMachineScheduler() and enablePostMachineScheduler() methods.</div><div><br></div><div>-Matthias</div><div><br>On Dec 16, 2015, at 9:06 AM, Quentin Colombet via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class="">Hi,</div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 16, 2015, at 8:02 AM, Iulia Stirb via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: verdana, helvetica, sans-serif; font-size: 24px;" class=""><div id="yui_3_16_0_1_1450279229586_16878" class="">Hi,</div><div id="yui_3_16_0_1_1450279229586_16878" class=""><br class=""></div><div id="yui_3_16_0_1_1450279229586_16878" dir="ltr" class="">I have read the steps of code generation from here: <a href="http://llvm.org/docs/CodeGenerator.html#the-high-level-design-of-the-code-generator" id="yui_3_16_0_1_1450279229586_16908" class="">The LLVM Target-Independent Code Generator — LLVM 3.8 documentation</a></div><div style="width:450px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';margin-top:5px; margin-bottom: 5px; background-color: #ffffff;" contenteditable="false" id="enhancrCard_1" class="link-enhancr-element richcompose-card link-enhancr-attachment"><table class="link-enhancr-element" cellspacing="0" cellpadding="0" border="0" style="width:450px; height:170px; position: relative; display: block;" id="yui_3_16_0_1_1450279229586_16977"><tbody id="yui_3_16_0_1_1450279229586_16976" class=""><tr class="link-enhancr-element"><td class="link-enhancr-element" colspan="8" style="height: 1px; background-color: #e5e5e5; font-size: 1px; border-collapse: collapse;"><div class="link-enhancr-element" style="height: 1px; background-color: #e5e5e5; font-size: 1px; line-height:0px;"> </div></td></tr><tr class="link-enhancr-element" id="yui_3_16_0_1_1450279229586_16996"><td rowspan="5" class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td><td class="link-enhancr-image-wrap enhancr-image-crop link-enhancr-element" rowspan="5" style="vertical-align: middle; width: 168px; height: 168px; border-collapse: collapse; background-color: rgb(255, 255, 255);" id="yui_3_16_0_1_1450279229586_17030"><div class="link-enhancr-element" style="width: 168px;" align="center" id="yui_3_16_0_1_1450279229586_17029"><a href="http://llvm.org/docs/CodeGenerator.html#the-high-level-design-of-the-code-generator" class="link-enhancr-element link-enhancr-card-urlWrapper" style="text-decoration: none !important;" id="yui_3_16_0_1_1450279229586_17028"><img alt="image" src="https://s.yimg.com/vv//api/res/1.2/TtUrNAL7EjkEtk6JWhmikQ--/YXBwaWQ9bWFpbDtmaT1maWxsO2g9MTY4O3c9MTY4/http://llvm.org/docs/_static/logo.png.cf.jpg" class="link-enhancr-thumbnail-image yahoo-ignore-inline-image link-enhancr-element" width="168" height="168" style="display: block; margin: auto;" data-id="ab38e657-f27c-58a6-be0a-7cafa17ae0b9" id="yui_3_16_0_1_1450279229586_17027"></a></div></td><td rowspan="5" class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td><td rowspan="5" class="link-enhancr-element" style="width: 14px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;" id="yui_3_16_0_1_1450279229586_17025"><div class="link-enhancr-element" style="width: 14px; background-color: #ffffff; font-size: 14pt;"> </div></td><td colspan="2" class="link-enhancr-element" style="height: 6px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;" id="yui_3_16_0_1_1450279229586_16995"><div class="link-enhancr-element" style="height: 6px; background-color: #ffffff; font-size: 6pt;" id="yui_3_16_0_1_1450279229586_16994"> </div></td><td rowspan="5" class="link-enhancr-element" style="width: 20px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 20px; background-color: #ffffff; font-size: 20pt;"> </div></td><td class="link-enhancr-element" rowspan="5" width="1" style="width: 1px; background-color: #e5e5e5; font-size: 1pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td></tr><tr id="yui_3_16_0_1_1450279229586_16975" class=""><td class="link-enhancr-element" colspan="2" style="width: 100%; vertical-align: middle; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';" id="yui_3_16_0_1_1450279229586_16974"><div class="link-enhancr-text-part link-enhancr-element" style="line-height:16.5px; background-color: #ffffff; height: 135px; width: 245px;" id="yui_3_16_0_1_1450279229586_16973"><div class="link-enhancr-element" style="word-wrap: break-word; word-break: break-all;" id="yui_3_16_0_1_1450279229586_16972"><span class=" icon-shrink link-enhancr-element icon link-enhancr-toggle"></span><span class="icon-close link-enhancr-element icon link-enhancr-delete"></span><a href="http://llvm.org/docs/CodeGenerator.html#the-high-level-design-of-the-code-generator" class="link-enhancr-element link-enhancr-card-urlWrapper" style="line-height: 100%; font-size: 18px; display: block; text-decoration: none !important;" id="yui_3_16_0_1_1450279229586_16993"><span class="link-enhancr-card-title link-enhancr-element" style="margin: 0px 0px 3px; font-weight: normal; font-size: 18px; line-height: 21px; max-height: 43px; display: inline-block; overflow: hidden !important;" id="yui_3_16_0_1_1450279229586_16992">The LLVM Target-Independent Code Generator — LLVM 3...</span></a><div style="font-size: 13px; line-height: 20px; color: #999999; max-height: 81px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';overflow: hidden;" class="link-enhancr-card-description link-enhancr-element" id="yui_3_16_0_1_1450279229586_16971">Instruction Selection Instruction Selection is the process of translating LLVM code presented to the
code generator into target-specific machine instructions. </div></div></div></td></tr><tr class=""><td colspan="2" class="link-enhancr-element" style="height: 4px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="height: 4px; background-color: #ffffff; font-size: 4pt;"></div></td></tr><tr id="yui_3_16_0_1_1450279229586_16981" class=""><td class="link-enhancr-element" style="vertical-align: middle; font-family: 'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif';" id="yui_3_16_0_1_1450279229586_16980"><div class="link-enhancr-element" style="font-size: 0pt;" id="yui_3_16_0_1_1450279229586_16979"><a href="http://llvm.org/docs/CodeGenerator.html#the-high-level-design-of-the-code-generator" class="link-enhancr-element link-enhancr-card-url" style="text-decoration: none !important; cursor: pointer !important;" target="_blank"><span class="link-enhancr-element link-enhancr-view-on" style="display: inline-block; line-height: 11px; max-width: 145px; min-width: 85px; overflow: hidden; max-height: 13px; word-break: break-all;" id="yui_3_16_0_1_1450279229586_16925"><span class="link-enhancr-mobile-no-resize link-enhancr-element" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none;">View on <span style="font-weight: bold" class="link-enhancr-view-on-domain">llvm.org</span></span></span></a></div></td><td class="link-enhancr-element" style="vertical-align: middle; width: 100px; font-family: 'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif';" id="yui_3_16_0_1_1450279229586_17000"><div class="link-enhancr-element link-enhancr-preview-wrapper" style="max-width: 100px; min-width: 80px; overflow: hidden; text-align: right; line-height: 11px; max-height: 13px; font-size: 0pt;" id="yui_3_16_0_1_1450279229586_16999"><span class="link-enhancr-mobile-no-resize link-enhancr-element link-enhancr-preview-by" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none;">Preview by Yahoo</span></div></td></tr><tr id="yui_3_16_0_1_1450279229586_16985" class=""><td colspan="2" class="link-enhancr-element" style="height: 9px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;" id="yui_3_16_0_1_1450279229586_16984"><div class="link-enhancr-element" style="height: 9px; background-color: #ffffff; font-size: 9pt;" id="yui_3_16_0_1_1450279229586_16983"></div></td></tr><tr class="link-enhancr-element" id="yui_3_16_0_1_1450279229586_16989"><td class="link-enhancr-element" colspan="8" style="height: 1px; background-color: #e5e5e5; font-size: 1px; border-collapse: collapse;" id="yui_3_16_0_1_1450279229586_16988"><div class="link-enhancr-element" style="height: 1px; background-color: #e5e5e5; font-size: 1px; line-height:0px" id="yui_3_16_0_1_1450279229586_16987"> </div></td></tr></tbody></table></div><div id="yui_3_16_0_1_1450279229586_16878" dir="ltr" class=""><br class=""></div><div id="yui_3_16_0_1_1450279229586_16878" dir="ltr" class="">Could you please confirm that on actual implementation of LLVM's code generator, the instruction scheduling is done before register allocation?</div></div></div></div></blockquote><div><br class=""></div><div>This is correct.</div><div><br class=""></div><div>Cheers,</div><div>Quentin</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: verdana, helvetica, sans-serif; font-size: 24px;" class=""><div id="yui_3_16_0_1_1450279229586_16878" dir="ltr" class=""><br class=""></div><div id="yui_3_16_0_1_1450279229586_16878" dir="ltr" class="">Many thanks,</div><div id="yui_3_16_0_1_1450279229586_16878" dir="ltr" class="">Iulia Stirb</div></div></div>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class=""></div></blockquote></div><br class=""></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LLVM Developers mailing list</span><br><span><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a></span><br><span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></span><br></div></blockquote></body></html>