mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Added a first-class representation for each call site that can be
used in the DS graphs. Essentially, what was vector<DSNodeHandle> before is now a DSCallSite with the same vector, plus pointers to the CallInst and the caller Function. The special-purpose class BUDataStructure::CallSite is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -61,12 +61,12 @@ namespace {
|
||||
vector<DSNode*> &Nodes;
|
||||
DSNodeHandle &RetNode; // Node that gets returned...
|
||||
map<Value*, DSNodeHandle> &ValueMap;
|
||||
vector<vector<DSNodeHandle> > &FunctionCalls;
|
||||
vector<DSCallSite> &FunctionCalls;
|
||||
|
||||
public:
|
||||
GraphBuilder(DSGraph &g, vector<DSNode*> &nodes, DSNodeHandle &retNode,
|
||||
map<Value*, DSNodeHandle> &vm,
|
||||
vector<vector<DSNodeHandle> > &fc)
|
||||
vector<DSCallSite> &fc)
|
||||
: G(g), Nodes(nodes), RetNode(retNode), ValueMap(vm), FunctionCalls(fc) {
|
||||
|
||||
// Create scalar nodes for all pointer arguments...
|
||||
@@ -356,8 +356,8 @@ void GraphBuilder::visitReturnInst(ReturnInst &RI) {
|
||||
|
||||
void GraphBuilder::visitCallInst(CallInst &CI) {
|
||||
// Add a new function call entry...
|
||||
FunctionCalls.push_back(vector<DSNodeHandle>());
|
||||
vector<DSNodeHandle> &Args = FunctionCalls.back();
|
||||
FunctionCalls.push_back(DSCallSite(G.getFunction(), CI));
|
||||
DSCallSite &Args = FunctionCalls.back();
|
||||
|
||||
// Set up the return value...
|
||||
if (isPointerType(CI.getType()))
|
||||
|
Reference in New Issue
Block a user