<div dir="ltr">I believe intra-function hot cold code splitting is in the scope of the Propeller project, which Sriram Tallam worked on. I'm not sure what the status of the feature is at this moment.<div><br></div><div>I believe that the hot cold split pass is an IR pass, which means that it outlines code at the IR level. This will prevent the register allocator from working across the boundary between hot and cold code, so I don't believe it has as much performance potential as splitting the function during code generation. Looking at the example, I believe GCC is using this strategy, it is not calling outlined code.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 6, 2021 at 2:17 AM chuanqi.xcq via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-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><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)">Hi,</span></div><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)"><br></span></div><div style="clear:both">IIRC, clang/llvm has HotColdSplit and partial inline passes which has similar functionality. However, these two passes are not enabled by default for some reasons.</div><div style="clear:both"><br></div><div style="clear:both">Thanks,</div><div style="clear:both">Chuanqi</div><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)"><br></span></div><blockquote style="margin-right:0px;margin-top:0px;margin-bottom:0px"><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)">------------------------------------------------------------------</span></div><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)">From:陈云星 via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span></div><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)">Send Time:2021年5月6日(星期四) 17:11</span></div><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)">To:cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span></div><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)">Subject:[cfe-dev] split hot and cold part of a function into separate function</span></div><div style="clear:both"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14px;color:rgb(0,0,0)"><br></span></div>currently, gcc support function attribute “cold”, which can hint compiler split caller function’s cold into two separate function, one is hot the other is cold.<div><br></div><div>One example is here: <a href="https://godbolt.org/z/j7sK4hd48" target="_blank">https://godbolt.org/z/j7sK4hd48</a></div><div><br></div><div>my question is Clang/llvm has such function/capability ?</div></blockquote><div><br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>