From dfb3a2cd07da96e9052ddd27bfef0d39b4587682 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 22 Aug 2002 23:37:20 +0000 Subject: Eliminated the MemAccessInst class, folding contents into GEP class. llvm-svn: 3487 --- llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp') diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp index 914fec35762..294fdaec252 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp @@ -111,8 +111,8 @@ Value* FoldGetElemChain(const InstructionNode* getElemInstrNode, vector& chainIdxVec) { - MemAccessInst* getElemInst = (MemAccessInst*) - getElemInstrNode->getInstruction(); + GetElementPtrInst* getElemInst = + cast(getElemInstrNode->getInstruction()); // Return NULL if we don't fold any instructions in. Value* ptrVal = NULL; @@ -128,9 +128,9 @@ FoldGetElemChain(const InstructionNode* getElemInstrNode, ptrChild->getOpLabel() == GetElemPtrIdx) { // Child is a GetElemPtr instruction - getElemInst = cast(ptrChild->getValue()); - MemAccessInst::op_iterator OI, firstIdx = getElemInst->idx_begin(); - MemAccessInst::op_iterator lastIdx = getElemInst->idx_end(); + getElemInst = cast(ptrChild->getValue()); + User::op_iterator OI, firstIdx = getElemInst->idx_begin(); + User::op_iterator lastIdx = getElemInst->idx_end(); bool allConstantOffsets = true; // Check that all offsets are constant for this instruction -- cgit v1.2.3