X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FProfileInfo.cpp;h=173de2c027915ec5325fea750515d05325c30f58;hb=4032eaf98c63b0fb1f2418a1cdc56b72bc76c329;hp=9704b43cf57e15bca27e0d430429ad114a774745;hpb=9875903799e292c3972a247675c8ad4ea2212b05;p=oota-llvm.git diff --git a/lib/Analysis/ProfileInfo.cpp b/lib/Analysis/ProfileInfo.cpp index 9704b43cf57..173de2c0279 100644 --- a/lib/Analysis/ProfileInfo.cpp +++ b/lib/Analysis/ProfileInfo.cpp @@ -24,11 +24,12 @@ #include using namespace llvm; -template<> -char llvm::ProfileInfoT::ID = 0; +namespace llvm { + template<> char ProfileInfoT::ID = 0; +} // Register the ProfileInfo interface, providing a nice name to refer to. -INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information"); +INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information", NoProfileInfo) namespace llvm { @@ -308,9 +309,9 @@ void ProfileInfoT:: removeEdge(oldedge); } -/// Replaces all occurences of RmBB in the ProfilingInfo with DestBB. +/// Replaces all occurrences of RmBB in the ProfilingInfo with DestBB. /// This checks all edges of the function the blocks reside in and replaces the -/// occurences of RmBB with DestBB. +/// occurrences of RmBB with DestBB. template<> void ProfileInfoT:: replaceAllUses(const BasicBlock *RmBB, const BasicBlock *DestBB) { @@ -811,7 +812,7 @@ void ProfileInfoT::repair(const Function *F) { } if (iw < 0) continue; - // Check the recieving end of the path if it can handle the flow. + // Check the receiving end of the path if it can handle the flow. double ow = getExecutionCount(Dest); Processed.clear(); for (succ_const_iterator NBB = succ_begin(BB), End = succ_end(BB); @@ -888,7 +889,7 @@ void ProfileInfoT::repair(const Function *F) { FI = Unvisited.begin(), FE = Unvisited.end(); while(FI != FE && !FoundPath) { const BasicBlock *BB = *FI; ++FI; - const BasicBlock *Dest; + const BasicBlock *Dest = 0; Path P; bool BackEdgeFound = false; for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB); @@ -1076,7 +1077,9 @@ raw_ostream& operator<<(raw_ostream &O, std::pair