[opengtl-commits] [384] more static functions

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 384
Author:   cyrille
Date:     2008-09-11 22:58:43 +0200 (Thu, 11 Sep 2008)

Log Message:
-----------
more static functions
fix getCountFieldOf load instruction not beeing in a basic block

Modified Paths:
--------------
    trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.h


Modified: trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp	2008-09-10 22:28:17 UTC (rev 383)
+++ trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp	2008-09-11 20:58:43 UTC (rev 384)
@@ -669,9 +669,9 @@
   new llvm::StoreInst( _value, countFieldPointer( _currentBlock, _pointer ), "", _currentBlock);
 }
 
-llvm::Value* CodeGenerator::getCountFieldOf( llvm::BasicBlock* currentBlock, llvm::Value* _pointer )
+llvm::Value* CodeGenerator::getCountFieldOf( llvm::BasicBlock* _currentBlock, llvm::Value* _pointer )
 {
-  return new llvm::LoadInst( countFieldPointer( currentBlock, _pointer ) );
+  return new llvm::LoadInst( countFieldPointer( _currentBlock, _pointer ), "", _currentBlock );
 }
 
 llvm::Value* CodeGenerator::incrementCountFieldOf( llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, llvm::Value* _increment )

Modified: trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.h	2008-09-10 22:28:17 UTC (rev 383)
+++ trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.h	2008-09-11 20:58:43 UTC (rev 384)
@@ -99,9 +99,9 @@
       llvm::Value* createOrExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
       ExpressionResult createOrExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, ExpressionResult rhs);
       llvm::Constant* createOrExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
-      llvm::Value* createAndExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
-      ExpressionResult createAndExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, ExpressionResult rhs);
-      llvm::Constant* createAndExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
+      static llvm::Value* createAndExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
+      static ExpressionResult createAndExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, ExpressionResult rhs);
+      static llvm::Constant* createAndExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
     public: // Bit expressions
       llvm::Value* createBitXorExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
       ExpressionResult createBitXorExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
@@ -141,29 +141,29 @@
       ExpressionResult createLeftShiftExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, ExpressionResult rhs);
       llvm::Constant* createLeftShiftExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
     public: // Comparison Expressions
-      llvm::Value* createEqualExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
-      ExpressionResult createEqualExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
-      llvm::Constant* createEqualExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
+      static llvm::Value* createEqualExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
+      static ExpressionResult createEqualExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
+      static llvm::Constant* createEqualExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
       //
-      llvm::Value* createDifferentExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
-      ExpressionResult createDifferentExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
-      llvm::Constant* createDifferentExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
+      static llvm::Value* createDifferentExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
+      static ExpressionResult createDifferentExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
+      static llvm::Constant* createDifferentExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
       //
       static llvm::Value* createStrictInferiorExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
-      ExpressionResult createStrictInferiorExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
-      llvm::Constant* createStrictInferiorExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
+      static ExpressionResult createStrictInferiorExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
+      static llvm::Constant* createStrictInferiorExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
       // createInferiorExpression
-      llvm::Value* createInferiorOrEqualExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
-      ExpressionResult createInferiorOrEqualExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
-      llvm::Constant* createInferiorOrEqualExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
+      static llvm::Value* createInferiorOrEqualExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
+      static ExpressionResult createInferiorOrEqualExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
+      static llvm::Constant* createInferiorOrEqualExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
       //
-      llvm::Value* createStrictSupperiorExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
-      ExpressionResult createStrictSupperiorExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
-      llvm::Constant* createStrictSupperiorExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
+      static llvm::Value* createStrictSupperiorExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
+      static ExpressionResult createStrictSupperiorExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
+      static llvm::Constant* createStrictSupperiorExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
       //
-      llvm::Value* createSupperiorOrEqualExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
-      ExpressionResult createSupperiorOrEqualExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
-      llvm::Constant* createSupperiorOrEqualExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
+      static llvm::Value* createSupperiorOrEqualExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType);
+      static ExpressionResult createSupperiorOrEqualExpression( llvm::BasicBlock* currentBlock, ExpressionResult lhs, const Type* lhsType, ExpressionResult rhs, const Type* rhsType);
+      static llvm::Constant* createSupperiorOrEqualExpression( llvm::Constant* lhs, const Type* lhsType, llvm::Constant* rhs, const Type* rhsType);
     public: // Unary expression
       // Minus
       ExpressionResult createMinusExpression( llvm::BasicBlock* currentBlock, ExpressionResult rhs, const Type* rhsType);
@@ -192,7 +192,7 @@
        * @param lastAction the block with the last action in case if is true
        * @param after the basic block after the if statement
        */
-      void createIfStatement( llvm::BasicBlock* before, llvm::Value* test, const Type* testType, llvm::BasicBlock* firstAction, llvm::BasicBlock* lastAction, llvm::BasicBlock* after);
+      static void createIfStatement( llvm::BasicBlock* before, llvm::Value* test, const Type* testType, llvm::BasicBlock* firstAction, llvm::BasicBlock* lastAction, llvm::BasicBlock* after);
       void createIfElseStatement( llvm::BasicBlock* before, llvm::Value* test, const Type* testType, llvm::BasicBlock* firstAction, llvm::BasicBlock* lastAction, llvm::BasicBlock* firstElseAction, llvm::BasicBlock* lastElseAction, llvm::BasicBlock* after);
       /**
        * Create a for statement.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/