Mercurial > hg > truffle
diff src/share/vm/c1/c1_Canonicalizer.cpp @ 1783:d5d065957597
6953144: Tiered compilation
Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.
Reviewed-by: kvn, never, phh, twisti
author | iveresov |
---|---|
date | Fri, 03 Sep 2010 17:51:07 -0700 |
parents | b812ff5abc73 |
children | 3a294e483abc |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Canonicalizer.cpp Thu Sep 02 11:40:02 2010 -0700 +++ b/src/share/vm/c1/c1_Canonicalizer.cpp Fri Sep 03 17:51:07 2010 -0700 @@ -652,10 +652,20 @@ else if (lss_sux == gtr_sux) { cond = If::neq; tsux = lss_sux; fsux = eql_sux; } else if (eql_sux == gtr_sux) { cond = If::geq; tsux = eql_sux; fsux = lss_sux; } else { ShouldNotReachHere(); } - If* canon = new If(cmp->x(), cond, nan_sux == tsux, cmp->y(), tsux, fsux, cmp->state_before(), x->is_safepoint()); + If* canon = new If(cmp->x(), cond, nan_sux == tsux, cmp->y(), tsux, fsux, cmp->state_before(), x->is_safepoint()); if (cmp->x() == cmp->y()) { do_If(canon); } else { + if (compilation()->profile_branches()) { + // TODO: If profiling, leave floating point comparisons unoptimized. + // We currently do not support profiling of the unordered case. + switch(cmp->op()) { + case Bytecodes::_fcmpl: case Bytecodes::_fcmpg: + case Bytecodes::_dcmpl: case Bytecodes::_dcmpg: + set_canonical(x); + return; + } + } set_canonical(canon); set_bci(cmp->bci()); } @@ -881,4 +891,5 @@ void Canonicalizer::do_UnsafePrefetchRead (UnsafePrefetchRead* x) {} void Canonicalizer::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {} void Canonicalizer::do_ProfileCall(ProfileCall* x) {} -void Canonicalizer::do_ProfileCounter(ProfileCounter* x) {} +void Canonicalizer::do_ProfileInvoke(ProfileInvoke* x) {} +