src/share/vm/opto/superword.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6646020 Sdiff src/share/vm/opto

src/share/vm/opto/superword.cpp

Print this page




  48   _n_idx_list(arena(), 8),                // scratch list of (node,index) pairs
  49   _stk(arena(), 8, 0, NULL),              // scratch stack of nodes
  50   _nlist(arena(), 8, 0, NULL),            // scratch list of nodes
  51   _lpt(NULL),                             // loop tree node
  52   _lp(NULL),                              // LoopNode
  53   _bb(NULL),                              // basic block
  54   _iv(NULL)                               // induction var
  55 {}
  56 
  57 //------------------------------transform_loop---------------------------
  58 void SuperWord::transform_loop(IdealLoopTree* lpt) {
  59   assert(lpt->_head->is_CountedLoop(), "must be");
  60   CountedLoopNode *cl = lpt->_head->as_CountedLoop();
  61 
  62   if (!cl->is_main_loop() ) return; // skip normal, pre, and post loops
  63 
  64   // Check for no control flow in body (other than exit)
  65   Node *cl_exit = cl->loopexit();
  66   if (cl_exit->in(0) != lpt->_head) return;
  67 





  68   // Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit))))
  69   CountedLoopEndNode* pre_end = get_pre_loop_end(cl);
  70   if (pre_end == NULL) return;
  71   Node *pre_opaq1 = pre_end->limit();
  72   if (pre_opaq1->Opcode() != Op_Opaque1) return;
  73 
  74   // Do vectors exist on this architecture?
  75   if (vector_width_in_bytes() == 0) return;
  76 
  77   init(); // initialize data structures
  78 
  79   set_lpt(lpt);
  80   set_lp(cl);
  81 
  82  // For now, define one block which is the entire loop body
  83   set_bb(cl);
  84 
  85   assert(_packset.length() == 0, "packset must be empty");
  86   SLP_extract();
  87 }




  48   _n_idx_list(arena(), 8),                // scratch list of (node,index) pairs
  49   _stk(arena(), 8, 0, NULL),              // scratch stack of nodes
  50   _nlist(arena(), 8, 0, NULL),            // scratch list of nodes
  51   _lpt(NULL),                             // loop tree node
  52   _lp(NULL),                              // LoopNode
  53   _bb(NULL),                              // basic block
  54   _iv(NULL)                               // induction var
  55 {}
  56 
  57 //------------------------------transform_loop---------------------------
  58 void SuperWord::transform_loop(IdealLoopTree* lpt) {
  59   assert(lpt->_head->is_CountedLoop(), "must be");
  60   CountedLoopNode *cl = lpt->_head->as_CountedLoop();
  61 
  62   if (!cl->is_main_loop() ) return; // skip normal, pre, and post loops
  63 
  64   // Check for no control flow in body (other than exit)
  65   Node *cl_exit = cl->loopexit();
  66   if (cl_exit->in(0) != lpt->_head) return;
  67 
  68   // Make sure the are no extra control users of the loop backedge
  69   if (cl->back_control()->outcnt() != 1) {
  70     return;
  71   } 
  72 
  73   // Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit))))
  74   CountedLoopEndNode* pre_end = get_pre_loop_end(cl);
  75   if (pre_end == NULL) return;
  76   Node *pre_opaq1 = pre_end->limit();
  77   if (pre_opaq1->Opcode() != Op_Opaque1) return;
  78 
  79   // Do vectors exist on this architecture?
  80   if (vector_width_in_bytes() == 0) return;
  81 
  82   init(); // initialize data structures
  83 
  84   set_lpt(lpt);
  85   set_lp(cl);
  86 
  87  // For now, define one block which is the entire loop body
  88   set_bb(cl);
  89 
  90   assert(_packset.length() == 0, "packset must be empty");
  91   SLP_extract();
  92 }


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