mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
More ProfileInfo improvements.
- Part of optimal static profiling patch sequence by Andreas Neustifter. - Store edge, block, and function information separately for each functions (instead of in one giant map). - Return frequencies as double instead of int, and use a sentinel value for missing information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -127,13 +127,13 @@ void BlockPlacement::PlaceBlocks(BasicBlock *BB) {
|
||||
/*empty*/;
|
||||
if (SI == E) return; // No more successors to place.
|
||||
|
||||
unsigned MaxExecutionCount = PI->getExecutionCount(*SI);
|
||||
double MaxExecutionCount = PI->getExecutionCount(*SI);
|
||||
BasicBlock *MaxSuccessor = *SI;
|
||||
|
||||
// Scan for more frequently executed successors
|
||||
for (; SI != E; ++SI)
|
||||
if (!PlacedBlocks.count(*SI)) {
|
||||
unsigned Count = PI->getExecutionCount(*SI);
|
||||
double Count = PI->getExecutionCount(*SI);
|
||||
if (Count > MaxExecutionCount ||
|
||||
// Prefer to not disturb the code.
|
||||
(Count == MaxExecutionCount && *SI == &*InsertPos)) {
|
||||
|
Reference in New Issue
Block a user