[llvm-commits] [SignlessTypes] CVS: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp

Reid Spencer reid at x10sys.com
Wed Oct 18 20:59:01 PDT 2006



Changes in directory llvm/projects/Stacker/lib/compiler:

StackerCompiler.cpp updated: 1.18 -> 1.18.2.1
---
Log message:

For PR950: http://llvm.org/PR950 :
This commit (on SignlessTypes branch) provides the first Iteration for 
moving LLVM away from Signed types. This patch removes the ConstantSInt
and ConstantUInt classes from Type.h and makes all necessary changes in
LLVM to compensate.


---
Diffs of the changes:  (+8 -8)

 StackerCompiler.cpp |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)


Index: llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp
diff -u llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18 llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18.2.1
--- llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp:1.18	Fri Aug 18 04:07:54 2006
+++ llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp	Wed Oct 18 22:57:56 2006
@@ -463,7 +463,7 @@
 StackerCompiler::push_integer(BasicBlock* bb, int64_t value )
 {
     // Just push a constant integer value
-    return push_value( bb, ConstantSInt::get( Type::LongTy, value ) );
+    return push_value( bb, ConstantInt::get( Type::LongTy, value ) );
 }
 
 Instruction*
@@ -721,7 +721,7 @@
 
     // Compare the condition against 0
     SetCondInst* cond_inst = new SetCondInst( Instruction::SetNE, cond,
-        ConstantSInt::get( Type::LongTy, 0) );
+        ConstantInt::get( Type::LongTy, uint32_t(0)) );
     bb->getInstList().push_back( cond_inst );
 
     // Create an exit block
@@ -805,7 +805,7 @@
 
     // Compare the condition against 0
     SetCondInst* cond_inst = new SetCondInst(
-        Instruction::SetNE, cond, ConstantSInt::get( Type::LongTy, 0) );
+        Instruction::SetNE, cond, ConstantInt::get( Type::LongTy, uint32_t(0)));
     test->getInstList().push_back( cond_inst );
 
     // Add the branch instruction
@@ -1019,7 +1019,7 @@
         if (echo) bb->setName("DECR");
         LoadInst* op1 = cast<LoadInst>(pop_integer(bb));
         BinaryOperator* subop = BinaryOperator::create( Instruction::Sub, op1,
-            ConstantSInt::get( Type::LongTy, 1 ) );
+            ConstantInt::get( Type::LongTy, 1 ) );
         bb->getInstList().push_back( subop );
         push_value( bb, subop );
         break;
@@ -1089,7 +1089,7 @@
         // bb->getInstList().push_back( negop );
         // So we'll multiply by -1 (ugh)
         BinaryOperator* multop = BinaryOperator::create( Instruction::Mul, op1,
-            ConstantSInt::get( Type::LongTy, -1 ) );
+            ConstantInt::get( Type::LongTy, -1 ) );
         bb->getInstList().push_back( multop );
         push_value( bb, multop );
         break;
@@ -1601,7 +1601,7 @@
         bb->getInstList().push_back( format_gep );
 
         // Get the character to print (a tab)
-        ConstantSInt* newline = ConstantSInt::get(Type::IntTy,
+        ConstantInt* newline = ConstantInt::get(Type::IntTy,
             static_cast<int>('\t'));
 
         // Call printf
@@ -1623,7 +1623,7 @@
         bb->getInstList().push_back( format_gep );
 
         // Get the character to print (a space)
-        ConstantSInt* newline = ConstantSInt::get(Type::IntTy,
+        ConstantInt* newline = ConstantInt::get(Type::IntTy,
             static_cast<int>(' '));
 
         // Call printf
@@ -1645,7 +1645,7 @@
         bb->getInstList().push_back( format_gep );
 
         // Get the character to print (a newline)
-        ConstantSInt* newline = ConstantSInt::get(Type::IntTy,
+        ConstantInt* newline = ConstantInt::get(Type::IntTy,
             static_cast<int>('\n'));
 
         // Call printf






More information about the llvm-commits mailing list