OSDN Git Service

[HotColdSplit] Calculate BFI lazily to reduce compile-time, NFC
authorVedant Kumar <vsk@apple.com>
Tue, 22 Jan 2019 22:49:22 +0000 (22:49 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 22 Jan 2019 22:49:22 +0000 (22:49 +0000)
commit4c9ad6d8f1fd0b7061ce6876030efc09cd744601
treed0b27b654a93d3beb91945640b8cd7b1997feec8
parent18729a48b8a5d3d9a414ed97a08a500f7da3b415
[HotColdSplit] Calculate BFI lazily to reduce compile-time, NFC

The splitting pass does not need BFI unless the Module actually has a profile
summary. Do not calcualte BFI unless the summary is present.

For the sqlite3 amalgamation, this reduces time spent in the splitting pass
from 0.4% of the total to under 0.1%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351894 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/HotColdSplitting.cpp