src/share/vm/c1/c1_Canonicalizer.cpp

changeset 2138
d5d065957597
parent 1939
b812ff5abc73
child 2146
3a294e483abc
     1.1 --- a/src/share/vm/c1/c1_Canonicalizer.cpp	Thu Sep 02 11:40:02 2010 -0700
     1.2 +++ b/src/share/vm/c1/c1_Canonicalizer.cpp	Fri Sep 03 17:51:07 2010 -0700
     1.3 @@ -652,10 +652,20 @@
     1.4          else if (lss_sux == gtr_sux) { cond = If::neq; tsux = lss_sux; fsux = eql_sux; }
     1.5          else if (eql_sux == gtr_sux) { cond = If::geq; tsux = eql_sux; fsux = lss_sux; }
     1.6          else                         { ShouldNotReachHere();                           }
     1.7 -           If* canon = new If(cmp->x(), cond, nan_sux == tsux, cmp->y(), tsux, fsux, cmp->state_before(), x->is_safepoint());
     1.8 +        If* canon = new If(cmp->x(), cond, nan_sux == tsux, cmp->y(), tsux, fsux, cmp->state_before(), x->is_safepoint());
     1.9          if (cmp->x() == cmp->y()) {
    1.10            do_If(canon);
    1.11          } else {
    1.12 +          if (compilation()->profile_branches()) {
    1.13 +            // TODO: If profiling, leave floating point comparisons unoptimized.
    1.14 +            // We currently do not support profiling of the unordered case.
    1.15 +            switch(cmp->op()) {
    1.16 +              case Bytecodes::_fcmpl: case Bytecodes::_fcmpg:
    1.17 +              case Bytecodes::_dcmpl: case Bytecodes::_dcmpg:
    1.18 +                set_canonical(x);
    1.19 +                return;
    1.20 +            }
    1.21 +          }
    1.22            set_canonical(canon);
    1.23            set_bci(cmp->bci());
    1.24          }
    1.25 @@ -881,4 +891,5 @@
    1.26  void Canonicalizer::do_UnsafePrefetchRead (UnsafePrefetchRead*  x) {}
    1.27  void Canonicalizer::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
    1.28  void Canonicalizer::do_ProfileCall(ProfileCall* x) {}
    1.29 -void Canonicalizer::do_ProfileCounter(ProfileCounter* x) {}
    1.30 +void Canonicalizer::do_ProfileInvoke(ProfileInvoke* x) {}
    1.31 +

mercurial