mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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
This commit is contained in:
@@ -143,26 +143,28 @@ void FunctionRepBuilder::initializeWorkList(Function *Func) {
|
||||
// the worklists...
|
||||
//
|
||||
for (Function::ArgumentListType::iterator I = Func->getArgumentList().begin(),
|
||||
E = Func->getArgumentList().end(); I != E; ++I)
|
||||
E = Func->getArgumentList().end(); I != E; ++I) {
|
||||
Value *Arg = (Value*)(*I);
|
||||
// Only process arguments that are of pointer type...
|
||||
if (PointerType *PT = dyn_cast<PointerType>((*I)->getType())) {
|
||||
ArgDSNode *Arg = new ArgDSNode(*I);
|
||||
ArgNodes.push_back(Arg);
|
||||
if (PointerType *PT = dyn_cast<PointerType>(Arg->getType())) {
|
||||
ArgDSNode *ArgNode = new ArgDSNode(*I);
|
||||
ArgNodes.push_back(ArgNode);
|
||||
|
||||
// Add a critical shadow value for it to represent what it is pointing
|
||||
// to and add this to the value map...
|
||||
ShadowDSNode *Shad = new ShadowDSNode(PT->getElementType(),
|
||||
Func->getParent(), true);
|
||||
ShadowNodes.push_back(Shad);
|
||||
ValueMap[*I].add(PointerVal(Shad), *I);
|
||||
ValueMap[Arg].add(PointerVal(Shad), Arg);
|
||||
|
||||
// The value of the argument is the shadow value...
|
||||
Arg->getLink(0).add(Shad);
|
||||
ArgNode->getLink(0).add(Shad);
|
||||
|
||||
// Make sure that all users of the argument are processed...
|
||||
addAllUsesToWorkList(*I);
|
||||
addAllUsesToWorkList(Arg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Iterate over the instructions in the method. Create nodes for malloc and
|
||||
// call instructions. Add all uses of these to the worklist of instructions
|
||||
// to process.
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/iMemory.h"
|
||||
#include "llvm/iOther.h"
|
||||
#include "llvm/Argument.h"
|
||||
#include "Support/STLExtras.h"
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
@@ -288,7 +289,7 @@ void CallDSNode::mapNode(map<const DSNode*, DSNode*> &NodeMap,
|
||||
MapPVS(ArgLinks[i], Old->ArgLinks[i], NodeMap);
|
||||
}
|
||||
|
||||
ArgDSNode::ArgDSNode(FunctionArgument *FA)
|
||||
ArgDSNode::ArgDSNode(Argument *FA)
|
||||
: DSNode(ArgNode, FA->getType()), FuncArg(FA) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user