aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
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
commit65ea171409e8c25db20806fb09e820f46e3d11a2 (patch)
tree081a79420f9555f0962134e7cd6d1fd2696c93db /lib/CodeGen
parentc2ae4f6d3b72d153272b244fc1c8701ee89cbddb (diff)
Remove much cruft from the MemAccessInst instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/InstrSelection/InstrForest.cpp2
-rw-r--r--lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp
index d460bb77e2..f928683060 100644
--- a/lib/CodeGen/InstrSelection/InstrForest.cpp
+++ b/lib/CodeGen/InstrSelection/InstrForest.cpp
@@ -76,7 +76,7 @@ InstructionNode::InstructionNode(Instruction* I)
}
else if ((opLabel == Instruction::Load ||
opLabel == Instruction::GetElementPtr) &&
- ((MemAccessInst*)I)->getFirstOffsetIdx() > 0)
+ cast<MemAccessInst>(I)->hasIndices())
{
opLabel = opLabel + 100; // load/getElem with index vector
}
diff --git a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
index 0a6d7d331d..cb3f9a1582 100644
--- a/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
+++ b/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
@@ -117,7 +117,7 @@ FoldGetElemChain(const InstructionNode* getElemInstrNode,
getElemInstrNode->getInstruction();
// Initialize return values from the incoming instruction
- Value* ptrVal = getElemInst->getPtrOperand();
+ Value* ptrVal = getElemInst->getPointerOperand();
chainIdxVec = getElemInst->getIndices(); // copies index vector values
// Now chase the chain of getElementInstr instructions, if any
@@ -131,7 +131,7 @@ FoldGetElemChain(const InstructionNode* getElemInstrNode,
const vector<ConstPoolVal*>& idxVec = getElemInst->getIndices();
// Get the pointer value out of ptrChild and *prepend* its index vector
- ptrVal = getElemInst->getPtrOperand();
+ ptrVal = getElemInst->getPointerOperand();
chainIdxVec.insert(chainIdxVec.begin(), idxVec.begin(), idxVec.end());
ptrChild = ptrChild->leftChild();