You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2007/02/02 14:11:59 UTC

svn commit: r502598 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src: codegenerator/ia32/Ia32Printer.h optimizer/inliner.cpp optimizer/inliner.h

Author: varlax
Date: Fri Feb  2 05:11:58 2007
New Revision: 502598

URL: http://svn.apache.org/viewvc?view=rev&rev=502598
Log:
Applied HARMONY-3102 [drlvm][jit] Adding bonus table to Jitrino.OPT inliner

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.h?view=diff&rev=502598&r1=502597&r2=502598
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32Printer.h Fri Feb  2 05:11:58 2007
@@ -52,7 +52,8 @@
     Allows to provide an optinal title
     */
     Printer(const IRManager * irm=0, const char * _title=0)
-        :irManager(irm), title(_title), os(0){}
+        :irManager(irm), title(_title), os(0)
+         {if (irManager==NULL) irManager = CompilationContext::getCurrentContext()->getLIRManager();}
 
     /** destructs Printer instance */
     virtual ~Printer() {}

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?view=diff&rev=502598&r1=502597&r2=502598
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp Fri Feb  2 05:11:58 2007
@@ -140,6 +140,12 @@
         }
     }
 
+    const char* bonusMethods = argSource->getStringArg("bonus_methods", NULL);
+    _inlineBonusMethodTable = NULL;
+    if(bonusMethods!=NULL) {
+        _inlineBonusMethodTable = new (_tmpMM) Method_Table(_tmpMM, bonusMethods, "BONUS_METHODS", false);
+    }
+
     _usesOptimisticBalancedSync = argSource->getBoolArg("sync_optimistic", false) ? argSource->getBoolArg("sync_optcatch", true) : false;
 }
 
@@ -153,6 +159,13 @@
                                << methodDesc.getParentType()->getName()
                                << "." << methodDesc.getName() << ::std::endl;
     }
+    if (_inlineBonusMethodTable!=NULL && _inlineBonusMethodTable->accept_this_method(methodDesc)) {
+        benefit+=1000;
+        if (Log::isEnabled()) {
+            Log::out() << "Method is in bonus table benefit+=1000"<<std::endl;
+        }
+    }
+
     //
     // Size impact
     //

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?view=diff&rev=502598&r1=502597&r2=502598
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h Fri Feb  2 05:11:58 2007
@@ -185,6 +185,7 @@
     bool _inlineSkipExceptionPath;
     bool _inlineSkipApiMagicMethods;
     Method_Table* _inlineSkipMethodTable;
+    Method_Table* _inlineBonusMethodTable;
 
     uint64 oldMethodId;