446 bool SuperWord::ref_is_alignable(SWPointer& p) { |
446 bool SuperWord::ref_is_alignable(SWPointer& p) { |
447 if (!p.has_iv()) { |
447 if (!p.has_iv()) { |
448 return true; // no induction variable |
448 return true; // no induction variable |
449 } |
449 } |
450 CountedLoopEndNode* pre_end = get_pre_loop_end(lp()->as_CountedLoop()); |
450 CountedLoopEndNode* pre_end = get_pre_loop_end(lp()->as_CountedLoop()); |
|
451 assert(pre_end != NULL, "we must have a correct pre-loop"); |
451 assert(pre_end->stride_is_con(), "pre loop stride is constant"); |
452 assert(pre_end->stride_is_con(), "pre loop stride is constant"); |
452 int preloop_stride = pre_end->stride_con(); |
453 int preloop_stride = pre_end->stride_con(); |
453 |
454 |
454 int span = preloop_stride * p.scale_in_bytes(); |
455 int span = preloop_stride * p.scale_in_bytes(); |
455 int mem_size = p.memory_size(); |
456 int mem_size = p.memory_size(); |
2050 // (iv + k) mod vector_align == 0 |
2051 // (iv + k) mod vector_align == 0 |
2051 void SuperWord::align_initial_loop_index(MemNode* align_to_ref) { |
2052 void SuperWord::align_initial_loop_index(MemNode* align_to_ref) { |
2052 CountedLoopNode *main_head = lp()->as_CountedLoop(); |
2053 CountedLoopNode *main_head = lp()->as_CountedLoop(); |
2053 assert(main_head->is_main_loop(), ""); |
2054 assert(main_head->is_main_loop(), ""); |
2054 CountedLoopEndNode* pre_end = get_pre_loop_end(main_head); |
2055 CountedLoopEndNode* pre_end = get_pre_loop_end(main_head); |
2055 assert(pre_end != NULL, ""); |
2056 assert(pre_end != NULL, "we must have a correct pre-loop"); |
2056 Node *pre_opaq1 = pre_end->limit(); |
2057 Node *pre_opaq1 = pre_end->limit(); |
2057 assert(pre_opaq1->Opcode() == Op_Opaque1, ""); |
2058 assert(pre_opaq1->Opcode() == Op_Opaque1, ""); |
2058 Opaque1Node *pre_opaq = (Opaque1Node*)pre_opaq1; |
2059 Opaque1Node *pre_opaq = (Opaque1Node*)pre_opaq1; |
2059 Node *lim0 = pre_opaq->in(1); |
2060 Node *lim0 = pre_opaq->in(1); |
2060 |
2061 |
2214 if (!iffm->is_If()) return NULL; |
2215 if (!iffm->is_If()) return NULL; |
2215 Node *p_f = iffm->in(0); |
2216 Node *p_f = iffm->in(0); |
2216 if (!p_f->is_IfFalse()) return NULL; |
2217 if (!p_f->is_IfFalse()) return NULL; |
2217 if (!p_f->in(0)->is_CountedLoopEnd()) return NULL; |
2218 if (!p_f->in(0)->is_CountedLoopEnd()) return NULL; |
2218 CountedLoopEndNode *pre_end = p_f->in(0)->as_CountedLoopEnd(); |
2219 CountedLoopEndNode *pre_end = p_f->in(0)->as_CountedLoopEnd(); |
2219 if (!pre_end->loopnode()->is_pre_loop()) return NULL; |
2220 CountedLoopNode* loop_node = pre_end->loopnode(); |
|
2221 if (loop_node == NULL || !loop_node->is_pre_loop()) return NULL; |
2220 return pre_end; |
2222 return pre_end; |
2221 } |
2223 } |
2222 |
2224 |
2223 |
2225 |
2224 //------------------------------init--------------------------- |
2226 //------------------------------init--------------------------- |