[llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Instruction.def IntrinsicInst.h
Reid Spencer
reid at x10sys.com
Thu Oct 19 17:35:15 PDT 2006
Changes in directory llvm/include/llvm:
Instruction.def updated: 1.19.6.1 -> 1.19.6.2
IntrinsicInst.h updated: 1.18 -> 1.18.4.1
---
Log message:
Make some simplifications for ConstantInt:
1. Get rid of getRawValue, replace with getZExtValue
2. Single constructor (uint64_t) and get method (int64_t)
3. Canonicalize the constant to a zero extended unsigned 64-bit integer when
it is created.
4. Adjust getZExtValue() to be a do-nothing (just returns the already
canonicalized value).
5. Compensate for above changes everywhere else.
---
Diffs of the changes: (+39 -40)
Instruction.def | 75 +++++++++++++++++++++++++++-----------------------------
IntrinsicInst.h | 4 +-
2 files changed, 39 insertions(+), 40 deletions(-)
Index: llvm/include/llvm/Instruction.def
diff -u llvm/include/llvm/Instruction.def:1.19.6.1 llvm/include/llvm/Instruction.def:1.19.6.2
--- llvm/include/llvm/Instruction.def:1.19.6.1 Thu Oct 19 14:21:35 2006
+++ llvm/include/llvm/Instruction.def Thu Oct 19 19:34:43 2006
@@ -90,56 +90,55 @@
// Standard binary operators...
FIRST_BINARY_INST( 7)
-HANDLE_BINARY_INST( 7, Add , BinaryOperator)
-HANDLE_BINARY_INST( 8, Sub , BinaryOperator)
-HANDLE_BINARY_INST( 9, Mul , BinaryOperator)
-HANDLE_BINARY_INST(10, UDiv , BinaryOperator)
-HANDLE_BINARY_INST(11, SDiv , BinaryOperator)
-HANDLE_BINARY_INST(12, Rem , BinaryOperator)
+HANDLE_BINARY_INST( 7, Add , BinaryOperator)
+HANDLE_BINARY_INST( 8, Sub , BinaryOperator)
+HANDLE_BINARY_INST( 9, Mul , BinaryOperator)
+HANDLE_BINARY_INST(10, Div , BinaryOperator)
+HANDLE_BINARY_INST(11, Rem , BinaryOperator)
// Logical operators...
-HANDLE_BINARY_INST(13, And , BinaryOperator)
-HANDLE_BINARY_INST(14, Or , BinaryOperator)
-HANDLE_BINARY_INST(15, Xor , BinaryOperator)
+HANDLE_BINARY_INST(12, And , BinaryOperator)
+HANDLE_BINARY_INST(13, Or , BinaryOperator)
+HANDLE_BINARY_INST(14, Xor , BinaryOperator)
// Binary comparison operators...
-HANDLE_BINARY_INST(16, SetEQ , SetCondInst)
-HANDLE_BINARY_INST(17, SetNE , SetCondInst)
-HANDLE_BINARY_INST(18, SetLE , SetCondInst)
-HANDLE_BINARY_INST(19, SetGE , SetCondInst)
-HANDLE_BINARY_INST(20, SetLT , SetCondInst)
-HANDLE_BINARY_INST(21, SetGT , SetCondInst)
- LAST_BINARY_INST(21)
+HANDLE_BINARY_INST(15, SetEQ , SetCondInst)
+HANDLE_BINARY_INST(16, SetNE , SetCondInst)
+HANDLE_BINARY_INST(17, SetLE , SetCondInst)
+HANDLE_BINARY_INST(18, SetGE , SetCondInst)
+HANDLE_BINARY_INST(19, SetLT , SetCondInst)
+HANDLE_BINARY_INST(20, SetGT , SetCondInst)
+ LAST_BINARY_INST(20)
// Memory operators...
- FIRST_MEMORY_INST(22)
-HANDLE_MEMORY_INST(22, Malloc, MallocInst) // Heap management instructions
-HANDLE_MEMORY_INST(23, Free , FreeInst )
-HANDLE_MEMORY_INST(24, Alloca, AllocaInst) // Stack management
-HANDLE_MEMORY_INST(25, Load , LoadInst ) // Memory manipulation instrs
-HANDLE_MEMORY_INST(26, Store , StoreInst )
-HANDLE_MEMORY_INST(27, GetElementPtr, GetElementPtrInst)
- LAST_MEMORY_INST(27)
+ FIRST_MEMORY_INST(21)
+HANDLE_MEMORY_INST(21, Malloc, MallocInst) // Heap management instructions
+HANDLE_MEMORY_INST(22, Free , FreeInst )
+HANDLE_MEMORY_INST(23, Alloca, AllocaInst) // Stack management
+HANDLE_MEMORY_INST(24, Load , LoadInst ) // Memory manipulation instrs
+HANDLE_MEMORY_INST(25, Store , StoreInst )
+HANDLE_MEMORY_INST(26, GetElementPtr, GetElementPtrInst)
+ LAST_MEMORY_INST(26)
// Other operators...
- FIRST_OTHER_INST(28)
-HANDLE_OTHER_INST(28, PHI , PHINode ) // PHI node instruction
-HANDLE_OTHER_INST(29, Cast , CastInst ) // Type cast
-HANDLE_OTHER_INST(30, Call , CallInst ) // Call a function
+ FIRST_OTHER_INST(27)
+HANDLE_OTHER_INST(27, PHI , PHINode ) // PHI node instruction
+HANDLE_OTHER_INST(28, Cast , CastInst ) // Type cast
+HANDLE_OTHER_INST(29, Call , CallInst ) // Call a function
-HANDLE_OTHER_INST(31, Shl , ShiftInst ) // Shift operations
-HANDLE_OTHER_INST(32, Shr , ShiftInst )
+HANDLE_OTHER_INST(30, Shl , ShiftInst ) // Shift operations
+HANDLE_OTHER_INST(31, Shr , ShiftInst )
// 32 -> Empty slot used to be used for vanext in llvm 1.5 and before.
// 33 -> Empty slot used to be used for vaarg in llvm 1.5 and before.
-HANDLE_OTHER_INST(33, Select , SelectInst ) // select instruction
+HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction
-HANDLE_OTHER_INST(34, UserOp1, Instruction) // May be used internally in a pass
-HANDLE_OTHER_INST(35, UserOp2, Instruction)
-HANDLE_OTHER_INST(36, VAArg , VAArgInst ) // vaarg instruction
-HANDLE_OTHER_INST(37, ExtractElement, ExtractElementInst)// extract from vector.
-HANDLE_OTHER_INST(38, InsertElement, InsertElementInst) // insert into vector
-HANDLE_OTHER_INST(39, ShuffleVector, ShuffleVectorInst) // shuffle two vectors.
- LAST_OTHER_INST(39)
+HANDLE_OTHER_INST(35, UserOp1, Instruction) // May be used internally in a pass
+HANDLE_OTHER_INST(36, UserOp2, Instruction)
+HANDLE_OTHER_INST(37, VAArg , VAArgInst ) // vaarg instruction
+HANDLE_OTHER_INST(38, ExtractElement, ExtractElementInst)// extract from vector.
+HANDLE_OTHER_INST(39, InsertElement, InsertElementInst) // insert into vector
+HANDLE_OTHER_INST(40, ShuffleVector, ShuffleVectorInst) // shuffle two vectors.
+ LAST_OTHER_INST(40)
#undef FIRST_TERM_INST
#undef HANDLE_TERM_INST
Index: llvm/include/llvm/IntrinsicInst.h
diff -u llvm/include/llvm/IntrinsicInst.h:1.18 llvm/include/llvm/IntrinsicInst.h:1.18.4.1
--- llvm/include/llvm/IntrinsicInst.h:1.18 Wed Jul 26 11:18:00 2006
+++ llvm/include/llvm/IntrinsicInst.h Thu Oct 19 19:34:43 2006
@@ -97,10 +97,10 @@
}
unsigned getLine() const {
- return unsigned(cast<ConstantInt>(getOperand(1))->getRawValue());
+ return unsigned(cast<ConstantInt>(getOperand(1))->getZExtValue());
}
unsigned getColumn() const {
- return unsigned(cast<ConstantInt>(getOperand(2))->getRawValue());
+ return unsigned(cast<ConstantInt>(getOperand(2))->getZExtValue());
}
std::string getFileName() const;
More information about the llvm-commits
mailing list