Changes in directory llvm/lib/ExecutionEngine/Interpreter:

Execution.cpp updated: 1.166 -> 1.167
Interpreter.h updated: 1.81 -> 1.82
---
Log message:

Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to 
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.


---
Diffs of the changes:  (+7 -6)

 Execution.cpp |    6 +++---
 Interpreter.h |    7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)


Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.166 
llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.167
--- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.166    Tue Jan 30 
14:08:37 2007
+++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp  Thu Feb  1 20:16:22 2007
@@ -1275,7 +1275,7 @@
   return Dest;
 }
 
-void Interpreter::visitShl(ShiftInst &I) {
+void Interpreter::visitShl(BinaryOperator &I) {
   ExecutionContext &SF = ECStack.back();
   const Type *Ty    = I.getOperand(0)->getType();
   GenericValue Src1 = getOperandValue(I.getOperand(0), SF);
@@ -1285,7 +1285,7 @@
   SetValue(&I, Dest, SF);
 }
 
-void Interpreter::visitLShr(ShiftInst &I) {
+void Interpreter::visitLShr(BinaryOperator &I) {
   ExecutionContext &SF = ECStack.back();
   const Type *Ty    = I.getOperand(0)->getType();
   GenericValue Src1 = getOperandValue(I.getOperand(0), SF);
@@ -1295,7 +1295,7 @@
   SetValue(&I, Dest, SF);
 }
 
-void Interpreter::visitAShr(ShiftInst &I) {
+void Interpreter::visitAShr(BinaryOperator &I) {
   ExecutionContext &SF = ECStack.back();
   const Type *Ty    = I.getOperand(0)->getType();
   GenericValue Src1 = getOperandValue(I.getOperand(0), SF);


Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.81 
llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.82
--- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.81     Wed Jan 17 
20:12:10 2007
+++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.h  Thu Feb  1 20:16:22 2007
@@ -165,9 +165,10 @@
   void visitUnwindInst(UnwindInst &I);
   void visitUnreachableInst(UnreachableInst &I);
 
-  void visitShl(ShiftInst &I);
-  void visitLShr(ShiftInst &I);
-  void visitAShr(ShiftInst &I);
+  void visitShl(BinaryOperator &I);
+  void visitLShr(BinaryOperator &I);
+  void visitAShr(BinaryOperator &I);
+
   void visitVAArgInst(VAArgInst &I);
   void visitInstruction(Instruction &I) {
     cerr << I;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to