mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-07 20:40:28 +00:00
Add capability to set a preference of what call vector is printed to dot files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4672 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8d97ce857
commit
431412735b
@ -15,6 +15,7 @@
|
|||||||
class DSGraph {
|
class DSGraph {
|
||||||
Function *Func; // Func - The LLVM function this graph corresponds to
|
Function *Func; // Func - The LLVM function this graph corresponds to
|
||||||
DSGraph *GlobalsGraph; // Pointer to the common graph of global objects
|
DSGraph *GlobalsGraph; // Pointer to the common graph of global objects
|
||||||
|
bool PrintAuxCalls; // Should this graph print the Aux calls vector?
|
||||||
|
|
||||||
DSNodeHandle RetNode; // The node that gets returned...
|
DSNodeHandle RetNode; // The node that gets returned...
|
||||||
std::vector<DSNode*> Nodes;
|
std::vector<DSNode*> Nodes;
|
||||||
@ -57,6 +58,12 @@ public:
|
|||||||
DSGraph *getGlobalsGraph() const { return GlobalsGraph; }
|
DSGraph *getGlobalsGraph() const { return GlobalsGraph; }
|
||||||
void setGlobalsGraph(DSGraph *G) { GlobalsGraph = G; }
|
void setGlobalsGraph(DSGraph *G) { GlobalsGraph = G; }
|
||||||
|
|
||||||
|
// setPrintAuxCalls - If you call this method, the auxillary call vector will
|
||||||
|
// be printed instead of the standard call vector to the dot file.
|
||||||
|
//
|
||||||
|
void setPrintAuxCalls() { PrintAuxCalls = true; }
|
||||||
|
bool shouldPrintAuxCalls() const { return PrintAuxCalls; }
|
||||||
|
|
||||||
/// getNodes - Get a vector of all the nodes in the graph
|
/// getNodes - Get a vector of all the nodes in the graph
|
||||||
///
|
///
|
||||||
const std::vector<DSNode*> &getNodes() const { return Nodes; }
|
const std::vector<DSNode*> &getNodes() const { return Nodes; }
|
||||||
@ -85,6 +92,9 @@ public:
|
|||||||
std::vector<DSCallSite> &getAuxFunctionCalls() {
|
std::vector<DSCallSite> &getAuxFunctionCalls() {
|
||||||
return AuxFunctionCalls;
|
return AuxFunctionCalls;
|
||||||
}
|
}
|
||||||
|
const std::vector<DSCallSite> &getAuxFunctionCalls() const {
|
||||||
|
return AuxFunctionCalls;
|
||||||
|
}
|
||||||
|
|
||||||
/// getNodeForValue - Given a value that is used or defined in the body of the
|
/// getNodeForValue - Given a value that is used or defined in the body of the
|
||||||
/// current function, return the DSNode that it points to.
|
/// current function, return the DSNode that it points to.
|
||||||
@ -167,6 +177,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool isNodeDead(DSNode *N);
|
bool isNodeDead(DSNode *N);
|
||||||
|
|
||||||
|
public:
|
||||||
// removeTriviallyDeadNodes - After the graph has been constructed, this
|
// removeTriviallyDeadNodes - After the graph has been constructed, this
|
||||||
// method removes all unreachable nodes that are created because they got
|
// method removes all unreachable nodes that are created because they got
|
||||||
// merged with other nodes in the graph. This is used as the first step of
|
// merged with other nodes in the graph. This is used as the first step of
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
class DSGraph {
|
class DSGraph {
|
||||||
Function *Func; // Func - The LLVM function this graph corresponds to
|
Function *Func; // Func - The LLVM function this graph corresponds to
|
||||||
DSGraph *GlobalsGraph; // Pointer to the common graph of global objects
|
DSGraph *GlobalsGraph; // Pointer to the common graph of global objects
|
||||||
|
bool PrintAuxCalls; // Should this graph print the Aux calls vector?
|
||||||
|
|
||||||
DSNodeHandle RetNode; // The node that gets returned...
|
DSNodeHandle RetNode; // The node that gets returned...
|
||||||
std::vector<DSNode*> Nodes;
|
std::vector<DSNode*> Nodes;
|
||||||
@ -57,6 +58,12 @@ public:
|
|||||||
DSGraph *getGlobalsGraph() const { return GlobalsGraph; }
|
DSGraph *getGlobalsGraph() const { return GlobalsGraph; }
|
||||||
void setGlobalsGraph(DSGraph *G) { GlobalsGraph = G; }
|
void setGlobalsGraph(DSGraph *G) { GlobalsGraph = G; }
|
||||||
|
|
||||||
|
// setPrintAuxCalls - If you call this method, the auxillary call vector will
|
||||||
|
// be printed instead of the standard call vector to the dot file.
|
||||||
|
//
|
||||||
|
void setPrintAuxCalls() { PrintAuxCalls = true; }
|
||||||
|
bool shouldPrintAuxCalls() const { return PrintAuxCalls; }
|
||||||
|
|
||||||
/// getNodes - Get a vector of all the nodes in the graph
|
/// getNodes - Get a vector of all the nodes in the graph
|
||||||
///
|
///
|
||||||
const std::vector<DSNode*> &getNodes() const { return Nodes; }
|
const std::vector<DSNode*> &getNodes() const { return Nodes; }
|
||||||
@ -85,6 +92,9 @@ public:
|
|||||||
std::vector<DSCallSite> &getAuxFunctionCalls() {
|
std::vector<DSCallSite> &getAuxFunctionCalls() {
|
||||||
return AuxFunctionCalls;
|
return AuxFunctionCalls;
|
||||||
}
|
}
|
||||||
|
const std::vector<DSCallSite> &getAuxFunctionCalls() const {
|
||||||
|
return AuxFunctionCalls;
|
||||||
|
}
|
||||||
|
|
||||||
/// getNodeForValue - Given a value that is used or defined in the body of the
|
/// getNodeForValue - Given a value that is used or defined in the body of the
|
||||||
/// current function, return the DSNode that it points to.
|
/// current function, return the DSNode that it points to.
|
||||||
@ -167,6 +177,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool isNodeDead(DSNode *N);
|
bool isNodeDead(DSNode *N);
|
||||||
|
|
||||||
|
public:
|
||||||
// removeTriviallyDeadNodes - After the graph has been constructed, this
|
// removeTriviallyDeadNodes - After the graph has been constructed, this
|
||||||
// method removes all unreachable nodes that are created because they got
|
// method removes all unreachable nodes that are created because they got
|
||||||
// merged with other nodes in the graph. This is used as the first step of
|
// merged with other nodes in the graph. This is used as the first step of
|
||||||
|
Loading…
Reference in New Issue
Block a user