-//===-- InstLoops.cpp ---------------------------------------- ---*- C++ -*--=//
+//===-- CombineBranch.cpp ------------------------------------ ---*- C++ -*--=//
// Pass to instrument loops
//
// At every backedge, insert a counter for that backedge and a call function
//===----------------------------------------------------------------------===//
-#include "llvm/Reoptimizer/InstLoops.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Support/CFG.h"
#include "llvm/Constants.h"
RegisterOpt<CombineBranches> X("branch-combine", "Multiple backedges going to same target are merged");
}
-// Create a new pass to merge branches
-//
-Pass *createCombineBranchesPass() {
- return new CombineBranches();
-}
-
-
//helper function to get back edges: it is called by
//the "getBackEdges" function below
void CombineBranches::getBackEdgesVisit(BasicBlock *u,
// At every backedge, insert a counter for that backedge and a call function
//===----------------------------------------------------------------------===//
-#include "llvm/Reoptimizer/InstLoops.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Support/CFG.h"
#include "llvm/Constants.h"
RegisterOpt<InstLoops> X("instloops", "Instrument backedges for profiling");
}
-// createInstLoopsPass - Create a new pass to add path profiling
-//
-Pass *createInstLoopsPass() {
- return new InstLoops();
-}
-
-
//helper function to get back edges: it is called by
//the "getBackEdges" function below
void InstLoops::getBackEdgesVisit(BasicBlock *u,