diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-06-25 13:34:40 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-06-25 13:34:40 +0000 |
commit | 75b51621540c23ddfc1e9ef6b4dc803453d9d122 (patch) | |
tree | af6b6ccad18756a9c96e2917fa58b68c4b391eaf /include/llvm | |
parent | 1bc147c0910bb02398730c79e0d0310ffbbd2868 (diff) | |
download | external_llvm-75b51621540c23ddfc1e9ef6b4dc803453d9d122.zip external_llvm-75b51621540c23ddfc1e9ef6b4dc803453d9d122.tar.gz external_llvm-75b51621540c23ddfc1e9ef6b4dc803453d9d122.tar.bz2 |
BlockFrequency: Bump up the entry frequency a bit.
This is a band-aid to fix the most severe regressions we're seeing from basing
spill decisions on block frequencies, until we have a better solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Analysis/BlockFrequencyImpl.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/BlockFrequencyInfo.h | 8 | ||||
-rw-r--r-- | include/llvm/Support/BlockFrequency.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Analysis/BlockFrequencyImpl.h b/include/llvm/Analysis/BlockFrequencyImpl.h index b3e2d18..d555e0e 100644 --- a/include/llvm/Analysis/BlockFrequencyImpl.h +++ b/include/llvm/Analysis/BlockFrequencyImpl.h @@ -33,7 +33,7 @@ class BlockFrequencyInfo; class MachineBlockFrequencyInfo; /// BlockFrequencyImpl implements block frequency algorithm for IR and -/// Machine Instructions. Algorithm starts with value 1024 (START_FREQ) +/// Machine Instructions. Algorithm starts with value ENTRY_FREQ /// for the entry block and then propagates frequencies using branch weights /// from (Machine)BranchProbabilityInfo. LoopInfo is not required because /// algorithm can find "backedges" by itself. diff --git a/include/llvm/Analysis/BlockFrequencyInfo.h b/include/llvm/Analysis/BlockFrequencyInfo.h index fcab906..267e43b 100644 --- a/include/llvm/Analysis/BlockFrequencyInfo.h +++ b/include/llvm/Analysis/BlockFrequencyInfo.h @@ -43,10 +43,10 @@ public: void print(raw_ostream &O, const Module *M) const; /// getblockFreq - Return block frequency. Return 0 if we don't have the - /// information. Please note that initial frequency is equal to 1024. It means - /// that we should not rely on the value itself, but only on the comparison to - /// the other block frequencies. We do this to avoid using of floating points. - /// + /// information. Please note that initial frequency is equal to ENTRY_FREQ. It + /// means that we should not rely on the value itself, but only on the + /// comparison to the other block frequencies. We do this to avoid using of + /// floating points. BlockFrequency getBlockFreq(const BasicBlock *BB) const; }; diff --git a/include/llvm/Support/BlockFrequency.h b/include/llvm/Support/BlockFrequency.h index 77b1bf4..85e9437 100644 --- a/include/llvm/Support/BlockFrequency.h +++ b/include/llvm/Support/BlockFrequency.h @@ -25,7 +25,7 @@ class BranchProbability; class BlockFrequency { uint64_t Frequency; - static const int64_t ENTRY_FREQ = 1024; + static const int64_t ENTRY_FREQ = 1 << 14; public: BlockFrequency(uint64_t Freq = 0) : Frequency(Freq) { } |