[llvm-commits] CVS: llvm/include/llvm/Constants.h Instruction.def
Reid Spencer
reid at x10sys.com
Wed Oct 25 23:16:27 PDT 2006
Changes in directory llvm/include/llvm:
Constants.h updated: 1.90 -> 1.91
Instruction.def updated: 1.19 -> 1.20
---
Log message:
For PR950: http://llvm.org/PR950 :
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.
---
Diffs of the changes: (+31 -31)
Constants.h | 4 ++-
Instruction.def | 58 +++++++++++++++++++++++++++-----------------------------
2 files changed, 31 insertions(+), 31 deletions(-)
Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.90 llvm/include/llvm/Constants.h:1.91
--- llvm/include/llvm/Constants.h:1.90 Fri Oct 20 02:24:55 2006
+++ llvm/include/llvm/Constants.h Thu Oct 26 01:15:43 2006
@@ -543,7 +543,9 @@
static Constant *getAdd(Constant *C1, Constant *C2);
static Constant *getSub(Constant *C1, Constant *C2);
static Constant *getMul(Constant *C1, Constant *C2);
- static Constant *getDiv(Constant *C1, Constant *C2);
+ static Constant *getUDiv(Constant *C1, Constant *C2);
+ static Constant *getSDiv(Constant *C1, Constant *C2);
+ static Constant *getFDiv(Constant *C1, Constant *C2);
static Constant *getRem(Constant *C1, Constant *C2);
static Constant *getAnd(Constant *C1, Constant *C2);
static Constant *getOr(Constant *C1, Constant *C2);
Index: llvm/include/llvm/Instruction.def
diff -u llvm/include/llvm/Instruction.def:1.19 llvm/include/llvm/Instruction.def:1.20
--- llvm/include/llvm/Instruction.def:1.19 Fri Apr 7 20:15:18 2006
+++ llvm/include/llvm/Instruction.def Thu Oct 26 01:15:43 2006
@@ -93,45 +93,43 @@
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)
+HANDLE_BINARY_INST(10, UDiv , BinaryOperator)
+HANDLE_BINARY_INST(11, SDiv , BinaryOperator)
+HANDLE_BINARY_INST(12, FDiv , BinaryOperator)
+HANDLE_BINARY_INST(13, Rem , BinaryOperator)
// Logical operators...
-HANDLE_BINARY_INST(12, And , BinaryOperator)
-HANDLE_BINARY_INST(13, Or , BinaryOperator)
-HANDLE_BINARY_INST(14, Xor , BinaryOperator)
+HANDLE_BINARY_INST(14, And , BinaryOperator)
+HANDLE_BINARY_INST(15, Or , BinaryOperator)
+HANDLE_BINARY_INST(16, Xor , BinaryOperator)
// Binary comparison operators...
-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)
+HANDLE_BINARY_INST(17, SetEQ , SetCondInst)
+HANDLE_BINARY_INST(18, SetNE , SetCondInst)
+HANDLE_BINARY_INST(19, SetLE , SetCondInst)
+HANDLE_BINARY_INST(20, SetGE , SetCondInst)
+HANDLE_BINARY_INST(21, SetLT , SetCondInst)
+HANDLE_BINARY_INST(22, SetGT , SetCondInst)
+ LAST_BINARY_INST(22)
// Memory operators...
- 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)
+ FIRST_MEMORY_INST(23)
+HANDLE_MEMORY_INST(23, Malloc, MallocInst) // Heap management instructions
+HANDLE_MEMORY_INST(24, Free , FreeInst )
+HANDLE_MEMORY_INST(25, Alloca, AllocaInst) // Stack management
+HANDLE_MEMORY_INST(26, Load , LoadInst ) // Memory manipulation instrs
+HANDLE_MEMORY_INST(27, Store , StoreInst )
+HANDLE_MEMORY_INST(28, GetElementPtr, GetElementPtrInst)
+ LAST_MEMORY_INST(28)
// Other operators...
- 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(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.
+ FIRST_OTHER_INST(29)
+HANDLE_OTHER_INST(29, PHI , PHINode ) // PHI node instruction
+HANDLE_OTHER_INST(30, Cast , CastInst ) // Type cast
+HANDLE_OTHER_INST(31, Call , CallInst ) // Call a function
+HANDLE_OTHER_INST(32, Shl , ShiftInst ) // Shift operations
+HANDLE_OTHER_INST(33, Shr , ShiftInst )
HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction
-
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
More information about the llvm-commits
mailing list