[llvm-commits] CVS: llvm/include/llvm/Instructions.h
Chris Lattner
lattner at cs.uiuc.edu
Mon May 2 22:43:32 PDT 2005
Changes in directory llvm/include/llvm:
Instructions.h updated: 1.16 -> 1.17
---
Log message:
add direct support for making GEP instrs with one index
---
Diffs of the changes: (+8 -2)
Instructions.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.16 llvm/include/llvm/Instructions.h:1.17
--- llvm/include/llvm/Instructions.h:1.16 Thu Apr 21 15:11:51 2005
+++ llvm/include/llvm/Instructions.h Tue May 3 00:43:14 2005
@@ -300,6 +300,7 @@
}
void init(Value *Ptr, const std::vector<Value*> &Idx);
void init(Value *Ptr, Value *Idx0, Value *Idx1);
+ void init(Value *Ptr, Value *Idx);
public:
/// Constructors - Create a getelementptr instruction with a base pointer an
/// list of indices. The first ctor can optionally insert before an existing
@@ -310,8 +311,12 @@
GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx,
const std::string &Name, BasicBlock *InsertAtEnd);
- /// Constructors - These two constructors are convenience methods because two
- /// index getelementptr instructions are so common.
+ /// Constructors - These two constructors are convenience methods because one
+ /// and two index getelementptr instructions are so common.
+ GetElementPtrInst(Value *Ptr, Value *Idx,
+ const std::string &Name = "", Instruction *InsertBefore =0);
+ GetElementPtrInst(Value *Ptr, Value *Idx,
+ const std::string &Name, BasicBlock *InsertAtEnd);
GetElementPtrInst(Value *Ptr, Value *Idx0, Value *Idx1,
const std::string &Name = "", Instruction *InsertBefore =0);
GetElementPtrInst(Value *Ptr, Value *Idx0, Value *Idx1,
@@ -336,6 +341,7 @@
bool AllowStructLeaf = false);
static const Type *getIndexedType(const Type *Ptr, Value *Idx0, Value *Idx1,
bool AllowStructLeaf = false);
+ static const Type *getIndexedType(const Type *Ptr, Value *Idx);
inline op_iterator idx_begin() { return op_begin()+1; }
inline const_op_iterator idx_begin() const { return op_begin()+1; }
More information about the llvm-commits
mailing list