mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Converted MaximumSpanningTree algorithm to a generic template, this could go
into llvm/ADT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Analysis/ProfileInfo.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
@ -131,7 +132,8 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) {
|
||||
ProfileInfo::EdgeWeights ECs =
|
||||
getAnalysisID<ProfileInfo>(ProfileEstimatorPassID, *F).getEdgeWeights(F);
|
||||
std::vector<ProfileInfo::EdgeWeight> EdgeVector(ECs.begin(), ECs.end());
|
||||
MaximumSpanningTree MST = MaximumSpanningTree(EdgeVector);
|
||||
MaximumSpanningTree<BasicBlock> MST (EdgeVector);
|
||||
std::stable_sort(MST.begin(),MST.end());
|
||||
|
||||
// Check if (0,entry) not in the MST. If not, instrument edge
|
||||
// (IncrementCounterInBlock()) and set the counter initially to zero, if
|
||||
|
Reference in New Issue
Block a user