aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-21 02:08:03 +0000
committerChris Lattner <sabre@nondot.org>2002-10-21 02:08:03 +0000
commit0969c50cb812efb9dba9577a58cad19c56c21642 (patch)
tree493b6c4071ffb22df02fd983b540583dced770dd /lib/Analysis/DataStructure/BottomUpClosure.cpp
parent0c8d73b74c04ef03c6ba2fb21ff48f9c23daf643 (diff)
- Make DSCallSite not inherit from std::vector. Renamed methods slightly.
Make copy ctor have two versions to avoid dealing with conditional template argument. DSCallSite ctor now takes all arguments instead of taking one and being populated later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/BottomUpClosure.cpp')
-rw-r--r--lib/Analysis/DataStructure/BottomUpClosure.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 89b6b01bf6..53b997f69a 100644
--- a/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp
@@ -66,7 +66,7 @@ static void ResolveArguments(DSCallSite &Call, Function &F,
// Add the link from the argument scalar to the provided value
DSNodeHandle &NN = ValueMap[AI];
- NN.addEdgeTo(Call.getPtrArgNode(i));
+ NN.addEdgeTo(Call.getPtrArg(i));
++AI;
}
}
@@ -100,12 +100,12 @@ DSGraph &BUDataStructures::calculateGraph(Function &F) {
DSCallSite Call = FCs[i];
// If the function list is complete...
- if ((Call.getCalleeNode().getNode()->NodeType & DSNode::Incomplete)==0) {
+ if ((Call.getCallee().getNode()->NodeType & DSNode::Incomplete)==0) {
// Start inlining all of the functions we can... some may not be
// inlinable if they are external...
//
std::vector<GlobalValue*> Callees =
- Call.getCalleeNode().getNode()->getGlobals();
+ Call.getCallee().getNode()->getGlobals();
// Loop over the functions, inlining whatever we can...
for (unsigned c = 0; c != Callees.size(); ++c) {
@@ -118,8 +118,8 @@ DSGraph &BUDataStructures::calculateGraph(Function &F) {
DEBUG(std::cerr << "\t[BU] Self Inlining: " << F.getName() << "\n");
// Handle the return value if present...
- if (Call.getReturnValueNode().getNode())
- Graph->getRetNode().mergeWith(Call.getReturnValueNode());
+ if (Call.getRetVal().getNode())
+ Graph->getRetNode().mergeWith(Call.getRetVal());
// Resolve the arguments in the call to the actual values...
ResolveArguments(Call, F, Graph->getValueMap());
@@ -162,8 +162,8 @@ DSGraph &BUDataStructures::calculateGraph(Function &F) {
// Resolve the arguments in the call to the actual values...
ResolveArguments(Call, FI, OldValMap);
- if (Call.getReturnValueNode().getNode()) // Handle the return value if present
- RetVal.mergeWith(Call.getReturnValueNode());
+ if (Call.getRetVal().getNode())// Handle the return value if present
+ RetVal.mergeWith(Call.getRetVal());
// Erase the entry in the Callees vector
Callees.erase(Callees.begin()+c--);
@@ -181,7 +181,8 @@ DSGraph &BUDataStructures::calculateGraph(Function &F) {
// Erase the call if it is resolvable...
FCs.erase(FCs.begin()+i--); // Don't skip a the next call...
Inlined = true;
- } else if (Callees.size() != Call.getCalleeNode().getNode()->getGlobals().size()) {
+ } else if (Callees.size() !=
+ Call.getCallee().getNode()->getGlobals().size()) {
// Was able to inline SOME, but not all of the functions. Construct a
// new global node here.
//