src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/compile.cpp

Print this page
rev 5400 : 8025657: compiler/intrinsics/mathexact/ConstantTest.java fails on assert in lcm.cpp on solaris x64
Reviewed-by: duke


  30 #include "code/nmethod.hpp"
  31 #include "compiler/compileLog.hpp"
  32 #include "compiler/disassembler.hpp"
  33 #include "compiler/oopMap.hpp"
  34 #include "opto/addnode.hpp"
  35 #include "opto/block.hpp"
  36 #include "opto/c2compiler.hpp"
  37 #include "opto/callGenerator.hpp"
  38 #include "opto/callnode.hpp"
  39 #include "opto/cfgnode.hpp"
  40 #include "opto/chaitin.hpp"
  41 #include "opto/compile.hpp"
  42 #include "opto/connode.hpp"
  43 #include "opto/divnode.hpp"
  44 #include "opto/escape.hpp"
  45 #include "opto/idealGraphPrinter.hpp"
  46 #include "opto/loopnode.hpp"
  47 #include "opto/machnode.hpp"
  48 #include "opto/macro.hpp"
  49 #include "opto/matcher.hpp"

  50 #include "opto/memnode.hpp"
  51 #include "opto/mulnode.hpp"
  52 #include "opto/node.hpp"
  53 #include "opto/opcodes.hpp"
  54 #include "opto/output.hpp"
  55 #include "opto/parse.hpp"
  56 #include "opto/phaseX.hpp"
  57 #include "opto/rootnode.hpp"
  58 #include "opto/runtime.hpp"
  59 #include "opto/stringopts.hpp"
  60 #include "opto/type.hpp"
  61 #include "opto/vectornode.hpp"
  62 #include "runtime/arguments.hpp"
  63 #include "runtime/signature.hpp"
  64 #include "runtime/stubRoutines.hpp"
  65 #include "runtime/timer.hpp"
  66 #include "trace/tracing.hpp"
  67 #include "utilities/copy.hpp"
  68 #ifdef TARGET_ARCH_MODEL_x86_32
  69 # include "adfiles/ad_x86_32.hpp"


2967         if (shift > mask) { // Unsigned cmp
2968           n->set_req(2, ConNode::make(this, TypeInt::make(shift & mask)));
2969         }
2970       } else {
2971         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
2972           Node* shift = new (this) AndINode(in2, ConNode::make(this, TypeInt::make(mask)));
2973           n->set_req(2, shift);
2974         }
2975       }
2976       if (in2->outcnt() == 0) { // Remove dead node
2977         in2->disconnect_inputs(NULL, this);
2978       }
2979     }
2980     break;
2981   case Op_MemBarStoreStore:
2982   case Op_MemBarRelease:
2983     // Break the link with AllocateNode: it is no longer useful and
2984     // confuses register allocation.
2985     if (n->req() > MemBarNode::Precedent) {
2986       n->set_req(MemBarNode::Precedent, top());


























2987     }
2988     break;
2989   default:
2990     assert( !n->is_Call(), "" );
2991     assert( !n->is_Mem(), "" );
2992     break;
2993   }
2994 
2995   // Collect CFG split points
2996   if (n->is_MultiBranch())
2997     frc._tests.push(n);
2998 }
2999 
3000 //------------------------------final_graph_reshaping_walk---------------------
3001 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3002 // requires that the walk visits a node's inputs before visiting the node.
3003 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3004   ResourceArea *area = Thread::current()->resource_area();
3005   Unique_Node_List sfpt(area);
3006 




  30 #include "code/nmethod.hpp"
  31 #include "compiler/compileLog.hpp"
  32 #include "compiler/disassembler.hpp"
  33 #include "compiler/oopMap.hpp"
  34 #include "opto/addnode.hpp"
  35 #include "opto/block.hpp"
  36 #include "opto/c2compiler.hpp"
  37 #include "opto/callGenerator.hpp"
  38 #include "opto/callnode.hpp"
  39 #include "opto/cfgnode.hpp"
  40 #include "opto/chaitin.hpp"
  41 #include "opto/compile.hpp"
  42 #include "opto/connode.hpp"
  43 #include "opto/divnode.hpp"
  44 #include "opto/escape.hpp"
  45 #include "opto/idealGraphPrinter.hpp"
  46 #include "opto/loopnode.hpp"
  47 #include "opto/machnode.hpp"
  48 #include "opto/macro.hpp"
  49 #include "opto/matcher.hpp"
  50 #include "opto/mathexactnode.hpp"
  51 #include "opto/memnode.hpp"
  52 #include "opto/mulnode.hpp"
  53 #include "opto/node.hpp"
  54 #include "opto/opcodes.hpp"
  55 #include "opto/output.hpp"
  56 #include "opto/parse.hpp"
  57 #include "opto/phaseX.hpp"
  58 #include "opto/rootnode.hpp"
  59 #include "opto/runtime.hpp"
  60 #include "opto/stringopts.hpp"
  61 #include "opto/type.hpp"
  62 #include "opto/vectornode.hpp"
  63 #include "runtime/arguments.hpp"
  64 #include "runtime/signature.hpp"
  65 #include "runtime/stubRoutines.hpp"
  66 #include "runtime/timer.hpp"
  67 #include "trace/tracing.hpp"
  68 #include "utilities/copy.hpp"
  69 #ifdef TARGET_ARCH_MODEL_x86_32
  70 # include "adfiles/ad_x86_32.hpp"


2968         if (shift > mask) { // Unsigned cmp
2969           n->set_req(2, ConNode::make(this, TypeInt::make(shift & mask)));
2970         }
2971       } else {
2972         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
2973           Node* shift = new (this) AndINode(in2, ConNode::make(this, TypeInt::make(mask)));
2974           n->set_req(2, shift);
2975         }
2976       }
2977       if (in2->outcnt() == 0) { // Remove dead node
2978         in2->disconnect_inputs(NULL, this);
2979       }
2980     }
2981     break;
2982   case Op_MemBarStoreStore:
2983   case Op_MemBarRelease:
2984     // Break the link with AllocateNode: it is no longer useful and
2985     // confuses register allocation.
2986     if (n->req() > MemBarNode::Precedent) {
2987       n->set_req(MemBarNode::Precedent, top());
2988     }
2989     break;
2990     // Must set a control edge on all nodes that produce a FlagsProj
2991     // so they can't escape the block that consumes the flags.
2992     // Must also set the non throwing branch as the control
2993     // for all nodes that depends on the result. Unless the node
2994     // already have a control that isn't the control of the
2995     // flag producer
2996   case Op_FlagsProj:
2997     {
2998       MathExactNode* math = (MathExactNode*)  n->in(0);
2999       Node* ctrl = math->control_node();
3000       Node* non_throwing = math->non_throwing_branch();
3001       math->set_req(0, ctrl);
3002 
3003       Node* result = math->result_node();
3004       if (result != NULL) {
3005         for (DUIterator_Fast jmax, j = result->fast_outs(jmax); j < jmax; j++) {
3006           Node* out = result->fast_out(j);
3007           if (out->in(0) == NULL) {
3008             out->set_req(0, non_throwing);
3009           } else if (out->in(0) == ctrl) {
3010             out->set_req(0, non_throwing);
3011           }
3012         }
3013       }
3014     }
3015     break;
3016   default:
3017     assert( !n->is_Call(), "" );
3018     assert( !n->is_Mem(), "" );
3019     break;
3020   }
3021 
3022   // Collect CFG split points
3023   if (n->is_MultiBranch())
3024     frc._tests.push(n);
3025 }
3026 
3027 //------------------------------final_graph_reshaping_walk---------------------
3028 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3029 // requires that the walk visits a node's inputs before visiting the node.
3030 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3031   ResourceArea *area = Thread::current()->resource_area();
3032   Unique_Node_List sfpt(area);
3033 


src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File