mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
[block-freq] Begin move of BlockFrequency::EntryFreq -> BlockFrequencyImpl::EntryFreq.
This is a property associated with a function, not with BlockFrequency data. Additionally it loosens the artifical requirement that the entry frequency arbitrarily be the same for every function. There is a series of patches forthcoming updating various code that uses the old way of getting a block frequency to the new location. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,7 +48,7 @@ class BlockFrequencyImpl {
|
|||||||
|
|
||||||
typedef GraphTraits< Inverse<BlockT *> > GT;
|
typedef GraphTraits< Inverse<BlockT *> > GT;
|
||||||
|
|
||||||
const uint32_t EntryFreq;
|
static const uint64_t EntryFreq = 1 << 14;
|
||||||
|
|
||||||
std::string getBlockName(BasicBlock *BB) const {
|
std::string getBlockName(BasicBlock *BB) const {
|
||||||
return BB->getName().str();
|
return BB->getName().str();
|
||||||
@@ -263,7 +263,7 @@ class BlockFrequencyImpl {
|
|||||||
friend class BlockFrequencyInfo;
|
friend class BlockFrequencyInfo;
|
||||||
friend class MachineBlockFrequencyInfo;
|
friend class MachineBlockFrequencyInfo;
|
||||||
|
|
||||||
BlockFrequencyImpl() : EntryFreq(BlockFrequency::getEntryFrequency()) { }
|
BlockFrequencyImpl() { }
|
||||||
|
|
||||||
void doFunction(FunctionT *fn, BlockProbInfoT *bpi) {
|
void doFunction(FunctionT *fn, BlockProbInfoT *bpi) {
|
||||||
Fn = fn;
|
Fn = fn;
|
||||||
@@ -312,6 +312,9 @@ class BlockFrequencyImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
uint64_t getEntryFrequency() { return EntryFreq; }
|
||||||
|
|
||||||
/// getBlockFreq - Return block frequency. Return 0 if we don't have it.
|
/// getBlockFreq - Return block frequency. Return 0 if we don't have it.
|
||||||
BlockFrequency getBlockFreq(const BlockT *BB) const {
|
BlockFrequency getBlockFreq(const BlockT *BB) const {
|
||||||
typename DenseMap<const BlockT *, BlockFrequency>::const_iterator
|
typename DenseMap<const BlockT *, BlockFrequency>::const_iterator
|
||||||
|
Reference in New Issue
Block a user