summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-14 11:27:58 +0000
committerChris Lattner <sabre@nondot.org>2001-11-14 11:27:58 +0000
commit1237e86597b9a60388a7e08a34aaddae42a0df0c (patch)
treee19404004ee86be2a7ca59e098937f1c8ab6b26c /llvm/lib/Target/Sparc/SparcInstrSelection.cpp
parentafea660cb5f18318d47e69b5c8a29eed61758967 (diff)
downloadbcm5719-llvm-1237e86597b9a60388a7e08a34aaddae42a0df0c.tar.gz
bcm5719-llvm-1237e86597b9a60388a7e08a34aaddae42a0df0c.zip
Remove much cruft from the MemAccessInst instruction
llvm-svn: 1298
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcInstrSelection.cpp')
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrSelection.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
index 4feecbb1bd1..8966db2f3e4 100644
--- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
@@ -781,17 +781,16 @@ SetOperandsForMemInstr(MachineInstr* minstr,
// Use the pointer value and the index vector from the Mem instruction.
// If it is an array reference, get the array offset value.
//
- ptrVal = memInst->getPtrOperand();
+ ptrVal = memInst->getPointerOperand();
- const Type* opType =
- ((const PointerType*) ptrVal->getType())->getValueType();
+ const Type* opType = cast<PointerType>(ptrVal->getType())->getValueType();
if (opType->isArrayType())
{
assert((memInst->getNumOperands()
- == (unsigned) 1 + memInst->getFirstOffsetIdx())
+ == (unsigned) 1 + memInst->getFirstIndexOperandNumber())
&& "Array refs must be lowered before Instruction Selection");
- arrayOffsetVal = memInst->getOperand(memInst->getFirstOffsetIdx());
+ arrayOffsetVal = memInst->getOperand(memInst->getFirstIndexOperandNumber());
}
}
@@ -1835,7 +1834,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
GetElementPtrInst* getElemInst =
cast<GetElementPtrInst>(subtreeRoot->getInstruction());
const PointerType* ptrType =
- (const PointerType*) getElemInst->getPtrOperand()->getType();
+ cast<PointerType>(getElemInst->getPointerOperand()->getType());
if (! ptrType->getValueType()->isArrayType())
{// we don't need a separate instr
numInstr = 0; // don't forward operand!
OpenPOWER on IntegriCloud