You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by mf...@apache.org on 2007/08/24 14:35:39 UTC
svn commit: r569365 - in /harmony/enhanced/drlvm/trunk/vm/jitrino:
config/em64t/ config/ia32/ src/optimizer/
Author: mfursov
Date: Fri Aug 24 05:35:38 2007
New Revision: 569365
URL: http://svn.apache.org/viewvc?rev=569365&view=rev
Log:
Fix for HARMONY-4676 [drlvm][jit] SpecJBB2005 performance degradation caused by HARMONY-4596
Modified:
harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/client.emconf
harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/opt.emconf
harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server.emconf
harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server_static.emconf
harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/client.emconf
harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/opt.emconf
harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server.emconf
harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server_static.emconf
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/config/em64t/client.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/client.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/client.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/client.emconf Fri Aug 24 05:35:38 2007
@@ -53,7 +53,7 @@
-XX:jit.CD_OPT.path=opt_init,translator,optimizer,hir2lir,codegen
--XX:jit.CD_OPT.path.optimizer=ssa,devirt,inline,uce,purge,simplify,dce,uce,memopt,simplify,dce,uce,lower,dessa,statprof
+-XX:jit.CD_OPT.path.optimizer=ssa,devirt,inline,purge,simplify,dce,uce,memopt,simplify,dce,uce,lower,dessa,statprof
-XX:jit.CD_OPT.path.codegen=lock_method,bbp,gcpoints,cafl,dce1,i8l-,early_prop-,itrace-,native,constraints,dce2,regalloc,spillgen,layout,copy,rce-,stack,break-,iprof-,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.CD_OPT.path.dce1=cg_dce
-XX:jit.CD_OPT.path.dce2=cg_dce
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/opt.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/opt.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/opt.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/opt.emconf Fri Aug 24 05:35:38 2007
@@ -24,7 +24,7 @@
-XX:jit.CS_OPT.path=opt_init,translator,optimizer,hir2lir,codegen
--XX:jit.CS_OPT.path.optimizer=ssa,devirt,inline,uce,purge,simplify,dce,uce,escape,dce,uce,memopt,simplify,dce,uce,lower,dessa,statprof
+-XX:jit.CS_OPT.path.optimizer=ssa,devirt,inline,purge,simplify,dce,uce,escape,dce,uce,memopt,simplify,dce,uce,lower,dessa,statprof
-XX:jit.CS_OPT.path.codegen=lock_method,bbp,gcpoints,cafl,dce1,i8l-,early_prop-,itrace-,native,constraints,dce2,regalloc,spillgen,layout,copy,rce-,stack,break-,iprof-,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.CS_OPT.path.dce1=cg_dce
-XX:jit.CS_OPT.path.dce2=cg_dce
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server.emconf Fri Aug 24 05:35:38 2007
@@ -69,7 +69,7 @@
-XX:jit.SD1_OPT.arg.optimizer.vp_instrument.profile_abstract=true
--XX:jit.SD2_OPT.path.optimizer=ssa,simplify,dce,uce,devirt_virtual,edge_annotate,unguard,devirt_intf,inline,uce,purge,simplify,dce,uce,so2-,simplify,dce,uce,escape,dce,uce,hvn,dce,uce,inline_helpers,purge,simplify,uce,dce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,fastArrayFill,statprof
+-XX:jit.SD2_OPT.path.optimizer=ssa,simplify,dce,uce,devirt_virtual,edge_annotate,unguard,devirt_intf,inline,purge,simplify,dce,uce,so2-,simplify,dce,uce,escape,dce,uce,hvn,dce,uce,inline_helpers,purge,simplify,uce,dce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,fastArrayFill,statprof
-XX:jit.SD2_OPT.path.codegen=lock_method,bbp,gcpoints,cafl,dce1,i8l-,early_prop-,itrace-,native,cg_fastArrayFill,constraints,dce2,regalloc,spillgen,layout,copy,rce-,stack,break-,iprof-,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.SD2_OPT.path.dce1=cg_dce
-XX:jit.SD2_OPT.path.dce2=cg_dce
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server_static.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server_static.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server_static.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/em64t/server_static.emconf Fri Aug 24 05:35:38 2007
@@ -24,7 +24,7 @@
-XX:jit.SS_OPT.path=opt_init,translator,optimizer,hir2lir,codegen
--XX:jit.SS_OPT.path.optimizer=ssa,simplify,dce,uce,statprof,devirt,inline,uce,purge,simplify,dce,uce,hvn,dce,uce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,statprof
+-XX:jit.SS_OPT.path.optimizer=ssa,simplify,dce,uce,statprof,devirt,inline,purge,simplify,dce,uce,hvn,dce,uce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,statprof
-XX:jit.SS_OPT.path.codegen=lock_method,bbp,gcpoints,cafl,dce1,i8l-,early_prop-,itrace-,native,constraints,dce2,regalloc,spillgen,layout,copy,rce-,stack,break-,iprof-,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.SS_OPT.path.dce1=cg_dce
-XX:jit.SS_OPT.path.dce2=cg_dce
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/client.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/client.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/client.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/client.emconf Fri Aug 24 05:35:38 2007
@@ -53,7 +53,7 @@
-XX:jit.CD_OPT.path=opt_init,translator,optimizer,hir2lir,codegen
--XX:jit.CD_OPT.path.optimizer=ssa,devirt,inline,uce,purge,simplify,dce,uce,lazyexc,throwopt,memopt,simplify,dce,uce,lower,statprof,unroll,ssa,simplify,dce,uce,dessa,statprof
+-XX:jit.CD_OPT.path.optimizer=ssa,devirt,inline,purge,simplify,dce,uce,lazyexc,throwopt,memopt,simplify,dce,uce,lower,statprof,unroll,ssa,simplify,dce,uce,dessa,statprof
-XX:jit.CD_OPT.path.codegen=lock_method,bbp,btr,gcpoints,cafl,dce1,i8l,api_magic,early_prop,peephole,itrace-,native,constraints,dce2,regalloc,spillgen,copy,i586,layout,rce+,stack,break-,iprof-,peephole,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.CD_OPT.path.dce1=cg_dce
-XX:jit.CD_OPT.path.dce2=cg_dce
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/opt.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/opt.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/opt.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/opt.emconf Fri Aug 24 05:35:38 2007
@@ -24,7 +24,7 @@
-XX:jit.CS_OPT.path=opt_init,translator,optimizer,hir2lir,codegen
--XX:jit.CS_OPT.path.optimizer=ssa,devirt,inline,uce,purge,simplify,dce,uce,lazyexc,throwopt,escape,dce,uce,memopt,simplify,dce,uce,lower,statprof,unroll,ssa,simplify,dce,uce,dessa,statprof
+-XX:jit.CS_OPT.path.optimizer=ssa,devirt,inline,purge,simplify,dce,uce,lazyexc,throwopt,escape,dce,uce,memopt,simplify,dce,uce,lower,statprof,unroll,ssa,simplify,dce,uce,dessa,statprof
-XX:jit.CS_OPT.path.codegen=lock_method,bbp,btr,gcpoints,cafl,dce1,i8l,api_magic,early_prop,peephole,itrace-,native,constraints,dce2,regalloc,spillgen,copy,i586,layout,rce+,stack,break-,iprof-,peephole,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.CS_OPT.path.dce1=cg_dce
-XX:jit.CS_OPT.path.dce2=cg_dce
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server.emconf Fri Aug 24 05:35:38 2007
@@ -71,7 +71,7 @@
-XX:jit.SD2_OPT.path=opt_init,translator,optimizer,hir2lir,codegen
--XX:jit.SD2_OPT.path.optimizer=ssa,simplify,dce,uce,devirt_virtual,edge_annotate,unguard,devirt_intf,inline,uce,purge,simplify,dce,uce,lazyexc,throwopt,so2-,simplify,dce,uce,escape,inline_helpers,purge,simplify,uce,dce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,statprof,unroll,ssa,simplify,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,fastArrayFill,statprof,markglobals
+-XX:jit.SD2_OPT.path.optimizer=ssa,simplify,dce,uce,devirt_virtual,edge_annotate,unguard,devirt_intf,inline,purge,simplify,dce,uce,lazyexc,throwopt,so2-,simplify,dce,uce,escape,inline_helpers,purge,simplify,uce,dce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,statprof,unroll,ssa,simplify,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,fastArrayFill,statprof,markglobals
-XX:jit.SD2_OPT.path.codegen=lock_method,bbp,btr,gcpoints,cafl,dce1,i8l,api_magic,early_prop,peephole,itrace-,native,cg_fastArrayFill,constraints,dce2,regalloc,spillgen,copy,i586,layout,rce+,stack,break-,iprof-,peephole,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.SD2_OPT.path.dce1=cg_dce
-XX:jit.SD2_OPT.path.dce2=cg_dce
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server_static.emconf
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server_static.emconf?rev=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server_static.emconf (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/config/ia32/server_static.emconf Fri Aug 24 05:35:38 2007
@@ -24,7 +24,7 @@
-XX:jit.SS_OPT.path=opt_init,translator,optimizer,hir2lir,codegen
--XX:jit.SS_OPT.path.optimizer=ssa,simplify,dce,uce,statprof,devirt,inline,uce,purge,simplify,dce,uce,lazyexc,throwopt,statprof,hvn,dce,uce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,unroll,ssa,simplify,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,statprof
+-XX:jit.SS_OPT.path.optimizer=ssa,simplify,dce,uce,statprof,devirt,inline,purge,simplify,dce,uce,lazyexc,throwopt,statprof,hvn,dce,uce,dessa,statprof,peel,ssa,hvn,simplify,dce,uce,lower,dce,uce,unroll,ssa,simplify,dce,uce,memopt,reassoc,dce,uce,hvn,dce,uce,classic_abcd,dce,uce,gcm,dessa,statprof
-XX:jit.SS_OPT.path.codegen=lock_method,bbp,btr,gcpoints,cafl,dce1,i8l,api_magic,early_prop,peephole,itrace-,native,constraints,dce2,regalloc,spillgen,copy,i586,layout,rce+,stack,break-,iprof-,peephole,emitter!,si_insts,gcmap,info,unlock_method
-XX:jit.SS_OPT.path.dce1=cg_dce
-XX:jit.SS_OPT.path.dce2=cg_dce
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=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.cpp Fri Aug 24 05:35:38 2007
@@ -34,6 +34,7 @@
#include "JavaByteCodeParser.h"
#include "StaticProfiler.h"
#include "optimizer.h"
+#include "deadcodeeliminator.h"
namespace Jitrino {
@@ -79,7 +80,8 @@
_currentByteSize(irm.getMethodDesc().getByteCodeSize()),
_inlineTree(new (mm) InlineNode(irm, 0, 0)),
translatorAction(NULL), inlinePragma(NULL),
- usePriorityQueue(_usePriorityQueue), inlinerPipelineName(inlinePipeline), connectEarly(true)
+ usePriorityQueue(_usePriorityQueue), inlinerPipelineName(inlinePipeline),
+ connectEarly(true), isPseudoThrowInserted(false)
{
const char* translatorName = argSource->getStringArg("translatorActionName", "translator");
@@ -854,6 +856,7 @@
if (inlinedFlowGraph.getUnwindNode() == NULL) {
// Replace original call with PseudoThrow to keep graph topology.
callNode->appendInst(_instFactory.makePseudoThrow());
+ isPseudoThrowInserted = true;
} else {
// Inlined graph has exception path so just remove original edge.
parentCFG.removeEdge(callNode->getExceptionEdge());
@@ -1153,6 +1156,16 @@
//inline current region
inlineRegion(regionNode);
} while (true);
+
+
+ // Clean up phase.
+ DeadCodeEliminator dce(_toplevelIRM);
+ dce.eliminateUnreachableCode();
+ assert(_toplevelIRM.getInSsa());
+ OptPass::fixupSsa(_toplevelIRM);
+ if (isPseudoThrowInserted) {
+ dce.removeExtraPseudoThrow();
+ }
}
void Inliner::compileAndConnectRegion(InlineNode* inlineNode, CompilationContext& inlineCC) {
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=569365&r1=569364&r2=569365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/inliner.h Fri Aug 24 05:35:38 2007
@@ -207,6 +207,7 @@
bool usePriorityQueue;
const char* inlinerPipelineName;
bool connectEarly;
+ bool isPseudoThrowInserted;
};