From 37efc9fe42a4867c81526cac7fca9fe0ea04a484 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 2 Nov 2011 07:17:12 +0000 Subject: Begin collecting some of the statistics for block placement discussed on the mailing list. Suggestions for other statistics to collect would be awesome. =] Currently these are implemented as a separate pass guarded by a separate flag. I'm not thrilled by that, but I wanted to be able to collect the statistics for the old code placement as well as the new in order to have a point of comparison. I'm planning on folding them into the single pass if / when there is only one pass of interest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143537 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/Passes.h | 5 +++++ include/llvm/InitializePasses.h | 1 + 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index 7d0c412a1b..bf440f4ccf 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -159,6 +159,11 @@ namespace llvm { /// probabilities. FunctionPass *createMachineBlockPlacementPass(); + /// MachineBlockPlacementStats Pass - This pass collects statistics about the + /// basic block placement using branch probabilities and block frequency + /// information. + FunctionPass *createMachineBlockPlacementStatsPass(); + /// Code Placement Pass - This pass optimize code placement and aligns loop /// headers to target specific alignment boundary. FunctionPass *createCodePlacementOptPass(); diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index b5344fccf8..47a7779608 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -147,6 +147,7 @@ void initializeLowerInvokePass(PassRegistry&); void initializeLowerSwitchPass(PassRegistry&); void initializeMachineBlockFrequencyInfoPass(PassRegistry&); void initializeMachineBlockPlacementPass(PassRegistry&); +void initializeMachineBlockPlacementStatsPass(PassRegistry&); void initializeMachineBranchProbabilityInfoPass(PassRegistry&); void initializeMachineCSEPass(PassRegistry&); void initializeMachineDominatorTreePass(PassRegistry&); -- cgit v1.2.3