[cfe-dev] split hot and cold part of a function into separate function

chuanqi.xcq via cfe-dev cfe-dev at lists.llvm.org
Thu May 6 04:11:10 PDT 2021


Now if we use --hot-cold-split, the compiler would tell us `unsupported option`. So I can't find simple example from compiler explorer.
Here is the slides from the web: https://llvm.org/devmtg/2019-10/slides/Kumar-HotColdSplitting.pdf
BTW, may I ask what's the intention for the question? Do we find that it is a performance gap from clang and gcc?

Thanks,
Chuanqi


------------------------------------------------------------------
From:陈云星 <chen.yunxing at me.com>
Send Time:2021年5月6日(星期四) 17:49
To:chuanqi.xcq <yedeng.yd at linux.alibaba.com>
Cc:cfe-dev <cfe-dev at lists.llvm.org>
Subject:Re: [cfe-dev] split hot and cold part of a function into separate function

are there some example ?
And this option -hot-cold-split need profile data ?

2021年5月6日 下午5:16,chuanqi.xcq <yedeng.yd at linux.alibaba.com> 写道:
Hi,

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.

Thanks,
Chuanqi

------------------------------------------------------------------
From:陈云星 via cfe-dev <cfe-dev at lists.llvm.org>
Send Time:2021年5月6日(星期四) 17:11
To:cfe-dev <cfe-dev at lists.llvm.org>
Subject:[cfe-dev] split hot and cold part of a function into separate function

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.

One example is here: https://godbolt.org/z/j7sK4hd48

my question is Clang/llvm has such function/capability ?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210506/c478fc42/attachment-0001.html>


More information about the cfe-dev mailing list