Make block and function count available via ProfileInfo.

- Part of optimal static profiling patch sequence by Andreas Neustifter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78247 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-08-05 21:51:16 +00:00
parent b341577401
commit c9008c5cc7
4 changed files with 28 additions and 10 deletions

View File

@@ -42,6 +42,12 @@ namespace llvm {
// BasicBlock to the entry block to indicate how many times the function was
// entered.
std::map<Edge, unsigned> EdgeCounts;
// BlockCounts - Count the number of times a block is executed.
std::map<const BasicBlock*, unsigned> BlockCounts;
// FunctionCounts - Count the number of times a function is executed.
std::map<const Function*, unsigned> FunctionCounts;
public:
static char ID; // Class identification, replacement for typeinfo
virtual ~ProfileInfo(); // We want to be subclassed