Minor method rename
authorChris Lattner <sabre@nondot.org>
Sun, 4 Nov 2001 08:08:34 +0000 (08:08 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 4 Nov 2001 08:08:34 +0000 (08:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1119 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/iMemory.h
lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
lib/Target/SparcV9/SparcV9InstrSelection.cpp
lib/Transforms/Instrumentation/TraceValues.cpp
lib/Transforms/LevelRaise.cpp

index 7b522c5c50b5afe1bce1c6d3b10133f92431b5b0..f3ec30281da95dc5000f64271cefa9b0502e7d9e 100644 (file)
@@ -182,13 +182,13 @@ public:
                                    const vector<ConstPoolVal*> &Indices,
                                    bool AllowStructLeaf = false);
   
-  const vector<ConstPoolVal*>& getIndexVec() const { return indexVec; }
+  const vector<ConstPoolVal*> &getIndices() const { return indexVec; }
 
   inline bool hasIndices() const { return !indexVec.empty(); }
   
-  virtual ValuegetPtrOperand() = 0;
+  virtual Value *getPtrOperand() = 0;
   
-  virtual int  getFirstOffsetIdx() const = 0;
+  virtual int getFirstOffsetIdx() const = 0;
 };
 
 
@@ -197,7 +197,8 @@ public:
 //===----------------------------------------------------------------------===//
 
 class LoadInst : public MemAccessInst {
-  LoadInst(const LoadInst &LI) : MemAccessInst(LI.getType(), Load, LI.getIndexVec()) {
+  LoadInst(const LoadInst &LI) : MemAccessInst(LI.getType(), Load,
+                                               LI.getIndices()) {
     Operands.reserve(LI.Operands.size());
     for (unsigned i = 0, E = LI.Operands.size(); i != E; ++i)
       Operands.push_back(Use(LI.Operands[i], this));
@@ -207,10 +208,10 @@ public:
           const string &Name = "");
   LoadInst(Value *Ptr, const string &Name = "");
 
-  virtual Instructionclone() const { return new LoadInst(*this); }
-  virtual const char*  getOpcodeName() const { return "load"; }  
-  virtual Value*       getPtrOperand() { return this->getOperand(0); }
-  virtual int getFirstOffsetIdx() const { return (this->getNumOperands() > 1)? 1 : -1;}
+  virtual Instruction *clone() const { return new LoadInst(*this); }
+  virtual const char *getOpcodeName() const { return "load"; }  
+  virtual Value *getPtrOperand() { return this->getOperand(0); }
+  virtual int getFirstOffsetIdx() const { return (this->getNumOperands() > 1)? 1 : -1; }
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const LoadInst *) { return true; }
@@ -228,7 +229,8 @@ public:
 //===----------------------------------------------------------------------===//
 
 class StoreInst : public MemAccessInst {
-  StoreInst(const StoreInst &SI) : MemAccessInst(SI.getType(), Store, SI.getIndexVec()) {
+  StoreInst(const StoreInst &SI) : MemAccessInst(SI.getType(), Store,
+                                                 SI.getIndices()) {
     Operands.reserve(SI.Operands.size());
     for (unsigned i = 0, E = SI.Operands.size(); i != E; ++i)
       Operands.push_back(Use(SI.Operands[i], this));
@@ -242,7 +244,7 @@ public:
   virtual const char *getOpcodeName() const { return "store"; }  
   
   virtual bool hasSideEffects() const { return true; }
-  virtual Value*       getPtrOperand() { return this->getOperand(1); }
+  virtual Value *getPtrOperand() { return this->getOperand(1); }
   virtual int getFirstOffsetIdx() const { return (this->getNumOperands() > 2)? 2 : -1;}
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -262,7 +264,7 @@ public:
 
 class GetElementPtrInst : public MemAccessInst {
   GetElementPtrInst(const GetElementPtrInst &EPI)
-    : MemAccessInst(EPI.getType(), GetElementPtr, EPI.getIndexVec()) {
+    : MemAccessInst(EPI.getType(), GetElementPtr, EPI.getIndices()) {
     Operands.reserve(EPI.Operands.size());
     for (unsigned i = 0, E = EPI.Operands.size(); i != E; ++i)
       Operands.push_back(Use(EPI.Operands[i], this));
@@ -272,7 +274,7 @@ public:
                    const string &Name = "");
   virtual Instruction *clone() const { return new GetElementPtrInst(*this); }
   virtual const char *getOpcodeName() const { return "getelementptr"; }  
-  virtual Value*       getPtrOperand() { return this->getOperand(0); }
+  virtual Value *getPtrOperand() { return this->getOperand(0); }
   virtual int getFirstOffsetIdx() const { return (this->getNumOperands() > 1)? 1 : -1;}
   
   inline bool isArraySelector() const { return !isStructSelector(); }
index 400d5948d4f8335957ec943156ac1c94a10dc6d4..88fd4a41386c5e2cd21cfc79e6c978fbe261baec 100644 (file)
@@ -118,7 +118,7 @@ FoldGetElemChain(const InstructionNode* getElemInstrNode,
   
   // Initialize return values from the incoming instruction
   Value* ptrVal = getElemInst->getPtrOperand();
-  chainIdxVec = getElemInst->getIndexVec(); // copies index vector values
+  chainIdxVec = getElemInst->getIndices(); // copies index vector values
   
   // Now chase the chain of getElementInstr instructions, if any
   InstrTreeNode* ptrChild = getElemInstrNode->leftChild();
@@ -128,7 +128,7 @@ FoldGetElemChain(const InstructionNode* getElemInstrNode,
       // Child is a GetElemPtr instruction
       getElemInst = (MemAccessInst*)
        ((InstructionNode*) ptrChild)->getInstruction();
-      const vector<ConstPoolVal*>& idxVec = getElemInst->getIndexVec();
+      const vector<ConstPoolVal*>& idxVec = getElemInst->getIndices();
       
       // Get the pointer value out of ptrChild and *prepend* its index vector
       ptrVal = getElemInst->getPtrOperand();
index 400d5948d4f8335957ec943156ac1c94a10dc6d4..88fd4a41386c5e2cd21cfc79e6c978fbe261baec 100644 (file)
@@ -118,7 +118,7 @@ FoldGetElemChain(const InstructionNode* getElemInstrNode,
   
   // Initialize return values from the incoming instruction
   Value* ptrVal = getElemInst->getPtrOperand();
-  chainIdxVec = getElemInst->getIndexVec(); // copies index vector values
+  chainIdxVec = getElemInst->getIndices(); // copies index vector values
   
   // Now chase the chain of getElementInstr instructions, if any
   InstrTreeNode* ptrChild = getElemInstrNode->leftChild();
@@ -128,7 +128,7 @@ FoldGetElemChain(const InstructionNode* getElemInstrNode,
       // Child is a GetElemPtr instruction
       getElemInst = (MemAccessInst*)
        ((InstructionNode*) ptrChild)->getInstruction();
-      const vector<ConstPoolVal*>& idxVec = getElemInst->getIndexVec();
+      const vector<ConstPoolVal*>& idxVec = getElemInst->getIndices();
       
       // Get the pointer value out of ptrChild and *prepend* its index vector
       ptrVal = getElemInst->getPtrOperand();
index 4bcb9f5f10e339dbe39c292a6c837a87aafcedda..2533d1427f442450e5d6b8dfbcb29075c1d1e4d8 100644 (file)
@@ -719,7 +719,7 @@ SetOperandsForMemInstr(MachineInstr* minstr,
   // The major work here is to extract these for all 3 instruction types
   // and then call the common function SetMemOperands_Internal().
   // 
-  const vector<ConstPoolVal*>* idxVec = & memInst->getIndexVec();
+  const vector<ConstPoolVal*>* idxVec = &memInst->getIndices();
   vector<ConstPoolVal*>* newIdxVec = NULL;
   Value* ptrVal;
   Value* arrayOffsetVal = NULL;
index 3547b298c16e1062996e63f7af6b706962d131a5..06c8438f26f3f4a26be032a7805b1db3534295ae 100644 (file)
@@ -311,7 +311,7 @@ InsertLoadInst(StoreInst* storeInst,
                BasicBlock::iterator &BBI)
 {
   LoadInst* loadInst = new LoadInst(storeInst->getPtrOperand(),
-                                    storeInst->getIndexVec());
+                                    storeInst->getIndices());
   BBI = bb->getInstList().insert(BBI, loadInst) + 1;
   return loadInst;
 }
index b5f705689291049d1dc7565202238bc9079070ff..ff932b69123e2c522fbe51458de583c628e45a02 100644 (file)
@@ -250,7 +250,7 @@ static bool ExpressionConvertableToType(Value *V, const Type *Ty) {
     // index array.  If there are, check to see if removing them causes us to
     // get to the right type...
     //
-    vector<ConstPoolVal*> Indices = GEP->getIndexVec();
+    vector<ConstPoolVal*> Indices = GEP->getIndices();
     const Type *BaseType = GEP->getPtrOperand()->getType();
 
     while (Indices.size() &&
@@ -333,7 +333,7 @@ static Value *ConvertExpressionToType(Value *V, const Type *Ty) {
     // index array.  If there are, check to see if removing them causes us to
     // get to the right type...
     //
-    vector<ConstPoolVal*> Indices = GEP->getIndexVec();
+    vector<ConstPoolVal*> Indices = GEP->getIndices();
     const Type *BaseType = GEP->getPtrOperand()->getType();
     const Type *PVTy = cast<PointerType>(Ty)->getValueType();
     Res = 0;
@@ -709,7 +709,7 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
       PRINT_PEEPHOLE2("gep-store:in", GEP, SI);
       ReplaceInstWithInst(BB->getInstList(), BI,
                           SI = new StoreInst(Val, GEP->getPtrOperand(),
-                                             GEP->getIndexVec()));
+                                             GEP->getIndices()));
       PRINT_PEEPHOLE1("gep-store:out", SI);
       return true;
     }
@@ -757,7 +757,7 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
       PRINT_PEEPHOLE2("gep-load:in", GEP, LI);
       ReplaceInstWithInst(BB->getInstList(), BI,
                           LI = new LoadInst(GEP->getPtrOperand(),
-                                            GEP->getIndexVec()));
+                                            GEP->getIndices()));
       PRINT_PEEPHOLE1("gep-load:out", LI);
       return true;
     }