[llvm-commits] [llvm] r50480 - in /llvm/branches/ggreif/use-diet: include/llvm/Instructions.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Reader/BitcodeReader.h lib/VMCore/Instructions.cpp
Gabor Greif
ggreif at gmail.com
Wed Apr 30 05:35:28 PDT 2008
Author: ggreif
Date: Wed Apr 30 07:35:27 2008
New Revision: 50480
URL: http://llvm.org/viewvc/llvm-project?rev=50480&view=rev
Log:
some review feedback from Chris
Modified:
llvm/branches/ggreif/use-diet/include/llvm/Instructions.h
llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h
llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp
Modified: llvm/branches/ggreif/use-diet/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/include/llvm/Instructions.h?rev=50480&r1=50479&r2=50480&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/include/llvm/Instructions.h (original)
+++ llvm/branches/ggreif/use-diet/include/llvm/Instructions.h Wed Apr 30 07:35:27 2008
@@ -376,7 +376,7 @@
/// access elements of arrays and structs
///
class GetElementPtrInst : public Instruction {
- inline GetElementPtrInst(const GetElementPtrInst &GEPI);
+ GetElementPtrInst(const GetElementPtrInst &GEPI);
void init(Value *Ptr, Value* const *Idx, unsigned NumIdx);
void init(Value *Ptr, Value *Idx);
@@ -472,8 +472,8 @@
return new(Values) GetElementPtrInst(Ptr, IdxBegin, IdxEnd, Values, Name, InsertAtEnd);
}
- /// Constructors - These two constructors are convenience methods because one
- /// and two index getelementptr instructions are so common.
+ /// Constructors - These two creators are convenience methods because one
+ /// index getelementptr instructions are so common.
static GetElementPtrInst *Create(Value *Ptr, Value *Idx,
const std::string &Name = "", Instruction *InsertBefore = 0) {
return new(2) GetElementPtrInst(Ptr, Idx, Name, InsertBefore);
@@ -558,16 +558,6 @@
struct OperandTraits<GetElementPtrInst> : VariadicOperandTraits<1> {
};
-GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
- : Instruction(reinterpret_cast<const Type*>(GEPI.getType()), GetElementPtr,
- OperandTraits<GetElementPtrInst>::op_end(this) - GEPI.getNumOperands(),
- GEPI.getNumOperands()) {
- Use *OL = OperandList;
- Use *GEPIOL = GEPI.OperandList;
- for (unsigned i = 0, E = NumOperands; i != E; ++i)
- OL[i].init(GEPIOL[i], this);
-}
-
template<typename InputIterator>
GetElementPtrInst::GetElementPtrInst(Value *Ptr,
InputIterator IdxBegin,
@@ -1099,9 +1089,6 @@
}
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CallInst, Value)
-//void CallInst::operator delete(void *it) {
-// OperandTraits<CallInst>::op_begin(static_cast<CallInst*>(it));
-//}
//===----------------------------------------------------------------------===//
// SelectInst Class
Modified: llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp?rev=50480&r1=50479&r2=50480&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp Wed Apr 30 07:35:27 2008
@@ -147,8 +147,7 @@
}
void BitcodeReaderValueList::resize(unsigned Desired) {
- if (Desired > Capacity)
- {
+ if (Desired > Capacity) {
// Since we expect many values to come from the bitcode file we better
// allocate the double amount, so that the array size grows exponentially
// at each reallocation. Also, add a small amount of 100 extra elements
Modified: llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h?rev=50480&r1=50479&r2=50480&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h (original)
+++ llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h Wed Apr 30 07:35:27 2008
@@ -86,7 +86,7 @@
void initVal(unsigned Idx, Value *V) {
if (Idx >= size()) {
// Insert a bunch of null values.
- resize(Idx * 2 + 1);
+ resize(Idx * 2 + 1);
}
assert(getOperand(Idx) == 0 && "Cannot init an already init'd Use!");
OperandList[Idx].init(V, this);
Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp?rev=50480&r1=50479&r2=50480&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Instructions.cpp Wed Apr 30 07:35:27 2008
@@ -995,6 +995,16 @@
OL[1].init(Idx, this);
}
+GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
+ : Instruction(reinterpret_cast<const Type*>(GEPI.getType()), GetElementPtr,
+ OperandTraits<GetElementPtrInst>::op_end(this) - GEPI.getNumOperands(),
+ GEPI.getNumOperands()) {
+ Use *OL = OperandList;
+ Use *GEPIOL = GEPI.OperandList;
+ for (unsigned i = 0, E = NumOperands; i != E; ++i)
+ OL[i].init(GEPIOL[i], this);
+}
+
GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx,
const std::string &Name, Instruction *InBe)
: Instruction(PointerType::get(checkType(getIndexedType(Ptr->getType(),Idx)),
More information about the llvm-commits
mailing list