[HotColdSplit] Mark inherently cold functions as such
authorVedant Kumar <vsk@apple.com>
Sat, 19 Jan 2019 02:38:47 +0000 (02:38 +0000)
committerVedant Kumar <vsk@apple.com>
Sat, 19 Jan 2019 02:38:47 +0000 (02:38 +0000)
commitb755a2df5123a2b970733c43c9e65326b73d99c7
treed282623aaf63c92817a9696a7cfb2d7391e15b4b
parent4de1962bb9110ab48b0cd95a5d1db17a4653a700
[HotColdSplit] Mark inherently cold functions as such

If an inherently cold function is found, mark it as cold. For now this
means applying the `cold` and `minsize` attributes.

As a drive-by, revisit and clean up the criteria for considering a
function for splitting. Add tests.

llvm-svn: 351623
llvm/lib/Transforms/IPO/HotColdSplitting.cpp
llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll
llvm/test/Transforms/HotColdSplit/addr-taken.ll [new file with mode: 0644]
llvm/test/Transforms/HotColdSplit/minsize.ll