[llvm-commits] CVS: llvm/include/llvm/Analysis/DSSupport.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Feb 3 13:12:01 PST 2003
Changes in directory llvm/include/llvm/Analysis:
DSSupport.h updated: 1.10 -> 1.11
---
Log message:
Eliminate unused resolving caller stuff
---
Diffs of the changes:
Index: llvm/include/llvm/Analysis/DSSupport.h
diff -u llvm/include/llvm/Analysis/DSSupport.h:1.10 llvm/include/llvm/Analysis/DSSupport.h:1.11
--- llvm/include/llvm/Analysis/DSSupport.h:1.10 Fri Jan 31 22:51:53 2003
+++ llvm/include/llvm/Analysis/DSSupport.h Mon Feb 3 13:11:04 2003
@@ -47,6 +47,7 @@
class DSNodeHandle {
DSNode *N;
unsigned Offset;
+ void operator==(const DSNode *N); // DISALLOW, use to promote N to nodehandle
public:
// Allow construction, destruction, and assignment...
DSNodeHandle(DSNode *n = 0, unsigned offs = 0) : N(0), Offset(offs) {
@@ -103,19 +104,12 @@
/// DSCallSite - Representation of a call site via its call instruction,
/// the DSNode handle for the callee function (or function pointer), and
/// the DSNode handles for the function arguments.
-///
-/// One unusual aspect of this callsite record is the ResolvingCaller member.
-/// If this is non-null, then it indicates the function that allowed a call-site
-/// to finally be resolved. Because of indirect calls, this function may not
-/// actually be the function that contains the Call instruction itself. This is
-/// used by the BU and TD passes to communicate.
///
class DSCallSite {
CallInst *Inst; // Actual call site
DSNodeHandle RetVal; // Returned value
DSNodeHandle Callee; // The function node called
std::vector<DSNodeHandle> CallArgs; // The pointer arguments
- Function *ResolvingCaller; // See comments above
static void InitNH(DSNodeHandle &NH, const DSNodeHandle &Src,
const hash_map<const DSNode*, DSNode*> &NodeMap) {
@@ -146,14 +140,13 @@
///
DSCallSite(CallInst &inst, const DSNodeHandle &rv, const DSNodeHandle &callee,
std::vector<DSNodeHandle> &Args)
- : Inst(&inst), RetVal(rv), Callee(callee), ResolvingCaller(0) {
+ : Inst(&inst), RetVal(rv), Callee(callee) {
Args.swap(CallArgs);
}
DSCallSite(const DSCallSite &DSCS) // Simple copy ctor
: Inst(DSCS.Inst), RetVal(DSCS.RetVal),
- Callee(DSCS.Callee), CallArgs(DSCS.CallArgs),
- ResolvingCaller(DSCS.ResolvingCaller) {}
+ Callee(DSCS.Callee), CallArgs(DSCS.CallArgs) {}
/// Mapping copy constructor - This constructor takes a preexisting call site
/// to copy plus a map that specifies how the links should be transformed.
@@ -168,7 +161,6 @@
CallArgs.resize(FromCall.CallArgs.size());
for (unsigned i = 0, e = FromCall.CallArgs.size(); i != e; ++i)
InitNH(CallArgs[i], FromCall.CallArgs[i], NodeMap);
- ResolvingCaller = FromCall.ResolvingCaller;
}
// Accessor functions...
@@ -182,9 +174,6 @@
unsigned getNumPtrArgs() const { return CallArgs.size(); }
- Function *getResolvingCaller() const { return ResolvingCaller; }
- void setResolvingCaller(Function *F) { ResolvingCaller = F; }
-
DSNodeHandle &getPtrArg(unsigned i) {
assert(i < CallArgs.size() && "Argument to getPtrArgNode is out of range!");
return CallArgs[i];
@@ -200,7 +189,6 @@
std::swap(RetVal, CS.RetVal);
std::swap(Callee, CS.Callee);
std::swap(CallArgs, CS.CallArgs);
- std::swap(ResolvingCaller, CS.ResolvingCaller);
}
}
More information about the llvm-commits
mailing list