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/09 11:42:44 UTC
svn commit: r505246 -
/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/hashvaluenumberer.cpp
Author: varlax
Date: Fri Feb 9 02:42:43 2007
New Revision: 505246
URL: http://svn.apache.org/viewvc?view=rev&rev=505246
Log:
Applied HARMONY-2868 [drlvm][jit][opt] Jitrino.OPT loops infinitely inside recursive Jitrino::InstValueNumberer::thereIsAPath(...) on DaCapo jython
Tested on SUSE10@ia32 and SUSE9@x64
Modified:
harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/hashvaluenumberer.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/hashvaluenumberer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/hashvaluenumberer.cpp?view=diff&rev=505246&r1=505245&r2=505246
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/hashvaluenumberer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/hashvaluenumberer.cpp Fri Feb 9 02:42:43 2007
@@ -999,13 +999,27 @@
Inst* caseDefault(Inst* inst) { return inst; }
private:
CSEHashKey getKey(Inst *inst) {
+
+ if(inst->isType()) {
+ return getKey(inst->asTypeInst());
+ } else if(inst->isFieldAccess()) {
+ return getKey(inst->asFieldAccessInst());
+ } else if(inst->isConst()) {
+ return getKey(inst->asConstInst());
+ } else if(inst->isToken()) {
+ return getKey(inst->asTokenInst());
+ } else if(inst->isMethod()) {
+ return getKey(inst->asMethodInst());
+ } else if(inst->isBranch()) {
+ return getKey(inst->asBranchInst());
+ }
+
// eliminate tau operands from the key
// they will always be trailing operands
// but: some instructions have just tau operands,
// (tauAnd, ldvar)
// so if first operand is a tau, don't skip any
-
uint32 numSrcs = inst->getNumSrcOperands();
if (numSrcs > 0) {
if (inst->getSrc(0)->getType()->tag != Type::Tau) {
@@ -1258,7 +1272,7 @@
(mod.hasExceptionModifier() && mod.getExceptionModifier() != Exception_Never))
{
Inst* optInst = lookupInst(inst);
- if (!optInst) {
+ if (inst == optInst) {
setHashToInst(inst, getKey(inst));
return inst;
} else {