diff options
author | Andreas Neustifter <astifter-llvm@gmx.at> | 2009-09-09 12:48:26 +0000 |
---|---|---|
committer | Andreas Neustifter <astifter-llvm@gmx.at> | 2009-09-09 12:48:26 +0000 |
commit | 1f3b00272a4aa5a69bffb018bc449c84167b6bf8 (patch) | |
tree | 8c71742ddeb3610c49001fe9d01550c65457b818 /lib/Transforms | |
parent | d8b0630027ee12502ee16932ff22b865ed738594 (diff) | |
download | external_llvm-1f3b00272a4aa5a69bffb018bc449c84167b6bf8.zip external_llvm-1f3b00272a4aa5a69bffb018bc449c84167b6bf8.tar.gz external_llvm-1f3b00272a4aa5a69bffb018bc449c84167b6bf8.tar.bz2 |
Updated ProfileInfo to have clean seperation between different sentinels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp b/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp index cdaf5f1..b2e6747 100644 --- a/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp @@ -18,6 +18,7 @@ #include "llvm/Pass.h" #include "llvm/Analysis/Passes.h" #include "llvm/Analysis/ProfileInfo.h" +#include "llvm/Analysis/ProfileInfoLoader.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Debug.h" @@ -113,8 +114,8 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { NumEdgesInserted = 0; std::vector<Constant*> Initializer(NumEdges); - Constant* zeroc = ConstantInt::get(Int32, 0); - Constant* minusonec = ConstantInt::get(Int32, ProfileInfo::MissingValue); + Constant* Zero = ConstantInt::get(Int32, 0); + Constant* Uncounted = ConstantInt::get(Int32, ProfileInfoLoader::Uncounted); // Instrument all of the edges not in MST... unsigned i = 0; @@ -144,9 +145,9 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { if (!std::binary_search(MST.begin(), MST.end(), edge)) { printEdgeCounter(edge,entry,i); IncrementCounterInBlock(entry, i, Counters); NumEdgesInserted++; - Initializer[i++] = (zeroc); + Initializer[i++] = (Zero); } else{ - Initializer[i++] = (minusonec); + Initializer[i++] = (Uncounted); } // InsertedBlocks contains all blocks that were inserted for splitting an @@ -167,9 +168,9 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { if (!std::binary_search(MST.begin(), MST.end(), edge)) { printEdgeCounter(edge,BB,i); IncrementCounterInBlock(BB, i, Counters); NumEdgesInserted++; - Initializer[i++] = (zeroc); + Initializer[i++] = (Zero); } else{ - Initializer[i++] = (minusonec); + Initializer[i++] = (Uncounted); } } for (unsigned s = 0, e = TI->getNumSuccessors(); s != e; ++s) { @@ -195,9 +196,9 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { printEdgeCounter(edge,Succ,i); IncrementCounterInBlock(Succ, i, Counters); NumEdgesInserted++; } - Initializer[i++] = (zeroc); + Initializer[i++] = (Zero); } else { - Initializer[i++] = (minusonec); + Initializer[i++] = (Uncounted); } } } |