forked from OSchip/llvm-project
parent
db98a9745a
commit
68c3caccb1
|
@ -29,7 +29,7 @@
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
RegisterAnalysis<EquivClassGraphs> X("equivdatastructure",
|
RegisterAnalysis<EquivClassGraphs> X("eqdatastructure",
|
||||||
"Equivalence-class Bottom-up Data Structure Analysis");
|
"Equivalence-class Bottom-up Data Structure Analysis");
|
||||||
Statistic<> NumEquivBUInlines("equivdatastructures",
|
Statistic<> NumEquivBUInlines("equivdatastructures",
|
||||||
"Number of graphs inlined");
|
"Number of graphs inlined");
|
||||||
|
@ -58,7 +58,7 @@ static void CheckAllGraphs(Module *M, GT &ECGraphs) {
|
||||||
|
|
||||||
// getSomeCalleeForCallSite - Return any one callee function at a call site.
|
// getSomeCalleeForCallSite - Return any one callee function at a call site.
|
||||||
//
|
//
|
||||||
Function *EquivClassGraphs:: getSomeCalleeForCallSite(const CallSite &CS) const{
|
Function *EquivClassGraphs::getSomeCalleeForCallSite(const CallSite &CS) const{
|
||||||
Function *thisFunc = CS.getCaller();
|
Function *thisFunc = CS.getCaller();
|
||||||
assert(thisFunc && "getSomeCalleeForCallSite(): Not a valid call site?");
|
assert(thisFunc && "getSomeCalleeForCallSite(): Not a valid call site?");
|
||||||
DSGraph &DSG = getDSGraph(*thisFunc);
|
DSGraph &DSG = getDSGraph(*thisFunc);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Analysis/DataStructure/DataStructure.h"
|
#include "llvm/Analysis/DataStructure/DataStructure.h"
|
||||||
|
#include "llvm/Analysis/DataStructure/EquivClassGraphs.h"
|
||||||
#include "llvm/Analysis/DataStructure/DSGraph.h"
|
#include "llvm/Analysis/DataStructure/DSGraph.h"
|
||||||
#include "llvm/Analysis/DataStructure/DSGraphTraits.h"
|
#include "llvm/Analysis/DataStructure/DSGraphTraits.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Module.h"
|
||||||
|
@ -333,3 +334,8 @@ void CompleteBUDataStructures::print(std::ostream &O, const Module *M) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void EquivClassGraphs::print(std::ostream &O, const Module *M) const {
|
||||||
|
if (DontPrintAnything) return;
|
||||||
|
printCollection(*this, O, M, "eq.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue