diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2020-03-24 09:23:26 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2020-03-24 09:41:16 -0700 |
commit | c3417592c847b8bd67deab21bbe6d62a49bde234 (patch) | |
tree | 21ec264c19f000dfe7854315f37cf93a4804d39c /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | 9ca6334c336b0ca270e06e988d5bcb267e2f1f94 (diff) | |
download | llvm-c3417592c847b8bd67deab21bbe6d62a49bde234.zip llvm-c3417592c847b8bd67deab21bbe6d62a49bde234.tar.gz llvm-c3417592c847b8bd67deab21bbe6d62a49bde234.tar.bz2 |
Revert "Include static prof data when collecting loop BBs"
This reverts commit 129c911efaa492790c251b3eb18e4db36b55cbc5.
Due to an internal benchmark regression.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 5ce4390..3149151 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -2506,14 +2506,9 @@ MachineBlockPlacement::collectLoopBlockSet(const MachineLoop &L) { // its frequency and the frequency of the loop block. When it is too small, // don't add it to the loop chain. If there are outer loops, then this block // will be merged into the first outer loop chain for which this block is not - // cold anymore. - // - // If a block uses static profiling data (e.g. from '__builtin_expect()'), - // then the programmer is explicitly telling us which paths are hot and cold. - // There's no reason for the compiler to believe otherwise, unless - // '-fprofile-use' is specified. - if (F->getFunction().hasProfileData() || ForceLoopColdBlock || - L.hasStaticProfInfo()) { + // cold anymore. This needs precise profile data and we only do this when + // profile data is available. + if (F->getFunction().hasProfileData() || ForceLoopColdBlock) { BlockFrequency LoopFreq(0); for (auto LoopPred : L.getHeader()->predecessors()) if (!L.contains(LoopPred)) |