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/03/22 07:35:20 UTC
svn commit: r521135 -
/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp
Author: varlax
Date: Wed Mar 21 23:35:19 2007
New Revision: 521135
URL: http://svn.apache.org/viewvc?view=rev&rev=521135
Log:
Various fixes in EdgeProfiler.cpp (HARMONY-3464, HARMONY-3426)
Modified:
harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp?view=diff&rev=521135&r1=521134&r2=521135
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp Wed Mar 21 23:35:19 2007
@@ -110,7 +110,7 @@
ProfilingInterface* pi = irm.getProfilingInterface();
if (!pi->hasMethodProfile(ProfileType_Edge, md, JITProfilingRole_GEN)) {
- pi->createEdgeMethodProfile(mm , md, (uint32)counterKeys.size(), (uint32*)&counterKeys.front(), _checkSum);
+ pi->createEdgeMethodProfile(mm , md, (uint32)counterKeys.size(), counterKeys.empty()?NULL:(uint32*)&counterKeys.front(), _checkSum);
}
irm.getCompilationInterface().unlockMethodData();
@@ -509,12 +509,14 @@
}
static bool hasCatch( Node* node ) {
- Inst* first = (Inst*)node->getFirstInst();
- assert(first->isLabel());
- if (first->getNextInst()!=NULL && first->getNextInst()->getOpcode() == Op_Catch) {
- return true;
- }
- return false;
+ Inst* inst = (Inst*)node->getFirstInst();
+ assert(inst->isLabel());
+ // Op_Catch is allowed to be not in the second position only (after label inst)
+ // but in arbitrary position if Op_Phi insts present.
+ do {
+ inst = inst->getNextInst();
+ } while (inst!=NULL && inst->getOpcode() == Op_Phi);
+ return inst != NULL && inst->getOpcode() == Op_Catch;
}
/*static bool hasCounter( Node* node ) {