You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by mc...@apache.org on 2008/05/22 15:34:09 UTC

svn commit: r659108 [13/19] - in /harmony/enhanced/drlvm/trunk/vm: em/src/ gc_gen/src/common/ gc_gen/src/mark_compact/ gc_gen/src/mark_sweep/ gc_gen/src/semi_space/ gc_gen/src/trace_forward/ include/open/ interpreter/src/ jitrino/src/codegenerator/ jit...

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp Thu May 22 06:33:38 2008
@@ -173,10 +173,10 @@
     _usesOptimisticBalancedSync = argSource->getBoolArg("sync_optimistic", false) ? argSource->getBoolArg("sync_optcatch", true) : false;
 }
 
-int32 
-Inliner::computeInlineBenefit(Node* node, MethodDesc& methodDesc, InlineNode* parentInlineNode, uint32 loopDepth) 
+I_32 
+Inliner::computeInlineBenefit(Node* node, MethodDesc& methodDesc, InlineNode* parentInlineNode, U_32 loopDepth) 
 {
-    int32 benefit = 0;
+    I_32 benefit = 0;
 
     if (Log::isEnabled()) {
         Log::out() << "Computing Inline benefit for "
@@ -193,7 +193,7 @@
     //
     // Size impact
     //
-    uint32 size = methodDesc.getByteCodeSize();
+    U_32 size = methodDesc.getByteCodeSize();
     Log::out() << "  size is " << (int) size << ::std::endl;
     if(size < _inlineSmallMaxByteSize) {
         // Large bonus for smallest methods
@@ -255,7 +255,7 @@
         assert(call->getNumSrcOperands() >= 2);
         assert(call->getSrc(0)->getType()->tag == Type::Tau);
         assert(call->getSrc(1)->getType()->tag == Type::Tau);
-        for(uint32 i = 2; i < call->getNumSrcOperands(); ++i) {
+        for(U_32 i = 2; i < call->getNumSrcOperands(); ++i) {
             Opnd* arg = call->getSrc(i);
             assert(arg->getType()->tag != Type::Tau);
             if(arg->getInst()->isConst()) {
@@ -290,7 +290,7 @@
         // Remove any loop bonus as this is already accounted for in block count
         benefit -= _inlineLoopBonus*loopDepth;
         // Scale by call site 'hotness'.
-        benefit = (uint32) ((double) benefit * scale);
+        benefit = (U_32) ((double) benefit * scale);
 
         Log::out() << "  HeatThreshold=" << heatThreshold
                                << ", nodeCount=" << nodeCount
@@ -315,18 +315,18 @@
 protected:
     bool leaf;
 
-    void offset(uint32 offset) {};
-    void offset_done(uint32 offset) {};
+    void offset(U_32 offset) {};
+    void offset_done(U_32 offset) {};
     void nop()  {}
     void aconst_null()  {}
-    void iconst(int32)  {}
+    void iconst(I_32)  {}
     void lconst(int64)  {}
     void fconst(float)  {}
     void dconst(double)  {}
     void bipush(int8)  {}
     void sipush(int16)  {}
-    void ldc(uint32)  {}
-    void ldc2(uint32)  {}
+    void ldc(U_32)  {}
+    void ldc2(U_32)  {}
     void iload(uint16 varIndex)  {}
     void lload(uint16 varIndex)  {}
     void fload(uint16 varIndex)  {}
@@ -340,11 +340,11 @@
     void baload()  {}
     void caload()  {}
     void saload()  {}
-    void istore(uint16 varIndex,uint32 off)  {}
-    void lstore(uint16 varIndex,uint32 off)  {}
-    void fstore(uint16 varIndex,uint32 off)  {}
-    void dstore(uint16 varIndex,uint32 off)  {}
-    void astore(uint16 varIndex,uint32 off)  {}
+    void istore(uint16 varIndex,U_32 off)  {}
+    void lstore(uint16 varIndex,U_32 off)  {}
+    void fstore(uint16 varIndex,U_32 off)  {}
+    void dstore(uint16 varIndex,U_32 off)  {}
+    void astore(uint16 varIndex,U_32 off)  {}
     void iastore()  {}
     void lastore()  {}
     void fastore()  {}
@@ -398,7 +398,7 @@
     void lor()  {}
     void ixor()  {}
     void lxor()  {}
-    void iinc(uint16 varIndex,int32 amount)  {}
+    void iinc(uint16 varIndex,I_32 amount)  {}
     void i2l()  {}
     void i2f()  {}
     void i2d()  {}
@@ -419,56 +419,56 @@
     void fcmpg()  {}
     void dcmpl()  {}
     void dcmpg()  {}
-    void ifeq(uint32 targetOffset,uint32 nextOffset)  {}
-    void ifne(uint32 targetOffset,uint32 nextOffset)  {}
-    void iflt(uint32 targetOffset,uint32 nextOffset)  {}
-    void ifge(uint32 targetOffset,uint32 nextOffset)  {}
-    void ifgt(uint32 targetOffset,uint32 nextOffset)  {}
-    void ifle(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_icmpeq(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_icmpne(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_icmplt(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_icmpge(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_icmpgt(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_icmple(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_acmpeq(uint32 targetOffset,uint32 nextOffset)  {}
-    void if_acmpne(uint32 targetOffset,uint32 nextOffset)  {}
-    void goto_(uint32 targetOffset,uint32 nextOffset)  {}
-    void jsr(uint32 offset, uint32 nextOffset)  {}
+    void ifeq(U_32 targetOffset,U_32 nextOffset)  {}
+    void ifne(U_32 targetOffset,U_32 nextOffset)  {}
+    void iflt(U_32 targetOffset,U_32 nextOffset)  {}
+    void ifge(U_32 targetOffset,U_32 nextOffset)  {}
+    void ifgt(U_32 targetOffset,U_32 nextOffset)  {}
+    void ifle(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_icmpeq(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_icmpne(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_icmplt(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_icmpge(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_icmpgt(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_icmple(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_acmpeq(U_32 targetOffset,U_32 nextOffset)  {}
+    void if_acmpne(U_32 targetOffset,U_32 nextOffset)  {}
+    void goto_(U_32 targetOffset,U_32 nextOffset)  {}
+    void jsr(U_32 offset, U_32 nextOffset)  {}
     void ret(uint16 varIndex,const uint8* byteCodes)  {}
     void tableswitch(JavaSwitchTargetsIter*)  {}
     void lookupswitch(JavaLookupSwitchTargetsIter*)  {}
-    void ireturn(uint32 off)  {}
-    void lreturn(uint32 off)  {}
-    void freturn(uint32 off)  {}
-    void dreturn(uint32 off)  {}
-    void areturn(uint32 off)  {}
-    void return_(uint32 off)  {}
-    void getstatic(uint32 constPoolIndex)  {}
-    void putstatic(uint32 constPoolIndex)  {}
-    void getfield(uint32 constPoolIndex)  {}
-    void putfield(uint32 constPoolIndex)  {}
-    void invokevirtual(uint32 constPoolIndex)  { leaf = false; }
-    void invokespecial(uint32 constPoolIndex)  { leaf = false; }
-    void invokestatic(uint32 constPoolIndex)  { leaf = false; }
-    void invokeinterface(uint32 constPoolIndex,uint32 count)  { leaf = false; }
-    void new_(uint32 constPoolIndex)  {}
+    void ireturn(U_32 off)  {}
+    void lreturn(U_32 off)  {}
+    void freturn(U_32 off)  {}
+    void dreturn(U_32 off)  {}
+    void areturn(U_32 off)  {}
+    void return_(U_32 off)  {}
+    void getstatic(U_32 constPoolIndex)  {}
+    void putstatic(U_32 constPoolIndex)  {}
+    void getfield(U_32 constPoolIndex)  {}
+    void putfield(U_32 constPoolIndex)  {}
+    void invokevirtual(U_32 constPoolIndex)  { leaf = false; }
+    void invokespecial(U_32 constPoolIndex)  { leaf = false; }
+    void invokestatic(U_32 constPoolIndex)  { leaf = false; }
+    void invokeinterface(U_32 constPoolIndex,U_32 count)  { leaf = false; }
+    void new_(U_32 constPoolIndex)  {}
     void newarray(uint8 type)  {}
-    void anewarray(uint32 constPoolIndex)  {}
+    void anewarray(U_32 constPoolIndex)  {}
     void arraylength()  {}
     void athrow()  {}
-    void checkcast(uint32 constPoolIndex)  {}
-    int  instanceof(const uint8* bcp, uint32 constPoolIndex, uint32 off)  {return 3;}
+    void checkcast(U_32 constPoolIndex)  {}
+    int  instanceof(const uint8* bcp, U_32 constPoolIndex, U_32 off)  {return 3;}
     void monitorenter()  {}
     void monitorexit()  {}
-    void multianewarray(uint32 constPoolIndex,uint8 dimensions)  {}
-    void ifnull(uint32 targetOffset,uint32 nextOffset)  {}
-    void ifnonnull(uint32 targetOffset,uint32 nextOffset) {}
+    void multianewarray(U_32 constPoolIndex,uint8 dimensions)  {}
+    void ifnull(U_32 targetOffset,U_32 nextOffset)  {}
+    void ifnonnull(U_32 targetOffset,U_32 nextOffset) {}
 };
 
 bool
 Inliner::isLeafMethod(MethodDesc& methodDesc) {
-    uint32 size = methodDesc.getByteCodeSize();
+    U_32 size = methodDesc.getByteCodeSize();
     const U_8* bytecodes = methodDesc.getByteCodes();
     ByteCodeParser parser(bytecodes,size);
     JavaByteCodeLeafSearchCallback leafTester;
@@ -559,7 +559,7 @@
 
 
     // Fuse callsite arguments with incoming parameters
-    uint32 numArgs = callInst->getNumSrcOperands() - 2; // omit taus
+    U_32 numArgs = callInst->getNumSrcOperands() - 2; // omit taus
     Opnd *tauNullChecked = callInst->getSrc(0);
     Opnd *tauTypesChecked = callInst->getSrc(1);
     assert(tauNullChecked->getType()->tag == Type::Tau);
@@ -577,7 +577,7 @@
     Inst* first = (Inst*)entry->getFirstInst();
     Inst* inst;
     Opnd* thisPtr = 0;
-    uint32 j;
+    U_32 j;
     for(j = 0, inst = first->getNextInst(); j < numArgs && inst != NULL;) {
         switch (inst->getOpcode()) {
         case Op_DefArg:
@@ -608,7 +608,7 @@
                 Opnd* src = inst->getSrc(0);
                 if (tauTypesChecked->getInst()->getOpcode() != Op_TauUnsafe) {
                     // it's worth substituting the tau
-                    for (uint32 i=0; i<numArgs; ++i) {
+                    for (U_32 i=0; i<numArgs; ++i) {
                         if (src == callInst->getSrc(i+2)) {
                             // it is a parameter
                             Opnd* dst = inst->getDst();
@@ -655,7 +655,7 @@
         assert(retNode != NULL);
         bool isSsa = inlinedIRM.getInSsa();
         Opnd** phiArgs = isSsa ? new (_toplevelIRM.getMemoryManager()) Opnd*[retNode->getInDegree()] : NULL;
-        uint32 phiCount = 0;
+        U_32 phiCount = 0;
         const Edges& inEdges = retNode->getInEdges();
         Edges::const_iterator eiter;
         for(eiter = inEdges.begin(); eiter != inEdges.end(); ++eiter) {
@@ -906,7 +906,7 @@
     InlineNode* inlineParentNode = 0;
     MethodCallInst* call = 0;
     MethodDesc* methodDesc = 0;
-    uint32 newByteSize = 0;
+    U_32 newByteSize = 0;
     
     //
     // Search priority queue for next inline candidate
@@ -924,7 +924,7 @@
 
         // If candidate would cause top level method to exceed size threshold, throw away.
         
-        uint32 methodByteSize = methodDesc->getByteCodeSize();
+        U_32 methodByteSize = methodDesc->getByteCodeSize();
         methodByteSize = (methodByteSize <= CALL_COST) ? 1 : methodByteSize-CALL_COST;
         newByteSize = _currentByteSize + methodByteSize;
         double factor = ((double) newByteSize) / ((double) _initByteSize);
@@ -968,9 +968,9 @@
     inlineCC.setHIRManager(inlinedIRM);
     
     //prepare type info
-    uint32 nArgs = call->getNumSrcOperands() - 2;
+    U_32 nArgs = call->getNumSrcOperands() - 2;
     Type** types = new (_tmpMM)Type*[nArgs];
-    for (uint32 i = 0; i < nArgs; i++) {
+    for (U_32 i = 0; i < nArgs; i++) {
         types[i] = call->getSrc(i + 2)->getType();
     }
 
@@ -1001,8 +1001,8 @@
 
             Log::out() << "Considering inlining instruction I" << (int)call->getId() << ::std::endl;
             if (usePriorityQueue && canInlineInto(*methodDesc)) {
-                uint32 size = methodDesc->getByteCodeSize();
-                int32 benefit = computeInlineBenefit(node, *methodDesc, inlineNode, ltree->getLoopDepth(node));
+                U_32 size = methodDesc->getByteCodeSize();
+                I_32 benefit = computeInlineBenefit(node, *methodDesc, inlineNode, ltree->getLoopDepth(node));
                 assert(size > 0);
                 Log::out() << "Inline benefit " << methodDesc->getParentType()->getName() << "." << methodDesc->getName() << " == " << (int) benefit << ::std::endl;
                 if(0 < size && benefit > _minBenefitThreshold) {
@@ -1103,7 +1103,7 @@
 
 
 
-uint32
+U_32
 InlineTree::computeCheckSum(InlineNode* node) {
     if(node == NULL)
         return 0;
@@ -1119,7 +1119,7 @@
     sum += hash(desc.getName());
     sum += computeCheckSum(node->getSiblings());
     sum += computeCheckSum(node->getChild());
-    return (uint32) sum;
+    return (U_32) sum;
 }
 
 void Inliner::runInlinerPipeline(CompilationContext& inlineCC, const char* pipeName) {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h Thu May 22 06:33:38 2008
@@ -49,11 +49,11 @@
 
 class InliningContext {
 public:
-    InliningContext(uint32 _nArgs, Type** _argTypes) : nArgs(_nArgs), argTypes(_argTypes) {}
-    uint32 getNumArgs() const {return nArgs;}
+    InliningContext(U_32 _nArgs, Type** _argTypes) : nArgs(_nArgs), argTypes(_argTypes) {}
+    U_32 getNumArgs() const {return nArgs;}
     Type** getArgTypes() const {return argTypes;}
 private:
-    uint32 nArgs;
+    U_32 nArgs;
     Type** argTypes;
 };
 
@@ -82,9 +82,9 @@
     }
     InlineNode *getRoot() { return (InlineNode*)root; }
 
-    uint32 computeCheckSum() { return computeCheckSum(getRoot()); }
+    U_32 computeCheckSum() { return computeCheckSum(getRoot()); }
 private:
-    uint32 computeCheckSum(InlineNode* node);
+    U_32 computeCheckSum(InlineNode* node);
 };
 
 class Inliner
@@ -132,9 +132,9 @@
 
     class CallSite {
     public:
-        CallSite(int32 benefit, Node* callNode, InlineNode* inlineNode) : benefit(benefit), callNode(callNode), inlineNode(inlineNode) {}
+        CallSite(I_32 benefit, Node* callNode, InlineNode* inlineNode) : benefit(benefit), callNode(callNode), inlineNode(inlineNode) {}
 
-        int32 benefit;
+        I_32 benefit;
         Node* callNode;
         InlineNode* inlineNode;
     };
@@ -159,7 +159,7 @@
 
     bool isLeafMethod(MethodDesc& methodDesc);
 
-    int32 computeInlineBenefit(Node* node, MethodDesc& methodDesc, InlineNode* parentInlineNode, uint32 loopDepth);
+    I_32 computeInlineBenefit(Node* node, MethodDesc& methodDesc, InlineNode* parentInlineNode, U_32 loopDepth);
 
     MemoryManager& _tmpMM;
     IRManager& _toplevelIRM;
@@ -170,8 +170,8 @@
     bool _hasProfileInfo;
     
     StlPriorityQueue<CallSite, StlVector<CallSite>, CallSiteCompare> _inlineCandidates;
-    uint32 _initByteSize;
-    uint32 _currentByteSize;
+    U_32 _initByteSize;
+    U_32 _currentByteSize;
 
     InlineTree _inlineTree;
 
@@ -179,26 +179,26 @@
     bool _useInliningTranslator;
 
     double _maxInlineGrowthFactor;
-    uint32 _minInlineStop;
-    int32 _minBenefitThreshold;
+    U_32 _minInlineStop;
+    I_32 _minBenefitThreshold;
     
-    uint32 _inlineSmallMaxByteSize;
-    int32 _inlineSmallBonus;
+    U_32 _inlineSmallMaxByteSize;
+    I_32 _inlineSmallBonus;
     
-    uint32 _inlineMediumMaxByteSize;
-    int32 _inlineMediumBonus;
+    U_32 _inlineMediumMaxByteSize;
+    I_32 _inlineMediumBonus;
 
-    uint32 _inlineLargeMinByteSize;
-    int32 _inlineLargePenalty;
+    U_32 _inlineLargeMinByteSize;
+    I_32 _inlineLargePenalty;
 
-    int32 _inlineLoopBonus;
-    int32 _inlineLeafBonus;
-    int32 _inlineSynchBonus;
-    int32 _inlineRecursionPenalty;
-    int32 _inlineExactArgBonus;
-    int32 _inlineExactAllBonus;
+    I_32 _inlineLoopBonus;
+    I_32 _inlineLeafBonus;
+    I_32 _inlineSynchBonus;
+    I_32 _inlineRecursionPenalty;
+    I_32 _inlineExactArgBonus;
+    I_32 _inlineExactAllBonus;
 
-    uint32 _inlineMaxNodeThreshold;
+    U_32 _inlineMaxNodeThreshold;
 
     bool _inlineSkipExceptionPath;
     bool _inlineSkipApiMagicMethods;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/irmanager.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/irmanager.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/irmanager.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/irmanager.h Thu May 22 06:33:38 2008
@@ -154,7 +154,7 @@
     void            setCriticalEdgesSplit() {_lastCriticalEdgeSplitTraversalNum = _flowGraph.getModificationTraversalNum();}
 
     // The minimum Instruction Id in this region.
-    uint32          getMinimumInstId() { return _minRegionInstId; }
+    U_32          getMinimumInstId() { return _minRegionInstId; }
 
     // The DPGO threshold for hotness - blocks with a execution count 
     // greater than this threshold should be considered hot
@@ -193,9 +193,9 @@
     const char*      _inlineOptPath;
     GCBasePointerMap _gcBasePointerMap;
     bool             _inSsa;
-    uint32           _lastSsaFixupTraversalNum;
-    uint32           _lastCriticalEdgeSplitTraversalNum;
-    uint32           _minRegionInstId;
+    U_32           _lastSsaFixupTraversalNum;
+    U_32           _lastCriticalEdgeSplitTraversalNum;
+    U_32           _minRegionInstId;
     double           _heatThreshold;
     bool             _abort;
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.cpp Thu May 22 06:33:38 2008
@@ -77,7 +77,7 @@
 #endif
 
     level++;
-    uint32 opndId = 0;
+    U_32 opndId = 0;
     isArgCheckNull = false;
     isExceptionInit = md.isInstanceInitializer() && 
             md.getParentType()->isLikelyExceptionType();
@@ -161,8 +161,8 @@
         Inst *headInst = (Inst*)node->getFirstInst();
         Opnd* opnd;
         for (Inst* inst=headInst->getNextInst();inst!=NULL;inst=inst->getNextInst()) {
-            uint32 nsrc = inst->getNumSrcOperands();
-            for (uint32 i=0; i<nsrc; i++) {
+            U_32 nsrc = inst->getNumSrcOperands();
+            for (U_32 i=0; i<nsrc; i++) {
                 if (!(opnd=inst->getSrc(i))->isSsaOpnd())  // check ssa operands
                     continue;
                 if (excOpnds.getBit(opndId=opnd->getId())==0) 
@@ -231,7 +231,7 @@
  *         <code>false<code> if an exception object cannot be optimized.
  */
 bool 
-LazyExceptionOpt::addOptCandidates(uint32 id, Inst* inst) {
+LazyExceptionOpt::addOptCandidates(U_32 id, Inst* inst) {
     OptCandidate* oc = NULL;
     ThrowInsts* thrinst = NULL;
     OptCandidates::iterator it;
@@ -286,7 +286,7 @@
                 inst->print(Log::out()); Log::out()  << std::endl;
             }
 #endif
-            uint32 nii_id=((Inst*)(inst->getNode()->getUnconditionalEdgeTarget()->getFirstInst()))->getId();
+            U_32 nii_id=((Inst*)(inst->getNode()->getUnconditionalEdgeTarget()->getFirstInst()))->getId();
             ThrowInsts::iterator it1;
             for (it1 = oc->throwInsts->begin(); it1 !=oc->throwInsts->end(); it1++) {
                 if ((*it1)->getId() != nii_id) {
@@ -449,7 +449,7 @@
     MethodCallInst* iinst;
     Inst* tinst;
     Inst* tlinst;
-    uint32 opcount;
+    U_32 opcount;
     Opnd **opnds = NULL;
 
     if (optCandidates == NULL) {
@@ -496,7 +496,7 @@
             if (opcount >0) {
                 opnds = new (leMemManager) Opnd*[opcount];   //local mem should be used
                 opnds[0] = mpt;
-                for (uint32 i = 0; i < opcount-1; i++)
+                for (U_32 i = 0; i < opcount-1; i++)
                     opnds[i+1] = iinst->getSrc(i+3);
             }
             Inst* mptinst = irManager.getInstFactory().makeLdFunAddr(mpt,iinst->getMethodDesc());
@@ -597,11 +597,11 @@
 
 void 
 LazyExceptionOpt::printInst1(::std::ostream& os, Inst* inst, std::string txt) {
-    uint32 nsrc = inst->getNumSrcOperands();
+    U_32 nsrc = inst->getNumSrcOperands();
     os << txt;
     inst->print(os);
     os << std::endl;
-    for (uint32 i=0; i<nsrc; i++) {
+    for (U_32 i=0; i<nsrc; i++) {
         printInst1(os, inst->getSrc(i)->getInst(),txt+"  ");
     }
 
@@ -615,7 +615,7 @@
  */
 bool 
 LazyExceptionOpt::methodCallHasSideEffect(Inst* inst) {
-    uint32 opcode = inst->getOpcode();
+    U_32 opcode = inst->getOpcode();
     MethodDesc* cmd = NULL;
     Method_Side_Effects mse = MSE_Unknown;
 
@@ -739,7 +739,7 @@
     }
 
     if (mse == MSE_True_Null_Param) {
-        uint32 nsrc=inst->getNumSrcOperands();
+        U_32 nsrc=inst->getNumSrcOperands();
         bool mayBeNull;
         if (nsrc>3) {
 #ifdef _DEBUG
@@ -749,7 +749,7 @@
             }
 #endif
             mayBeNull=false;
-            for (uint32 i=3; i<nsrc; i++) {
+            for (U_32 i=3; i<nsrc; i++) {
                 if (inst->getSrc(i)->getType()->isReference()) {
                     if (mayBeNullArg(inst,i))
                         mayBeNull=true;
@@ -758,7 +758,7 @@
             if (!mayBeNull)
                 return false;
 #ifdef _DEBUG
-            for (uint32 i=0; i<nsrc; i++) {
+            for (U_32 i=0; i<nsrc; i++) {
                 if (Log::isEnabled()) {
                     Log::out() << "        "<<i<<" isRef: "<<
                     inst->getSrc(i)->getType()->isReference()<<" "; 
@@ -789,7 +789,7 @@
  *         <code>false<code> if a callee method argument is not null
  */
 bool 
-LazyExceptionOpt::mayBeNullArg(Inst* call_inst, uint32 arg_n) {
+LazyExceptionOpt::mayBeNullArg(Inst* call_inst, U_32 arg_n) {
     Opnd* arg_opnd = call_inst->getSrc(arg_n);
     Inst* inst=arg_opnd->getInst();
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/lazyexceptionopt.h Thu May 22 06:33:38 2008
@@ -66,7 +66,7 @@
  * @return <code>true</code> if an information is added; 
  *         <code>false<code> if an exception object cannot be optimized.
  */
-    bool addOptCandidates(uint32 id, Inst* inst);
+    bool addOptCandidates(U_32 id, Inst* inst);
 
 /**
  * Checks if there is a side effect between throw_inst and init_inst instructions.
@@ -146,7 +146,7 @@
  * @return <code>true</code> if a callee method argument may be null
  *         <code>false<code> if a callee method argument is not null
  */
-    bool mayBeNullArg(Inst* call_inst, uint32 arg_n);
+    bool mayBeNullArg(Inst* call_inst, U_32 arg_n);
 
 private:
     /// IR manager recieved by lazyexc optpass.
@@ -165,7 +165,7 @@
     typedef StlList<Inst*> ThrowInsts; 
     /// Information about throwable object used in an optimized method.
     struct OptCandidate {
-        uint32 opndId;
+        U_32 opndId;
         Inst* objInst;
         Inst* initInst;
         ThrowInsts* throwInsts;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/loop_unroll.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/loop_unroll.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/loop_unroll.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/loop_unroll.cpp Thu May 22 06:33:38 2008
@@ -122,9 +122,9 @@
     bool isDOL() const {return type == DEF_OUT_OF_LOOP;}
     bool isUndefined() const {return type == UNDEF;}
     int getConst() const {assert(getType()==LD_CONST); return val;}
-    void setConst(int32 v) {assert(getType()==LD_CONST); val=v;}
+    void setConst(I_32 v) {assert(getType()==LD_CONST); val=v;}
     int getIncrement() const {assert(getType()==COUNTER); return val;}
-    void setIncrement(int32 v) {assert(getType()==COUNTER); val=v;}
+    void setIncrement(I_32 v) {assert(getType()==COUNTER); val=v;}
     bool isPhiSplit() const {return phiSplit;}
     void markPhiSplit() {assert(isCounter()); phiSplit = true;}
     
@@ -624,7 +624,7 @@
     Node* origCheckNode = info->branchInst->getNode();
     Edge* origLoopExitEdge = info->branchTargetIsExit ? origCheckNode->getTrueEdge() : origCheckNode->getFalseEdge();
     
-    uint32 maxNodeId = cfg.getMaxNodeId()+1; //+1 for a split check node
+    U_32 maxNodeId = cfg.getMaxNodeId()+1; //+1 for a split check node
     StlBitVector nodesInLoop(mm, maxNodeId);
     {
         const Nodes& loopNodes = loopNode->getNodesInLoop();
@@ -639,7 +639,7 @@
     BitSet aFlags(mm, maxNodeId);
     calculateReachableNodesInLoop(loopNode, origHeader, origCheckNode, aFlags);
     StlBitVector bodyANodes(mm, maxNodeId);
-    for (uint32 i=0;i<maxNodeId;i++) bodyANodes.setBit(i, aFlags.getBit(i));
+    for (U_32 i=0;i<maxNodeId;i++) bodyANodes.setBit(i, aFlags.getBit(i));
     
     //STEP 2: make checkNode a separate node, prepare loop region
     bodyANodes.setBit(origCheckNode->getId(), true);
@@ -668,7 +668,7 @@
         // while duplicating a region new nodes could be created and 'nodesInRegion' bitvector param is updated. 
         // BodyA is part of the loop -> if new nodes were created in the loop we must track them.
         nodesInLoop.resize(bodyANodes.size());
-        for (uint32 i=0;i<bodyANodes.size();i++) nodesInLoop.setBit(i, bodyANodes.getBit(i) || nodesInLoop.getBit(i));
+        for (U_32 i=0;i<bodyANodes.size();i++) nodesInLoop.setBit(i, bodyANodes.getBit(i) || nodesInLoop.getBit(i));
 
         Node* bodyA2PreCheckNode = nodeRenameTable.getMapping(preCheckNode);
         assert(bodyA2PreCheckNode->getOutDegree()==1 && bodyA2PreCheckNode->getUnconditionalEdgeTarget() == checkNode);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryopt.cpp Thu May 22 06:33:38 2008
@@ -97,7 +97,7 @@
 {
     assert(aliasManager);
 
-    uint32 numNodes = df0.getNumNodes();
+    U_32 numNodes = df0.getNumNodes();
     aliasDefSites = new (mm) AliasDefSites(mm, numNodes);
     memPhiSites = new (mm) MemPhiSites(mm, numNodes);
     renameMap = new (mm) AliasRenameMap(mm, aliasManager,
@@ -1825,7 +1825,7 @@
 // a ScopedDomNodeInstWalker, to be applied forwards/pre-order
 class MemoryRenameWalker {
     MemoryOpt *thePass;
-    uint32 timeCount;
+    U_32 timeCount;
 public:
     MemoryRenameWalker(MemoryOpt *thePass0) :
         thePass(thePass0), timeCount(1)
@@ -2248,7 +2248,7 @@
 
 void AliasRenameMap::insert(const AliasRep &rep, Inst *defInst)
 {
-    uint32 timeNow = ++timeCount;
+    U_32 timeNow = ++timeCount;
     AliasBinding newBinding(defInst, timeNow);
 
     if (Log::isEnabled()) {
@@ -2299,7 +2299,7 @@
     // rep and its ancestors which has been set
     AliasBinding bestFound = defMap.lookup(rep);
     Inst *bestInst = bestFound.inst;
-    uint32 bestWhen = bestInst ? bestFound.when : 0;
+    U_32 bestWhen = bestInst ? bestFound.when : 0;
     {    
         
         if (!bestInst) {
@@ -2337,7 +2337,7 @@
             AliasBinding newFound = defMap.lookup(thisAncestor);
             Inst *thisInst = newFound.inst;
             if (thisInst) {
-                uint32 thisWhen = newFound.when;
+                U_32 thisWhen = newFound.when;
                 if (Log::isEnabled()) {
                     Log::out() << "    ";
                     thisAncestor.print(Log::out());
@@ -2380,7 +2380,7 @@
             const AliasRep &desc = *descIter;
             const AliasBinding &descBinding = defMap.lookup(desc);
             Inst *desci = descBinding.inst;
-            uint32 when = descBinding.when;
+            U_32 when = descBinding.when;
             if (when > bestWhen) {             // descendant is newer
                 defs.insert(desci);
             }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryoptrep.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryoptrep.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryoptrep.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/memoryoptrep.h Thu May 22 06:33:38 2008
@@ -131,7 +131,7 @@
 public:
     typedef StlVector<AliasRep> AliasList;
 private:
-    uint32 numAliasReps;
+    U_32 numAliasReps;
     AliasList allAliasReps;
     typedef StlHashMap<AliasRep, StlVectorSet<AliasRep> *> AliasRep2AliasReps;
     AliasRep2AliasReps canon2others;
@@ -206,10 +206,10 @@
 
 class AliasDefSites : public StlHashMap<AliasRep, VarDefSites *> {
     MemoryManager &mm;
-    uint32 numNodes;
+    U_32 numNodes;
 public:
     typedef StlHashMap<AliasRep, VarDefSites *> BaseType;
-    AliasDefSites(MemoryManager &m, uint32 n): BaseType(m), mm(m), numNodes(n) {};
+    AliasDefSites(MemoryManager &m, U_32 n): BaseType(m), mm(m), numNodes(n) {};
     void addAliasDefSite(const AliasRep &rep, Node* node) {
         VarDefSites* aliasSites = (*this)[rep];
         if (!aliasSites) {
@@ -256,8 +256,8 @@
 
 struct AliasBinding {
     Inst *inst;
-    uint32 when;
-    AliasBinding(Inst *inst0=0, uint32 when0=0) : inst(inst0), when(when0) {};
+    U_32 when;
+    AliasBinding(Inst *inst0=0, U_32 when0=0) : inst(inst0), when(when0) {};
 };
 
 bool operator !=(const AliasBinding &a, const AliasBinding &b) {
@@ -266,13 +266,13 @@
     
 class DescendentSet : public StlVectorSet<AliasRep> {
 public:
-    DescendentSet(MemoryManager &m, uint32 depth0) : StlVectorSet<AliasRep>(m), depth(depth0) {};
-    DescendentSet(MemoryManager &m, DescendentSet *other, uint32 depth0)
+    DescendentSet(MemoryManager &m, U_32 depth0) : StlVectorSet<AliasRep>(m), depth(depth0) {};
+    DescendentSet(MemoryManager &m, DescendentSet *other, U_32 depth0)
         : StlVectorSet<AliasRep>(m), depth(depth0)
     {
         insert(other->begin(), other->end());
     }
-    uint32 depth;
+    U_32 depth;
 };
 
 class AliasRenameMap {
@@ -280,8 +280,8 @@
     typedef SparseScopedMap<AliasRep, DescendentSet *> DescendentMap;
     DefMap defMap;
     DescendentMap activeDescendents;
-    uint32 depth;
-    uint32 timeCount;
+    U_32 depth;
+    U_32 timeCount;
     AliasManager *aliasManager;
     MemoryManager &mm;
 public:

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/multiplybyconstant.cpp Thu May 22 06:33:38 2008
@@ -360,7 +360,7 @@
                 assert(ip<len); 
                 int val = data[ip]; ip += 1;
                 Opnd *op = (width32 
-                            ? simp->genLdConstant((int32)(val))->getDst()
+                            ? simp->genLdConstant((I_32)(val))->getDst()
                             : simp->genLdConstant((int64)(val))->getDst());
                 thestack[sp] = op;
                 sp += 1;
@@ -382,7 +382,7 @@
                 assert(ip<len);
                 int val = data[ip]; ip += 1;
                 assert(val <= SMALL_SHIFT_MAXBITS);
-                Opnd *op = simp->genLdConstant((int32)(val))->getDst();
+                Opnd *op = simp->genLdConstant((I_32)(val))->getDst();
                 thestack[sp-2] = simp->genShladd(type, thestack[sp-2], op, thestack[sp-1])->getDst(); 
                 sp -=1; } break;
             case MulOp::neg: assert(sp >= 1); 
@@ -392,7 +392,7 @@
                 assert(sp >= 1); 
                 assert(ip<len);
                 int val = data[ip]; ip += 1;
-                Opnd *op = simp->genLdConstant((int32)(val))->getDst();
+                Opnd *op = simp->genLdConstant((I_32)(val))->getDst();
                 thestack[sp-1] = simp->genShl(type, ShiftMask_None,
                                               thestack[sp-1], op)->getDst();
             } break;
@@ -1005,11 +1005,11 @@
 
 #else // !STANDALONE_TEST
 Opnd *
-Simplifier::planMul32(int32 multiplier, Opnd *opnd)
+Simplifier::planMul32(I_32 multiplier, Opnd *opnd)
 {
     const OptimizerFlags& optimizerFlags = irManager.getOptimizerFlags();
     MulMethod method(!optimizerFlags.ia32_code_gen);
-    planMul<int32, 32>(method, multiplier, 1);
+    planMul<I_32, 32>(method, multiplier, 1);
     if (Log::isEnabled()) {
         Log::out() << "in multiply(" << (int) multiplier << ", ";
         opnd->print(Log::out());

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/opndmap.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/opndmap.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/opndmap.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/opndmap.h Thu May 22 06:33:38 2008
@@ -38,8 +38,8 @@
     // priorValues has previous value for each non-0 elt in theList:
     StlVector<ToType> priorValues;
     FromType zero;
-    uint32 resize_when;
-    uint32 resize_by;
+    U_32 resize_when;
+    U_32 resize_by;
 public:
     SparseScopedMap(MemoryManager& mm) :
         theMap(mm), 
@@ -51,9 +51,9 @@
     {};
     SparseScopedMap(size_t n,  
                     MemoryManager& mm,
-                    uint32 init_factor=1,
-                    uint32 resize_factor=4,
-                    uint32 resize_to=7) :
+                    U_32 init_factor=1,
+                    U_32 resize_factor=4,
+                    U_32 resize_to=7) :
         theMap(mm), 
         theList(mm),
         priorValues(mm),
@@ -106,7 +106,7 @@
     SparseOpndMap(MemoryManager& mm) :
         SparseScopedMap<Opnd *, Opnd *>(mm) {};
     SparseOpndMap(size_t n, MemoryManager& mm,
-                  uint32 init_factor, uint32 resize_factor, uint32 resize_to) :
+                  U_32 init_factor, U_32 resize_factor, U_32 resize_to) :
         SparseScopedMap<Opnd *, Opnd *>(n, mm, init_factor, resize_factor,
                                         resize_to) {};
 };

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optarithmetic.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optarithmetic.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optarithmetic.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optarithmetic.h Thu May 22 06:33:38 2008
@@ -34,10 +34,10 @@
 template <typename inttype, int width> inline int popcount(inttype x);
 template <>
 inline
-int popcount<int32, 32> (int32 x)
+int popcount<I_32, 32> (I_32 x)
 {
 #ifdef _USE_ITANIUM_INTRINSICS_
-    uint32 y = x; // avoid sign extension
+    U_32 y = x; // avoid sign extension
     __m64 z = _m_from_int(int(y));
     __m64 r = __m64_popcnt(z);
     return _m_to_int(r);
@@ -156,7 +156,7 @@
 
 template <>
 inline
-int32 leftmost1<int32>(int32 x)
+I_32 leftmost1<I_32>(I_32 x)
 {
     if (x == 1) return 1;
     if (x == 0) return 0;
@@ -194,14 +194,14 @@
 
 template <>
 inline
-int nlz<int32, 32>(int32 x)
+int nlz<I_32, 32>(I_32 x)
 {
     x = x | (x >> 1);
     x = x | (x >> 2);
     x = x | (x >> 4);
     x = x | (x >> 8);
     x = x | (x >> 16);
-    return popcount<int32, 32>(~x);
+    return popcount<I_32, 32>(~x);
 }
 
 template <>
@@ -271,7 +271,7 @@
 template <typename uinttype> inline uinttype isqrt(uinttype n);
 
 template <> inline uint64 isqrt(uint64 n) { return isqrt_iter(n, (uint64) 65536); }
-template <> inline uint32 isqrt(uint32 n) { return isqrt_iter(n, (uint32) 256); }
+template <> inline U_32 isqrt(U_32 n) { return isqrt_iter(n, (U_32) 256); }
 template <> inline uint16 isqrt(uint16 n) { return isqrt_iter(n, (uint16) 16); }
 template <> inline uint8 isqrt(uint8 n) { return isqrt_iter(n, (uint8) 4); }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optimizer.h Thu May 22 06:33:38 2008
@@ -41,18 +41,18 @@
     bool dumpdot;
 
     // Max number of nodes HIR would grow up to during various inlinings
-    uint32 hir_node_threshold;
+    U_32 hir_node_threshold;
     // A share of node limit inlining may use (in percents), the remaining share is for helper inlining
-    uint32 inline_node_quota;
+    U_32 inline_node_quota;
 
     bool cse_final;
 
-    uint32 hash_init_factor;
-    uint32 hash_resize_factor;
-    uint32 hash_resize_to;
-    uint32 hash_node_var_factor;
-    uint32 hash_node_tmp_factor;
-    uint32 hash_node_constant_factor;
+    U_32 hash_init_factor;
+    U_32 hash_resize_factor;
+    U_32 hash_resize_to;
+    U_32 hash_node_var_factor;
+    U_32 hash_node_tmp_factor;
+    U_32 hash_node_constant_factor;
 
     bool sink_constants;
     bool sink_constants1;
@@ -75,7 +75,7 @@
 
 
     //profiler flags
-    uint32 profile_threshold;
+    U_32 profile_threshold;
     bool use_average_threshold;
     bool use_minimum_threshold;
     bool use_fixed_threshold;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optpass.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optpass.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optpass.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/optpass.cpp Thu May 22 06:33:38 2008
@@ -129,7 +129,7 @@
 void
 OptPass::fixupSsa(IRManager& irm) {
     static CountTime fixupSsaTimer("opt::helper::fixupSsa");
-    static uint32 globalSsaFixupCounter = 0;
+    static U_32 globalSsaFixupCounter = 0;
 
     if(!irm.isSsaUpdated()) {
         AutoTimer tm(fixupSsaTimer);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.cpp Thu May 22 06:33:38 2008
@@ -54,7 +54,7 @@
 
 DEFINE_SESSION_ACTION(OSRPass, osr, "Operator Strength Reduction")
 
-static uint32 signof(int v){ return (v == 0) ? 0 : (v < 0 ? -1 : 1);}
+static U_32 signof(int v){ return (v == 0) ? 0 : (v < 0 ? -1 : 1);}
 
 
 /* The code below is based on loop_unroll processOpnd function. However it
@@ -158,9 +158,9 @@
             }
         } else if ((info1.isCounter() && info2.isLDConst())
                    || (info2.isCounter() && info1.isLDConst())) {
-            uint32 increment = info1.isCounter() ?
+            U_32 increment = info1.isCounter() ?
                 info1.getIncrement() : info2.getIncrement();
-            uint32 diff = info1.isLDConst()? info1.getConst() : info2.getConst();
+            U_32 diff = info1.isLDConst()? info1.getConst() : info2.getConst();
             bool monotonousFlag = increment == 0 || diff == 0
                 || (opcode == Op_Add && signof(diff) == signof(increment))
                 || (opcode == Op_Sub && signof(diff) != signof(increment));
@@ -446,7 +446,7 @@
     }
 }
 
-void OSR::replaceOperand(uint32 num, Inst* inst, SsaOpnd* opnd,
+void OSR::replaceOperand(U_32 num, Inst* inst, SsaOpnd* opnd,
                          Opnd* iv_lead, Node* iv_lead_node,
                          Type* type, Opcode opcode, SsaOpnd* rc,
                          Operation op){
@@ -484,10 +484,10 @@
         Log::out() << std::endl;
     }
 
-    uint32 numOpnds = inst->getNumSrcOperands();
+    U_32 numOpnds = inst->getNumSrcOperands();
     SsaOpnd* iv_lead = getLeadingOperand(iv);
     Node* iv_lead_node = iv_lead->getInst()->getNode();
-    for (uint32 num = 0; num < numOpnds; num++) {
+    for (U_32 num = 0; num < numOpnds; num++) {
         SsaOpnd* opnd = inst->getSrc(num)->asSsaOpnd();
         replaceOperand(num, inst, opnd, iv_lead, iv_lead_node, type,
                        opcode, rc, op);
@@ -555,9 +555,9 @@
         return instFactory.makeStVar(newSsaVar,
                                      old_inst->getSrc(0)->asSsaOpnd());
     } else {
-        uint32 num = old_inst->getNumSrcOperands();
+        U_32 num = old_inst->getNumSrcOperands();
         Opnd** newOpnds = new(mm) Opnd* [num];
-        for (uint32 i = 0; i < num; i++) {
+        for (U_32 i = 0; i < num; i++) {
             newOpnds[i] = old_inst->getSrc(i)->asSsaOpnd();
         }
         return (PhiInst*)instFactory.makePhi(newSsaVar, num, newOpnds);
@@ -786,7 +786,7 @@
 void OSR::performLFTR(Inst* inst){
     Opcode opcode = inst->getOpcode();
     if (opcode == Op_Cmp || opcode == Op_Branch) {
-        uint32 num = inst->getNumSrcOperands();
+        U_32 num = inst->getNumSrcOperands();
         if (2 == num) {
             iv = 0;
             rc = 0;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/osr.h Thu May 22 06:33:38 2008
@@ -86,11 +86,11 @@
     bool isDOL() const {return type == DEF_OUT_OF_LOOP;} 
     bool isUndefined() const {return type == UNDEF;} 
 
-    uint32 getConst() const {
+    U_32 getConst() const {
         assert(getType() == LD_CONST);
         return val;
     }
-    void setConst(uint32 v) {
+    void setConst(U_32 v) {
         assert(getType() == LD_CONST);
         val = v;
     }
@@ -243,7 +243,7 @@
     void replaceOperands(Type* type, Inst* newDef, SsaOpnd* iv,
              SsaOpnd* rc, Opcode opcode, Operation op);
     void findLeadingOpnd(Inst* newDef, SsaOpnd* opnd);
-    void replaceOperand(uint32 num, Inst* newDef, SsaOpnd* o,
+    void replaceOperand(U_32 num, Inst* newDef, SsaOpnd* o,
             Opnd* lead, Node* leadBlock, Type* type,
             Opcode opcode, SsaOpnd* rc, Operation op);
     Inst *findInsertionPlace(SsaOpnd* opnd2, SsaOpnd* opnd1);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.cpp Thu May 22 06:33:38 2008
@@ -62,15 +62,15 @@
     pass.runPass(true, true);
 }
 
-inline uint32 computePriority(uint32 op_cost, uint32 priority0) {
+inline U_32 computePriority(U_32 op_cost, U_32 priority0) {
     if (priority0 == 0) return 0;
     else return op_cost + priority0;
 }
-inline uint32 computePriority(uint32 op_cost, uint32 priority0, uint32 priority1) {
+inline U_32 computePriority(U_32 op_cost, U_32 priority0, U_32 priority1) {
     if (priority0 == 0) return 0;
     else return op_cost + ::std::max(priority0, priority1);
 }
-inline uint32 computePriority(uint32 op_cost, uint32 priority0, uint32 priority1, uint32 priority2) {
+inline U_32 computePriority(U_32 op_cost, U_32 priority0, U_32 priority1, U_32 priority2) {
     if ((priority0 == 0) && (priority1 == 0) && (priority2 == 0)) return 0;
     else return op_cost + ::std::max(::std::max(priority0, priority1), priority2);
 }
@@ -100,11 +100,11 @@
 }
 
 
-uint32 Reassociate::getPriority(Opnd *opnd)
+U_32 Reassociate::getPriority(Opnd *opnd)
 {
     if (priority.has(opnd)) return priority[opnd];
     Inst *inst = opnd->getInst();
-    uint32 opriority = 0;
+    U_32 opriority = 0;
     Operation operation = inst->getOperation();
     Opcode opc = operation.getOpcode();
     switch (opc) {
@@ -159,24 +159,24 @@
     break;
     default:
     if (operation.isMovable()) {
-        uint32 numOpnds = inst->getNumSrcOperands();
+        U_32 numOpnds = inst->getNumSrcOperands();
         opriority = 0;
 
-        for (uint32 i = 0; i<numOpnds; i++) {
+        for (U_32 i = 0; i<numOpnds; i++) {
                 Opnd *opndi = inst->getSrc(i);
-                uint32 argpriority = getPriority(opndi);
+                U_32 argpriority = getPriority(opndi);
                 opriority = ::std::max(opriority, argpriority);
         }
         opriority = computePriority(costOfMisc, opriority);
     } else {
         Inst *previ = inst->getPrevInst();
-        uint32 ipriority = 1;
+        U_32 ipriority = 1;
         while (!previ->isLabel()) {
         ++ipriority;
         previ = previ->getPrevInst();
         }
         Node *block = previ->asLabelInst()->getNode();
-        uint32 bpriority = cfgRpoNum[block];
+        U_32 bpriority = cfgRpoNum[block];
         opriority = ((bpriority * priorityFactorOfBlock)
                          + ipriority)*priorityFactorOfPosition;
     }
@@ -235,7 +235,7 @@
     StlVector<Node *>::reverse_iterator 
     riter = postOrderNodes.rbegin(),
     rend = postOrderNodes.rend();
-    uint32 i = 0;
+    U_32 i = 0;
     while (riter != rend) {
     Node *node = *riter;
     if (Log::isEnabled()) {
@@ -447,11 +447,11 @@
         Opnd *opnd1 = owd1.opnd;
         Opnd *newOpnd = 0;
         bool newNegated = 0;
-        uint32 priority0 = owd0.priority;
-        uint32 priority1 = owd1.priority;
+        U_32 priority0 = owd0.priority;
+        U_32 priority1 = owd1.priority;
         const char *debug_op = "";
         bool debug_swapped = false;
-        uint32 newPriority = 0;
+        U_32 newPriority = 0;
         if (owd0.negate != owd1.negate) {
             if (owd0.negate) {
                 newOpnd = theSimp->genSub(type, Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No),
@@ -560,10 +560,10 @@
         OpndWithPriority owd0 = opnds[0]; 
         OpndWithPriority owd1 = opnds[1];
         Opnd *opnd0 = owd0.opnd;
-        uint32 priority0 = owd0.priority;
+        U_32 priority0 = owd0.priority;
         bool neg0 = owd0.negate;
         Opnd *opnd1 = owd1.opnd;
-        uint32 priority1 = owd1.priority;
+        U_32 priority1 = owd1.priority;
         bool neg1 = owd1.negate;
 
         if ((opnd0 == opnd1) && (opndsize > 3)
@@ -574,7 +574,7 @@
             OpndWithPriority owd2 = opnds[2]; 
             OpndWithPriority owd3 = opnds[3];
             Opnd *opnd2 = owd2.opnd;
-            uint32 priority2 = owd2.priority;
+            U_32 priority2 = owd2.priority;
 
             Opnd *newOpnd0 = theSimp->genMul(type, Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No),
                                              opnd0, opnd2)->getDst();
@@ -583,9 +583,9 @@
             opnds.pop_front();
             opnds.pop_front();
             opnds.pop_front();
-            uint32 priorityNew0 = computePriority(costOfMul, priority0,
+            U_32 priorityNew0 = computePriority(costOfMul, priority0,
                                                   priority2);
-            uint32 priorityNew1 = computePriority(costOfMul, 
+            U_32 priorityNew1 = computePriority(costOfMul, 
                                                   priorityNew0,
                                                   priorityNew0);
             OpndWithPriority newelt(newOpnd1, priorityNew1, 
@@ -604,7 +604,7 @@
             
             opnds[0] = newelt;
             opndsize -= 3;
-            uint32 i = 1;
+            U_32 i = 1;
             while (i < opndsize) {
                 if (opnds[i].priority < priorityNew1) {
                     opnds[i-1] = opnds[i];
@@ -618,7 +618,7 @@
             Opnd *newOpnd = theSimp->genMul(type, Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No),
                                             opnd0, opnd1)->getDst();
             opnds.pop_front();
-            uint32 priority = computePriority(costOfMul, priority0, priority1);
+            U_32 priority = computePriority(costOfMul, priority0, priority1);
             OpndWithPriority newelt(newOpnd, priority, neg0 ^ neg1);
             
             if (Log::isEnabled()) {
@@ -633,7 +633,7 @@
             
             opnds[0] = newelt;
             opndsize -= 1;
-            uint32 i = 1;
+            U_32 i = 1;
             while (i < opndsize) {
                 if (opnds[i].priority < priority) {
                     opnds[i-1] = opnds[i];
@@ -718,11 +718,11 @@
         Opnd *opnd1 = owd1.opnd;
         Opnd *newOpnd = 0;
         bool newNegated = 0;
-        uint32 priority0 = owd0.priority;
-        uint32 priority1 = owd1.priority;
+        U_32 priority0 = owd0.priority;
+        U_32 priority1 = owd1.priority;
         const char *debug_op = "";
         bool debug_swapped = false;
-        uint32 newPriority = 0;
+        U_32 newPriority = 0;
         if (owd0.negate != owd1.negate) {
             if (owd0.negate) {
                 newOpnd = theSimp->genSub(type, Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No),

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/reassociate.h Thu May 22 06:33:38 2008
@@ -48,11 +48,11 @@
 class Simplifier;
 
 struct OpndWithPriority {
-    OpndWithPriority(Opnd *op, uint32 priority0,
+    OpndWithPriority(Opnd *op, U_32 priority0,
                      bool negate0) 
         : opnd(op), priority(priority0), negate(negate0) {};
     Opnd *opnd;
-    uint32 priority;
+    U_32 priority;
     bool negate;
 };
 bool operator < (const OpndWithPriority &a, const OpndWithPriority &b);
@@ -109,22 +109,22 @@
     
 private:
     // we compute Reverse-Postorder numbers for CFGnodes:
-    StlHashMap<Node *, uint32> cfgRpoNum;
+    StlHashMap<Node *, U_32> cfgRpoNum;
 
-    StlHashMap<Opnd *, uint32> priority;
-    uint32 getPriority(Opnd *opnd); // computes if not in the hash map
+    StlHashMap<Opnd *, U_32> priority;
+    U_32 getPriority(Opnd *opnd); // computes if not in the hash map
 
     // build a LdConstant(k), put it in header of FlowGraph
     SsaTmpOpnd *makeLdConst(Type *type, ConstInst::ConstValue k, SsaOpnd *dstOp);
 
-    uint32 costOfAdd, costOfSub, 
+    U_32 costOfAdd, costOfSub, 
         costOfNeg, costOfMul, costOfConv, costOfBoolOp,
     costOfNot, costOfShladd, costOfShift, costOfMisc, 
     priorityFactorOfBlock, priorityFactorOfPosition;
-    uint32 numBlocks;
+    U_32 numBlocks;
     
     bool minDepth;
-    uint32 maxReassocDepth;
+    U_32 maxReassocDepth;
 };
 
 } //namespace Jitrino 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp Thu May 22 06:33:38 2008
@@ -803,7 +803,7 @@
     if (src1 == src2) {
         ConstInst::ConstValue zeroval;
         switch(type->tag) {
-        case Type::Int32: return genLdConstant((int32)0)->getDst();
+        case Type::Int32: return genLdConstant((I_32)0)->getDst();
         case Type::Int64: return genLdConstant((int64)0)->getDst();
         default: assert(0); return NULL;
         }
@@ -922,7 +922,7 @@
         Inst *inst1 = src1->getInst();
         Type::Tag typeTag1 = inst1->getType();
         int64 val64;
-        int32 val32;
+        I_32 val32;
         if (ConstantFolder::isConstant(src1->getInst(), val64) &&
             (inst2->getOpcode() == Op_Conv) &&
             (((typeTag2 == Type::Int8) && (((uint64)val64) <= 0xff)) ||
@@ -943,18 +943,18 @@
         }
     } else if (ConstantFolder::isConstant(src1->getInst(), val32) &&
            (inst2->getOpcode() == Op_Conv) &&
-           (((typeTag2 == Type::Int8) && (((uint32)val32) <= 0xff)) ||
-            ((typeTag2 == Type::Int16) && (((uint32)val32) <= 0xffff)) ||
-            ((typeTag2 == Type::Int32) && (((uint32)val32) <= 0xffffffff)))) {
+           (((typeTag2 == Type::Int8) && (((U_32)val32) <= 0xff)) ||
+            ((typeTag2 == Type::Int16) && (((U_32)val32) <= 0xffff)) ||
+            ((typeTag2 == Type::Int32) && (((U_32)val32) <= 0xffffffff)))) {
         Opnd *src2opnd = inst2->getSrc(0);
         if (src2opnd->getType() == src2->getType()) {
         return genAnd(theType, src1, src2opnd)->getDst();
         }
     } else if (ConstantFolder::isConstant(src2->getInst(), val32) &&
            (inst1->getOpcode() == Op_Conv) &&
-           (((typeTag1 == Type::Int8) && (((uint32)val32) <= 0xff)) ||
-            ((typeTag1 == Type::Int16) && (((uint32)val32) <= 0xffff)) ||
-            ((typeTag1 == Type::Int32) && (((uint32)val32) <= 0xffffffff)))) {
+           (((typeTag1 == Type::Int8) && (((U_32)val32) <= 0xff)) ||
+            ((typeTag1 == Type::Int16) && (((U_32)val32) <= 0xffff)) ||
+            ((typeTag1 == Type::Int32) && (((U_32)val32) <= 0xffffffff)))) {
         Opnd *src1opnd = inst1->getSrc(0);
         if (src1opnd->getType() == src1->getType()) {
         return genAnd(theType, src1opnd, src2)->getDst();
@@ -980,17 +980,17 @@
         }
     } else if (ConstantFolder::isConstant(src1->getInst(), val32) &&
            (inst2->getOpcode() == Op_TauLdInd) &&
-           (((typeTag2 == Type::UInt8) && (((uint32)val32) == 0xff)) ||
-            ((typeTag2 == Type::UInt16) && (((uint32)val32) == 0xffff)) ||
-            ((typeTag2 == Type::UInt32) && (((uint32)val32) == 0xffffffff)))) {
+           (((typeTag2 == Type::UInt8) && (((U_32)val32) == 0xff)) ||
+            ((typeTag2 == Type::UInt16) && (((U_32)val32) == 0xffff)) ||
+            ((typeTag2 == Type::UInt32) && (((U_32)val32) == 0xffffffff)))) {
         if (theType == src2->getType()) {
         return src2;
         }
     } else if (ConstantFolder::isConstant(src2->getInst(), val32) &&
            (inst1->getOpcode() == Op_TauLdInd) &&
-           (((typeTag1 == Type::UInt8) && (((uint32)val32) == 0xff)) ||
-            ((typeTag1 == Type::UInt16) && (((uint32)val32) == 0xffff)) ||
-            ((typeTag1 == Type::UInt32) && (((uint32)val32) == 0xffffffff)))) {
+           (((typeTag1 == Type::UInt8) && (((U_32)val32) == 0xff)) ||
+            ((typeTag1 == Type::UInt16) && (((U_32)val32) == 0xffff)) ||
+            ((typeTag1 == Type::UInt32) && (((U_32)val32) == 0xffffffff)))) {
         if (theType == src1->getType()) {
         return src1;
         }
@@ -1192,14 +1192,14 @@
             case Type::Int32:
             case Type::UInt32:
                 if (src1isConstant) {
-                    int32 multiplier;
+                    I_32 multiplier;
                     bool t = ConstantFolder::isConstant(src1->getInst(), 
                                                         multiplier);
                     if( !t) assert(0);
                     Opnd *product = planMul32(multiplier, src2);
                     return product;
                 } else { // src2isConstant
-                    int32 multiplier;
+                    I_32 multiplier;
                     bool t = ConstantFolder::isConstant(src2->getInst(), 
                                                         multiplier);
                     if( !t) assert(0);
@@ -1295,7 +1295,7 @@
             switch (type->tag) {
             case Type::Int32:
             case Type::UInt32:
-                return genLdConstant((int32) 0)->getDst();
+                return genLdConstant((I_32) 0)->getDst();
             case Type::Int64:
             case Type::UInt64:
                 return genLdConstant((int64) 0)->getDst();
@@ -1330,7 +1330,7 @@
             case Type::UInt32:
                 if (src1isConstant) {
                     TypeManager &tm = irManager.getTypeManager();
-                    int32 multiplier;
+                    I_32 multiplier;
                     bool t = ConstantFolder::isConstant(src1->getInst(), 
                                                         multiplier);
                     if( !t) assert(0);
@@ -1341,7 +1341,7 @@
                                             Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No),
                                             src2)->getDst();
                     Opnd *product = planMul32(multiplier, src2_64);
-                    Opnd *thirtytwo = genLdConstant((int32)(32))->getDst();
+                    Opnd *thirtytwo = genLdConstant((I_32)(32))->getDst();
                     Opnd *shifted = genShr(dstType64, 
                                            Modifier(UnsignedOp)|Modifier(ShiftMask_None),
                                            product, thirtytwo)->getDst();
@@ -1350,7 +1350,7 @@
                                         shifted)->getDst();
                     return res;
                 } else { // src2isConstant
-                    int32 multiplier;
+                    I_32 multiplier;
                     bool t = ConstantFolder::isConstant(src2->getInst(), 
                                                         multiplier);
                     if( !t) assert(0);
@@ -1361,7 +1361,7 @@
                                             Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No),
                                             src1)->getDst();
                     Opnd *product = planMul32(multiplier, src1_64);
-                    Opnd *thirtytwo = genLdConstant((int32)(32))->getDst();
+                    Opnd *thirtytwo = genLdConstant((I_32)(32))->getDst();
                     Opnd *shifted = genShr(dstType64, 
                                            Modifier(UnsignedOp)|Modifier(ShiftMask_None),
                                            product, thirtytwo)->getDst();
@@ -1489,30 +1489,30 @@
             (dstType->tag == Type::Int32) &&
             mod.isSigned()) {
 
-            int32 denom = value2.i4;
+            I_32 denom = value2.i4;
             // note that 0 and 1 were handled above
             if (denom == -1) {
                 // convert to neg
                 Opnd *res = genNeg(dstType, src1)->getDst();
                 return res;
-            } else if (isPowerOf2<int32>(denom)) {
+            } else if (isPowerOf2<I_32>(denom)) {
                 // convert to shift and such
-                int32 absdenom = (denom < 0) ? -denom : denom;
-                int k = whichPowerOf2<int32,32>(absdenom);
-                Opnd *kminus1 = genLdConstant((int32)(k - 1))->getDst();
+                I_32 absdenom = (denom < 0) ? -denom : denom;
+                int k = whichPowerOf2<I_32,32>(absdenom);
+                Opnd *kminus1 = genLdConstant((I_32)(k - 1))->getDst();
                 // make k-1 copies of the sign bit
                 Opnd *shiftTheSign = genShr(dstType, 
                                             Modifier(SignedOp)|Modifier(ShiftMask_None),
                                             src1, kminus1)->getDst();
                 // we 32-k zeros in on left to put copies of sign on right
-                Opnd *t32minusk = genLdConstant((int32)(32-k))->getDst();
+                Opnd *t32minusk = genLdConstant((I_32)(32-k))->getDst();
                 // if (n<0), this is 2^k-1, else 0
                 Opnd *kminus1ones = genShr(dstType, 
                                            Modifier(UnsignedOp)|Modifier(ShiftMask_None),
                                            shiftTheSign, t32minusk)->getDst();
                 Opnd *added = genAdd(dstType, Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No),
                                      src1, kminus1ones)->getDst();
-                Opnd *kOpnd = genLdConstant((int32)k)->getDst();
+                Opnd *kOpnd = genLdConstant((I_32)k)->getDst();
                 Opnd *res = genShr(dstType, Modifier(SignedOp)|Modifier(ShiftMask_None),
                                    added, kOpnd)->getDst();
                 if (denom != absdenom) { // ((denom < 0) && (k < 31))
@@ -1521,8 +1521,8 @@
                 return res;
             } else {
                 // convert to MulHi and such
-                int32 magicNum, shiftBy;
-                getMagic<int32, uint32, 32>(denom, &magicNum, &shiftBy);
+                I_32 magicNum, shiftBy;
+                getMagic<I_32, U_32, 32>(denom, &magicNum, &shiftBy);
                 
                 Opnd *mulRes;
                 if (optimizerFlags.use_mulhi) {
@@ -1537,7 +1537,7 @@
                                           src1)->getDst();
                     Opnd *mulRes64 = genMul(dstType64, Modifier(Overflow_None)|Modifier(Exception_Never)|Modifier(Strict_No), magicOpnd,
                                             src64)->getDst();
-                    Opnd *constant32 = genLdConstant((int32)32)->getDst();
+                    Opnd *constant32 = genLdConstant((I_32)32)->getDst();
                     Opnd *mulRes64h = genShr(dstType64, 
                                              Modifier(SignedOp)|Modifier(ShiftMask_None),
                                              mulRes64,
@@ -1558,7 +1558,7 @@
                 Opnd *shiftByOpnd = genLdConstant(shiftBy)->getDst();
                 mulRes = genShr(dstType, Modifier(SignedOp)|Modifier(ShiftMask_None),
                                 mulRes, shiftByOpnd)->getDst();
-                Opnd *thirtyOne = genLdConstant((int32)31)->getDst();
+                Opnd *thirtyOne = genLdConstant((I_32)31)->getDst();
                 Opnd *oneIfNegative = genShr(dstType,
                                              Modifier(UnsignedOp)|Modifier(ShiftMask_None),
                                              ((denom < 0) 
@@ -1613,7 +1613,7 @@
         if (ConstantFolder::isConstantOne(src2)) {
             ConstInst::ConstValue zeroval;
             switch(dstType->tag) {
-            case Type::Int32: return genLdConstant((int32)0)->getDst();
+            case Type::Int32: return genLdConstant((I_32)0)->getDst();
             case Type::Int64: return genLdConstant((int64)0)->getDst();
             default: assert(0); return NULL;
             }
@@ -1627,22 +1627,22 @@
         Inst *src2inst = src2->getInst();
         ConstInst::ConstValue cv;
         if (ConstantFolder::isConstant(src2inst, cv.i4)) {
-            int32 denom = cv.i4;
+            I_32 denom = cv.i4;
             if ((denom == -1) || (denom == 1)) {
                 //
                 // s1 % +-1 -> 0 
                 //
-                return genLdConstant((int32)0)->getDst();
+                return genLdConstant((I_32)0)->getDst();
             }
-            if (isPowerOf2<int32>(denom)) {
-                int k = whichPowerOf2<int32,32>(denom);
-                int32 maskInt = (((int32)0x1)<<k)-1;
+            if (isPowerOf2<I_32>(denom)) {
+                int k = whichPowerOf2<I_32,32>(denom);
+                I_32 maskInt = (((I_32)0x1)<<k)-1;
                 Opnd *maskOpnd = genLdConstant(maskInt)->getDst();
                 Opnd *maskedOpnd = genAnd(src1->getType(),
                                           src1, maskOpnd)->getDst();
                 Opnd *res = maskedOpnd;
                 if (denom < 0) {
-                    int32 signInt = ((int32)-1) ^ maskInt;
+                    I_32 signInt = ((I_32)-1) ^ maskInt;
                     Opnd *extendedSign 
                         = genLdConstant(signInt)->getDst();
                     res = genOr(src1->getType(), res, extendedSign)->getDst();
@@ -1750,35 +1750,35 @@
         if (dstType == src->getType())
         return src;
     }
-    int32 val32;
+    I_32 val32;
     if (ConstantFolder::isConstant(src0->getInst(), val32) &&
         (((toType == Type::UInt8)
-          && (((uint32)val32) <= 0xff)) ||
+          && (((U_32)val32) <= 0xff)) ||
              ((toType == Type::Int8) 
-          && (((uint32)val32) <= 0x7f)) ||
+          && (((U_32)val32) <= 0x7f)) ||
          ((toType == Type::UInt16)
-          && (((uint32)val32) <= 0xffff)) ||
+          && (((U_32)val32) <= 0xffff)) ||
          ((toType == Type::Int16) 
-          && (((uint32)val32) <= 0x7fff)) ||
+          && (((U_32)val32) <= 0x7fff)) ||
          ((toType == Type::UInt32)
-          && (((uint32)val32) <= 0xffffffff)) ||
+          && (((U_32)val32) <= 0xffffffff)) ||
          ((toType == Type::Int32) 
-          && (((uint32)val32) <= 0x7fffffff)))) {
+          && (((U_32)val32) <= 0x7fffffff)))) {
         if (dstType == src->getType())
         return src;
     } else if (ConstantFolder::isConstant(src1->getInst(), val32) &&
         (((toType == Type::UInt8)
-          && (((uint32)val32) <= 0xff)) ||
+          && (((U_32)val32) <= 0xff)) ||
              ((toType == Type::Int8)
-              && (((uint32)val32) <= 0x7f)) ||
+              && (((U_32)val32) <= 0x7f)) ||
          ((toType == Type::UInt16)
-          && (((uint32)val32) <= 0xffff)) ||
+          && (((U_32)val32) <= 0xffff)) ||
          ((toType == Type::Int16) 
-          && (((uint32)val32) <= 0x7fff)) ||
+          && (((U_32)val32) <= 0x7fff)) ||
          ((toType == Type::UInt32)
-          && (((uint32)val32) <= 0xffffffff)) ||
+          && (((U_32)val32) <= 0xffffffff)) ||
          ((toType == Type::Int32) 
-          && (((uint32)val32) <= 0x7fffffff)))) {
+          && (((U_32)val32) <= 0x7fffffff)))) {
         if (dstType == src->getType())
         return src;
     }
@@ -1915,7 +1915,7 @@
             if (ConstantFolder::isConstantZero(src1) && 
                 ((mod & Cmp_Mask)==Cmp_GT_Un)) {
                 switch (dstType->tag) {
-                case Type::Int32: return genLdConstant((int32)0)->getDst();
+                case Type::Int32: return genLdConstant((I_32)0)->getDst();
                 default:
                     break;
                 }
@@ -1924,7 +1924,7 @@
     } else if (ConstantFolder::isConstantZero(src2) &&
                ((mod & Cmp_Mask) == Cmp_GTE_Un)) {
         switch (dstType->tag) {
-        case Type::Int32: return genLdConstant((int32)1)->getDst();
+        case Type::Int32: return genLdConstant((I_32)1)->getDst();
         default:
             break;
         }
@@ -1933,9 +1933,9 @@
     if ((src1 == src2) && !Type::isFloatingPoint(instType)) {
         switch (mod & Cmp_Mask) {
         case Cmp_EQ: case Cmp_GTE: case Cmp_GTE_Un:
-            return genLdConstant((int32)1)->getDst();
+            return genLdConstant((I_32)1)->getDst();
         case Cmp_NE_Un: case Cmp_GT: case Cmp_GT_Un:
-            return genLdConstant((int32)0)->getDst();
+            return genLdConstant((I_32)0)->getDst();
         default:
             assert(0);
         }
@@ -1977,7 +1977,7 @@
                                         srcInst1->getValue(), 
                                         srcInst2->getValue(), res)) {
                 if (res.i4) {
-                    return genLdConstant((int32)1)->getDst();
+                    return genLdConstant((I_32)1)->getDst();
                 } else {
                     ComparisonModifier mod2 = mod;
                     if (Type::isFloatingPoint(instType)) {
@@ -1992,10 +1992,10 @@
                     if (ConstantFolder::foldCmp(instType, mod2,
                                                 srcInst2->getValue(), 
                                                 srcInst1->getValue(), res)) {
-                        if ((uint32)res.i4) {
-                            return genLdConstant((int32)-1)->getDst();
+                        if ((U_32)res.i4) {
+                            return genLdConstant((I_32)-1)->getDst();
                         } else {
-                            return genLdConstant((int32)0)->getDst();
+                            return genLdConstant((I_32)0)->getDst();
                         }
                     }                    
                 }
@@ -2007,9 +2007,9 @@
     if ((src1 == src2) && !Type::isFloatingPoint(instType)) {
         switch (mod & Cmp_Mask) {
         case Cmp_EQ: case Cmp_GTE: case Cmp_GTE_Un:
-            return genLdConstant((int32)1)->getDst();
+            return genLdConstant((I_32)1)->getDst();
         case Cmp_NE_Un: case Cmp_GT: case Cmp_GT_Un:
-            return genLdConstant((int32)0)->getDst();
+            return genLdConstant((I_32)0)->getDst();
         default:
             assert(0);
         }
@@ -2238,7 +2238,7 @@
     ConstInst::ConstValue valC;
     if (src1->getInst()->getOpcode() == Op_Cmp3) {
         if (ConstantFolder::isConstant(src2->getInst(), valC)) {
-            int32 val = valC.i4;
+            I_32 val = valC.i4;
             if (((val == 0) && (mod == Cmp_GT)) ||
                 ((val == 1) && ((mod == Cmp_GTE) || (mod == Cmp_EQ)))) {
                 // test == 1
@@ -2284,7 +2284,7 @@
         }            
     } else if (src2->getInst()->getOpcode() == Op_Cmp3) {
         if (ConstantFolder::isConstant(src1->getInst(), valC)) {
-            int32 val = valC.i4;
+            I_32 val = valC.i4;
             // val cmp Cmp3
             if ((val == 1) && (mod == Cmp_EQ)) {
                 // 1 == test
@@ -2343,7 +2343,7 @@
 {
     ConstInst::ConstValue valC;
     if (ConstantFolder::isConstant(src1->getInst(), valC)) {
-        int32 val = valC.i4;
+        I_32 val = valC.i4;
         if (((val == 0) && (mod == Cmp_NE_Un)) ||
             ((val == 1) && (mod == Cmp_EQ))) {
             // same test as src1;
@@ -2363,7 +2363,7 @@
             return true;
         }
     } else if (ConstantFolder::isConstant(src2->getInst(), valC)) {
-        int32 val = valC.i4;
+        I_32 val = valC.i4;
         if (((val == 0) && ((mod == Cmp_GT) || (mod == Cmp_NE_Un)
                             || (mod == Cmp_GT_Un))) ||
             ((val == 1) && ((mod == Cmp_GTE) || (mod == Cmp_EQ)
@@ -2793,19 +2793,19 @@
 }
 
 bool
-Simplifier::simplifySwitch(uint32 numLabels,
+Simplifier::simplifySwitch(U_32 numLabels,
                            LabelInst* label[],
                            LabelInst* defaultLabel,
                            Opnd* src) {
     assert(numLabels > 0);
     // check for just 1 target
     LabelInst* label1 = label[0];
-    uint32 i;
+    U_32 i;
     for (i = 1; i<numLabels; i++) {
         if (label[i] != label1) return false; // we have >1 distinct labels
     }
     // have just 1 target;
-    Opnd* numTargets = genLdConstant((int32) numLabels)->getDst();
+    Opnd* numTargets = genLdConstant((I_32) numLabels)->getDst();
     genBranch(Type::Int32, Cmp_GT_Un, label1, numTargets, src);
     return true;
 }
@@ -2846,9 +2846,9 @@
     ConstInst* constIndex = index->getInst()->asConstInst();
     if (constArrayLen && constIndex) {
         // compare the constant size and index
-        int32 result = 0;
-        int32 lenv = constArrayLen->getValue().i4;
-        int32 idxv = constIndex->getValue().i4;
+        I_32 result = 0;
+        I_32 lenv = constArrayLen->getValue().i4;
+        I_32 idxv = constIndex->getValue().i4;
         if (ConstantFolder::foldCmp32(Cmp_GT_Un,
                       lenv, idxv, result)) {
             if (result == 1) {
@@ -2881,9 +2881,9 @@
     ConstInst* constIndex = idx->getInst()->asConstInst();
     if (constLB != NULL && constIndex != NULL) {
         // compare the constant size and index
-        int32 result = 0;
-        int32 lbv = constLB->getValue().i4;
-        int32 idxv = constIndex->getValue().i4;
+        I_32 result = 0;
+        I_32 lbv = constLB->getValue().i4;
+        I_32 idxv = constIndex->getValue().i4;
         if (ConstantFolder::foldCmp32(Cmp_GT,
                                       lbv,
                                       idxv,
@@ -2922,9 +2922,9 @@
     ConstInst* constIndex = idx->getInst()->asConstInst();
     if (constUB != NULL && constIndex != NULL) {
         // compare the constant size and index
-        int32 result = 0;
-        int32 idxv = constIndex->getValue().i4;
-        int32 ubv = constUB->getValue().i4;
+        I_32 result = 0;
+        I_32 idxv = constIndex->getValue().i4;
+        I_32 ubv = constUB->getValue().i4;
         if (ConstantFolder::foldCmp32(Cmp_GT,
                                       ubv,
                                       idxv,
@@ -2959,7 +2959,7 @@
 //
 Opnd*
 Simplifier::simplifyTauCheckZero(Opnd* opnd, bool &alwaysThrows) {
-    int32 value;
+    I_32 value;
     if (ConstantFolder::isConstant(opnd->getInst(), value)) {
         if (value != 0)
             return genTauSafe()->getDst(); // check is safe by construction
@@ -2983,10 +2983,10 @@
 Opnd*
 Simplifier::simplifyTauCheckDivOpnds(Opnd* src1, Opnd* src2, bool &alwaysThrows) {
     // look for anything other than src1=MAXNEGINT, src2=-1
-    int32 value;
+    I_32 value;
     bool elim = false;
     if (ConstantFolder::isConstant(src1->getInst(), value)) {
-        if ((uint32)value != 0x80000000) {
+        if ((U_32)value != 0x80000000) {
             // overflow can't happen
             elim = true;
         } else if (ConstantFolder::isConstant(src2->getInst(), value) &&
@@ -3000,7 +3000,7 @@
         elim = true;
     }
     if (!elim) {
-        // above constant folders return false if opnd is not int32
+        // above constant folders return false if opnd is not I_32
         // try int64 instead
         int64 value64;
         if (ConstantFolder::isConstant(src1->getInst(), value64)) {
@@ -3096,17 +3096,17 @@
     bool srcIsNonNull = (tauCheckedNull->getInst()->getOpcode() != Op_TauUnsafe);
     if (srcIsNonNull &&
         irManager.getTypeManager().isResolvedAndSubClassOf(srcType, type)) {
-        return genLdConstant((int32)1)->getDst();
+        return genLdConstant((I_32)1)->getDst();
     } 
 
     // If src is definitely a null object, then the result is 0.
     if ((!srcIsNonNull) && isNullObject(src)) {
-        return genLdConstant((int32)0)->getDst();
+        return genLdConstant((I_32)0)->getDst();
     }
 
     if (isExactType(src) &&
         !irManager.getTypeManager().isResolvedAndSubClassOf(srcType, type))
-        return genLdConstant((int32)0)->getDst();
+        return genLdConstant((I_32)0)->getDst();
 
     return NULL;
 }
@@ -3473,7 +3473,7 @@
 
 Opnd *
 Simplifier::simplifyLdRef(Modifier mod, Type* dstType,
-                          uint32 token, MethodDesc* enclosingMethod)
+                          U_32 token, MethodDesc* enclosingMethod)
 {
     const OptimizerFlags& optimizerFlags = irManager.getOptimizerFlags();
     if (optimizerFlags.reduce_compref && 
@@ -3567,7 +3567,7 @@
                                    Type* returnType,
                                    Opnd* tauNullCheckedFirstArg,
                                    Opnd* tauTypesChecked,
-                                   uint32 numArgs,
+                                   U_32 numArgs,
                                    Opnd* args[])
 {
     //
@@ -3593,7 +3593,7 @@
                                          Type* returnType,
                                          Opnd* tauNullCheckedFirstArg,
                                          Opnd* tauTypesChecked,
-                                        uint32 numArgs,
+                                        U_32 numArgs,
                                         Opnd** args)
 {
     return simplifyIndirectMemoryCallInst(funPtr, returnType, 
@@ -3606,7 +3606,7 @@
                                            Type* returnType,
                                            Opnd* tauNullCheckedFirstArg,
                                            Opnd* tauTypesChecked,
-                                          uint32 numArgs,
+                                          U_32 numArgs,
                                           Opnd** args)
 {
     // if funptr is a load of a fun slot that does not go through a vtable, then
@@ -3626,10 +3626,10 @@
 Opnd*
 Simplifier::simplifyTauAnd(MultiSrcInst *inst)
 {
-    uint32 nsrcs = inst->getNumSrcOperands();
-    uint32 nsrcs0 = nsrcs;
+    U_32 nsrcs = inst->getNumSrcOperands();
+    U_32 nsrcs0 = nsrcs;
     {
-        for (uint32 i = 0; i < nsrcs; ++i) {
+        for (U_32 i = 0; i < nsrcs; ++i) {
             Opnd *srci = inst->getSrc(i);
             Opcode opcode = srci->getInst()->getOpcode();
             if (opcode == Op_TauUnsafe) {
@@ -3710,12 +3710,12 @@
 Inst*
 Simplifier::caseSwitch(SwitchInst* inst) {
     Opnd* index = inst->getSrc(0);
-    int32 value;
+    I_32 value;
     if(ConstantFolder::isConstant(index->getInst(), value)) {
         foldSwitch(inst, value);
         return NULL;
     } else {
-        uint32 numTarget = inst->getNumTargets();
+        U_32 numTarget = inst->getNumTargets();
         LabelInst** targets = inst->getTargets();
         LabelInst* defaultTarget = inst->getDefaultTarget();
         if(simplifySwitch(numTarget, targets, defaultTarget, index)) {
@@ -3730,7 +3730,7 @@
     Opnd* dst = inst->getDst();
     Type* returnType = dst->isNull()? irManager.getTypeManager().getVoidType() : dst->getType();
     Opnd** args = inst->getArgs();
-    uint32 numArgs = inst->getNumArgs();
+    U_32 numArgs = inst->getNumArgs();
     assert(numArgs >= 2);
     Opnd* tauNullCheckedFirstArg = args[0];
     Opnd* tauTypesChecked = args[1];
@@ -3751,7 +3751,7 @@
     Opnd* dst = inst->getDst();
     Type* returnType = dst->isNull()? irManager.getTypeManager().getVoidType() : dst->getType();
     Opnd** args = inst->getArgs();
-    uint32 numArgs = inst->getNumArgs();
+    U_32 numArgs = inst->getNumArgs();
     assert(numArgs >= 2);
     Opnd* tauNullCheckedFirstArg = args[0];
     Opnd* tauTypesChecked = args[1];
@@ -3801,7 +3801,7 @@
 }
 
 void  
-SimplifierWithInstFactory::foldSwitch(SwitchInst* switchInst, uint32 index) {
+SimplifierWithInstFactory::foldSwitch(SwitchInst* switchInst, U_32 index) {
     FlowGraph::foldSwitch(flowGraph, switchInst,index);
 }
 
@@ -3811,13 +3811,13 @@
     FlowGraph::eliminateCheck(flowGraph, currentCfgNode,checkInst,alwaysThrows);
 }
 
-uint32
+U_32
 SimplifierWithInstFactory::simplifyControlFlowGraph() {
     if (Log::isEnabled()) {
         Log::out() << "Starting simplifyControlFlowGraph" << ::std::endl;
     }
 
-    uint32 numInstOptimized = 0;
+    U_32 numInstOptimized = 0;
     MemoryManager memManager("SimplifierWithInstFactory::simplifyControlFlowGraph");
     BitSet* reachableNodes = new (memManager) BitSet(memManager,flowGraph.getMaxNodeId());
     BitSet* unreachableInsts = 
@@ -4152,7 +4152,7 @@
                                       Type* returnType,
                                       Opnd* tauNullCheckedFirstArg,
                                       Opnd* tauTypesChecked,
-                                     uint32 numArgs,
+                                     U_32 numArgs,
                                       Opnd* args[])
 {
     Opnd* dst;
@@ -4169,7 +4169,7 @@
     return inst;
 }
 Inst*
-SimplifierWithInstFactory::genLdConstant(int32 val) {
+SimplifierWithInstFactory::genLdConstant(I_32 val) {
     Opnd* dst = opndManager.createSsaTmpOpnd(typeManager.getInt32Type());
     Inst* inst = instFactory.makeLdConst(dst, val);
     insertInst(inst);
@@ -4219,7 +4219,7 @@
 
 Inst* 
 SimplifierWithInstFactory::genLdRef(Modifier mod, Type* type, 
-                                    uint32 token,
+                                    U_32 token,
                                     MethodDesc *methodDesc)
 {
     Opnd* dst = opndManager.createSsaTmpOpnd(type);
@@ -4499,7 +4499,7 @@
 
 
 static Class_Handle getClassHandle(Opnd* opnd) {
-    //class handle can be: unmanaged ptr (from magics) or pointer_size_int const (int32 or int64) if loaded as a const
+    //class handle can be: unmanaged ptr (from magics) or pointer_size_int const (I_32 or int64) if loaded as a const
     //assert(opnd->getType()->isUnmanagedPtr() || opnd->getType()->isInt4() || opnd->getType()->isInt8());
     assert(opnd->getType()->isUnmanagedPtr());
     Inst* inst = opnd->getInst();
@@ -4518,7 +4518,7 @@
         case ClassIsArray:
             ch = getClassHandle(inst->getSrc(0));
             if (ch) {
-                res = genLdConstant((int32)VMInterface::isArrayType(ch));
+                res = genLdConstant((I_32)VMInterface::isArrayType(ch));
             }
             break;
         case ClassGetAllocationHandle:
@@ -4533,25 +4533,25 @@
         case ClassGetTypeSize:
             ch = getClassHandle(inst->getSrc(0));
             if (ch) {
-                res = genLdConstant((int32)VMInterface::getObjectSize(ch));
+                res = genLdConstant((I_32)VMInterface::getObjectSize(ch));
             }
             break;
         case ClassGetArrayElemSize:
             ch = getClassHandle(inst->getSrc(0));
             if (ch) {
-                res = genLdConstant((int32)VMInterface::getArrayElemSize(ch));
+                res = genLdConstant((I_32)VMInterface::getArrayElemSize(ch));
             }
             break;
         case ClassIsInterface:
             ch = getClassHandle(inst->getSrc(0));
             if (ch) {
-                res = genLdConstant((int32)VMInterface::isInterfaceType(ch));
+                res = genLdConstant((I_32)VMInterface::isInterfaceType(ch));
             }
             break;
         case ClassIsFinal:
             ch = getClassHandle(inst->getSrc(0));
             if (ch) {
-                res = genLdConstant((int32)VMInterface::isFinalType(ch));
+                res = genLdConstant((I_32)VMInterface::isFinalType(ch));
             }
             break;
         case ClassGetArrayClass:
@@ -4565,7 +4565,7 @@
         case ClassIsFinalizable:
             ch = getClassHandle(inst->getSrc(0));
             if (ch) {
-                res = genLdConstant((int32)VMInterface::isFinalizable(ch));
+                res = genLdConstant((I_32)VMInterface::isFinalizable(ch));
             }
             break;
         case ClassGetFastCheckDepth:
@@ -4573,7 +4573,7 @@
             if (ch) {
                 int depth = 0;
                 if (VMInterface::getClassFastInstanceOfFlag(ch)) {
-                    depth = (int32)VMInterface::getClassDepth(ch);
+                    depth = (I_32)VMInterface::getClassDepth(ch);
                 }
                 res = genLdConstant(depth);
             }