<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">are there some example ?<div class=""><span style="color: rgb(36, 39, 41); font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-variant-ligatures: normal; orphans: 2; white-space: pre-wrap; widows: 2; background-color: rgb(228, 230, 232); text-decoration-thickness: initial;" class="">And this option -hot-cold-split need profile data ?</span><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">2021年5月6日 下午5:16,chuanqi.xcq <<a href="mailto:yedeng.yd@linux.alibaba.com" class="">yedeng.yd@linux.alibaba.com</a>> 写道:</div><br class="Apple-interchange-newline"><div class=""><div class="__aliyun_email_body_block"><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">Hi,</span></div><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class=""><br class=""></span></div><div style="clear:both;" class="">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;" class=""><br class=""></div><div style="clear:both;" class="">Thanks,</div><div style="clear:both;" class="">Chuanqi</div><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class=""><br class=""></span></div><blockquote style="margin-right:0;margin-top:0;margin-bottom:0;" class=""><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">------------------------------------------------------------------</span></div><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">From:陈云星 via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>></span></div><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">Send Time:2021年5月6日(星期四) 17:11</span></div><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">To:cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>></span></div><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">Subject:[cfe-dev] split hot and cold part of a function into separate function</span></div><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class=""><br class=""></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 class=""><br class=""></div><div class="">One example is here: <a class="" href="https://godbolt.org/z/j7sK4hd48" target="_blank">https://godbolt.org/z/j7sK4hd48</a></div><div class=""><br class=""></div><div class="">my question is Clang/llvm has such function/capability ?</div></blockquote><div class=""><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>