mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
ADd support for printing eqgraphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20582 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bc341e616e
commit
adfd5f14b4
@ -29,7 +29,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
RegisterAnalysis<EquivClassGraphs> X("equivdatastructure",
|
||||
RegisterAnalysis<EquivClassGraphs> X("eqdatastructure",
|
||||
"Equivalence-class Bottom-up Data Structure Analysis");
|
||||
Statistic<> NumEquivBUInlines("equivdatastructures",
|
||||
"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.
|
||||
//
|
||||
Function *EquivClassGraphs:: getSomeCalleeForCallSite(const CallSite &CS) const{
|
||||
Function *EquivClassGraphs::getSomeCalleeForCallSite(const CallSite &CS) const{
|
||||
Function *thisFunc = CS.getCaller();
|
||||
assert(thisFunc && "getSomeCalleeForCallSite(): Not a valid call site?");
|
||||
DSGraph &DSG = getDSGraph(*thisFunc);
|
||||
|
@ -12,6 +12,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/DataStructure/DataStructure.h"
|
||||
#include "llvm/Analysis/DataStructure/EquivClassGraphs.h"
|
||||
#include "llvm/Analysis/DataStructure/DSGraph.h"
|
||||
#include "llvm/Analysis/DataStructure/DSGraphTraits.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
Block a user