src/share/vm/opto/lcm.cpp

changeset 2048
6c9cc03d8726
parent 2040
0e35fa8ebccd
child 2103
3e8fbc61cee8
     1.1 --- a/src/share/vm/opto/lcm.cpp	Wed Aug 11 05:51:21 2010 -0700
     1.2 +++ b/src/share/vm/opto/lcm.cpp	Wed Aug 11 10:48:20 2010 -0700
     1.3 @@ -113,7 +113,8 @@
     1.4      if( !m->is_Mach() ) continue;
     1.5      MachNode *mach = m->as_Mach();
     1.6      was_store = false;
     1.7 -    switch( mach->ideal_Opcode() ) {
     1.8 +    int iop = mach->ideal_Opcode();
     1.9 +    switch( iop ) {
    1.10      case Op_LoadB:
    1.11      case Op_LoadUS:
    1.12      case Op_LoadD:
    1.13 @@ -155,6 +156,12 @@
    1.14      default:                    // Also check for embedded loads
    1.15        if( !mach->needs_anti_dependence_check() )
    1.16          continue;               // Not an memory op; skip it
    1.17 +      if( must_clone[iop] ) {
    1.18 +        // Do not move nodes which produce flags because
    1.19 +        // RA will try to clone it to place near branch and
    1.20 +        // it will cause recompilation, see clone_node().
    1.21 +        continue;
    1.22 +      }
    1.23        {
    1.24          // Check that value is used in memory address in
    1.25          // instructions with embedded load (CmpP val1,(val2+off)).
    1.26 @@ -957,6 +964,8 @@
    1.27      Block *sb = _succs[i];
    1.28      // Clone the entire area; ignoring the edge fixup for now.
    1.29      for( uint j = end; j > beg; j-- ) {
    1.30 +      // It is safe here to clone a node with anti_dependence
    1.31 +      // since clones dominate on each path.
    1.32        Node *clone = _nodes[j-1]->clone();
    1.33        sb->_nodes.insert( 1, clone );
    1.34        bbs.map(clone->_idx,sb);

mercurial