00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef LLVM_ANALYSIS_PROFILEINFOLOADER_H
00017 #define LLVM_ANALYSIS_PROFILEINFOLOADER_H
00018
00019 #include <vector>
00020 #include <string>
00021 #include <utility>
00022
00023 namespace llvm {
00024
00025 class Module;
00026 class Function;
00027 class BasicBlock;
00028
00029 class ProfileInfoLoader {
00030 const std::string &Filename;
00031 Module &M;
00032 std::vector<std::string> CommandLines;
00033 std::vector<unsigned> FunctionCounts;
00034 std::vector<unsigned> BlockCounts;
00035 std::vector<unsigned> EdgeCounts;
00036 std::vector<unsigned> OptimalEdgeCounts;
00037 std::vector<unsigned> BBTrace;
00038 bool Warned;
00039 public:
00040
00041
00042 ProfileInfoLoader(const char *ToolName, const std::string &Filename,
00043 Module &M);
00044
00045 static const unsigned Uncounted;
00046
00047 unsigned getNumExecutions() const { return CommandLines.size(); }
00048 const std::string &getExecution(unsigned i) const { return CommandLines[i]; }
00049
00050 const std::string &getFileName() const { return Filename; }
00051
00052
00053
00054
00055 const std::vector<unsigned> &getRawFunctionCounts() const {
00056 return FunctionCounts;
00057 }
00058
00059
00060
00061
00062 const std::vector<unsigned> &getRawBlockCounts() const {
00063 return BlockCounts;
00064 }
00065
00066
00067
00068
00069 const std::vector<unsigned> &getRawEdgeCounts() const {
00070 return EdgeCounts;
00071 }
00072
00073
00074
00075
00076 const std::vector<unsigned> &getRawOptimalEdgeCounts() const {
00077 return OptimalEdgeCounts;
00078 }
00079
00080 };
00081
00082 }
00083
00084 #endif