diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-09 19:48:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-09 19:48:49 +0000 |
commit | 73e214244f2403b5ba0ef81b8839600f3c8ffebc (patch) | |
tree | 245e635c686ace9b5ebbcaf39d622a92f9db594e /lib/Transforms | |
parent | b62fc4a9b11662ec2c5fa190b513eae0a0810ce1 (diff) |
Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/InlineSimple.cpp | 1 | ||||
-rw-r--r-- | lib/Transforms/IPO/MutateStructTypes.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/IPO/OldPoolAllocate.cpp | 7 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/TraceValues.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/InductionVars.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/Linker.cpp | 5 |
7 files changed, 15 insertions, 12 deletions
diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index 461f5974f4..0a58eab83c 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -23,6 +23,7 @@ #include "llvm/iPHINode.h" #include "llvm/iOther.h" #include "llvm/Type.h" +#include "llvm/Argument.h" #include <algorithm> #include <map> #include <iostream> diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp index e06ee61412..fcad5fa050 100644 --- a/lib/Transforms/IPO/MutateStructTypes.cpp +++ b/lib/Transforms/IPO/MutateStructTypes.cpp @@ -22,6 +22,7 @@ #include "llvm/iMemory.h" #include "llvm/iTerminators.h" #include "llvm/iOther.h" +#include "llvm/Argument.h" #include "Support/STLExtras.h" #include <algorithm> using std::map; @@ -337,9 +338,8 @@ void MutateStructTypes::transformMethod(Function *m) { // Okay, first order of business, create the arguments... for (unsigned i = 0, e = M->getArgumentList().size(); i != e; ++i) { - const FunctionArgument *OFA = M->getArgumentList()[i]; - FunctionArgument *NFA = new FunctionArgument(ConvertType(OFA->getType()), - OFA->getName()); + const Argument *OFA = M->getArgumentList()[i]; + Argument *NFA = new Argument(ConvertType(OFA->getType()), OFA->getName()); NewMeth->getArgumentList().push_back(NFA); LocalValueMap[OFA] = NFA; // Keep track of value mapping } diff --git a/lib/Transforms/IPO/OldPoolAllocate.cpp b/lib/Transforms/IPO/OldPoolAllocate.cpp index 731e9e973f..4b5c830870 100644 --- a/lib/Transforms/IPO/OldPoolAllocate.cpp +++ b/lib/Transforms/IPO/OldPoolAllocate.cpp @@ -20,6 +20,7 @@ #include "llvm/ConstantVals.h" #include "llvm/Target/TargetData.h" #include "llvm/Support/InstVisitor.h" +#include "llvm/Argument.h" #include "Support/DepthFirstIterator.h" #include "Support/STLExtras.h" #include <algorithm> @@ -677,8 +678,8 @@ void PoolAllocate::transformFunction(TransformFunctionInfo &TFI, // Add arguments to the function... starting with all of the old arguments vector<Value*> ArgMap; for (unsigned i = 0, e = TFI.Func->getArgumentList().size(); i != e; ++i) { - const FunctionArgument *OFA = TFI.Func->getArgumentList()[i]; - FunctionArgument *NFA = new FunctionArgument(OFA->getType(),OFA->getName()); + const Argument *OFA = TFI.Func->getArgumentList()[i]; + Argument *NFA = new Argument(OFA->getType(), OFA->getName()); NewFunc->getArgumentList().push_back(NFA); ArgMap.push_back(NFA); // Keep track of the arguments } @@ -690,7 +691,7 @@ void PoolAllocate::transformFunction(TransformFunctionInfo &TFI, Name = "retpool"; else Name = ArgMap[TFI.ArgInfo[i].ArgNo]->getName(); // Get the arg name - FunctionArgument *NFA = new FunctionArgument(PoolTy, Name+".pool"); + Argument *NFA = new Argument(PoolTy, Name+".pool"); NewFunc->getArgumentList().push_back(NFA); } diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index 7f7321dbf0..20ad1d8cc9 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -257,7 +257,7 @@ static inline void InsertCodeToShowFunctionEntry(Function *M, Function *Printf){ unsigned ArgNo = 0; for (Function::ArgumentListType::const_iterator I = argList.begin(), E = argList.end(); I != E; ++I, ++ArgNo) { - InsertVerbosePrintInst(*I, BB, BBI, + InsertVerbosePrintInst((Value*)*I, BB, BBI, " Arg #" + utostr(ArgNo), Printf); } } diff --git a/lib/Transforms/Scalar/InductionVars.cpp b/lib/Transforms/Scalar/InductionVars.cpp index 55b227585b..9931a6b5d7 100644 --- a/lib/Transforms/Scalar/InductionVars.cpp +++ b/lib/Transforms/Scalar/InductionVars.cpp @@ -37,7 +37,7 @@ using std::cerr; // an interval invariant computation. // static bool isLoopInvariant(cfg::Interval *Int, Value *V) { - assert(isa<Constant>(V) || isa<Instruction>(V) || isa<FunctionArgument>(V)); + assert(isa<Constant>(V) || isa<Instruction>(V) || isa<Argument>(V)); if (!isa<Instruction>(V)) return true; // Constants and arguments are always loop invariant diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index b569a5366e..e6cf765e55 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -140,7 +140,7 @@ private: // getValueState - Return the InstVal object that corresponds to the value. // This function is neccesary because not all values should start out in the - // underdefined state... FunctionArgument's should be overdefined, and + // underdefined state... Argument's should be overdefined, and // constants should be marked as constants. If a value is not known to be an // Instruction object, then use this accessor to get its value from the map. // @@ -150,7 +150,7 @@ private: if (Constant *CPV = dyn_cast<Constant>(V)) { // Constants are constant ValueState[CPV].markConstant(CPV); - } else if (isa<FunctionArgument>(V)) { // FuncArgs are overdefined + } else if (isa<Argument>(V)) { // Arguments are overdefined ValueState[V].markOverdefined(); } // All others are underdefined by default... diff --git a/lib/Transforms/Utils/Linker.cpp b/lib/Transforms/Utils/Linker.cpp index 9637f747e2..086c6c6b28 100644 --- a/lib/Transforms/Utils/Linker.cpp +++ b/lib/Transforms/Utils/Linker.cpp @@ -18,6 +18,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/iOther.h" #include "llvm/ConstantVals.h" +#include "llvm/Argument.h" #include <iostream> using std::cerr; using std::string; @@ -301,10 +302,10 @@ static bool LinkFunctionBody(Function *Dest, const Function *Src, for (Function::ArgumentListType::const_iterator I = Src->getArgumentList().begin(), E = Src->getArgumentList().end(); I != E; ++I) { - const FunctionArgument *SMA = *I; + const Argument *SMA = *I; // Create the new method argument and add to the dest method... - FunctionArgument *DMA = new FunctionArgument(SMA->getType(),SMA->getName()); + Argument *DMA = new Argument(SMA->getType(), SMA->getName()); Dest->getArgumentList().push_back(DMA); // Add a mapping to our local map |