comparison src/share/vm/opto/superword.cpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 4e7ee57b57bf
children 89152779163c
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
439 bool SuperWord::ref_is_alignable(SWPointer& p) { 439 bool SuperWord::ref_is_alignable(SWPointer& p) {
440 if (!p.has_iv()) { 440 if (!p.has_iv()) {
441 return true; // no induction variable 441 return true; // no induction variable
442 } 442 }
443 CountedLoopEndNode* pre_end = get_pre_loop_end(lp()->as_CountedLoop()); 443 CountedLoopEndNode* pre_end = get_pre_loop_end(lp()->as_CountedLoop());
444 assert(pre_end != NULL, "we must have a correct pre-loop");
445 assert(pre_end->stride_is_con(), "pre loop stride is constant"); 444 assert(pre_end->stride_is_con(), "pre loop stride is constant");
446 int preloop_stride = pre_end->stride_con(); 445 int preloop_stride = pre_end->stride_con();
447 446
448 int span = preloop_stride * p.scale_in_bytes(); 447 int span = preloop_stride * p.scale_in_bytes();
449 448
1980 // (iv + k) mod vector_align == 0 1979 // (iv + k) mod vector_align == 0
1981 void SuperWord::align_initial_loop_index(MemNode* align_to_ref) { 1980 void SuperWord::align_initial_loop_index(MemNode* align_to_ref) {
1982 CountedLoopNode *main_head = lp()->as_CountedLoop(); 1981 CountedLoopNode *main_head = lp()->as_CountedLoop();
1983 assert(main_head->is_main_loop(), ""); 1982 assert(main_head->is_main_loop(), "");
1984 CountedLoopEndNode* pre_end = get_pre_loop_end(main_head); 1983 CountedLoopEndNode* pre_end = get_pre_loop_end(main_head);
1985 assert(pre_end != NULL, "we must have a correct pre-loop"); 1984 assert(pre_end != NULL, "");
1986 Node *pre_opaq1 = pre_end->limit(); 1985 Node *pre_opaq1 = pre_end->limit();
1987 assert(pre_opaq1->Opcode() == Op_Opaque1, ""); 1986 assert(pre_opaq1->Opcode() == Op_Opaque1, "");
1988 Opaque1Node *pre_opaq = (Opaque1Node*)pre_opaq1; 1987 Opaque1Node *pre_opaq = (Opaque1Node*)pre_opaq1;
1989 Node *lim0 = pre_opaq->in(1); 1988 Node *lim0 = pre_opaq->in(1);
1990 1989
2144 if (!iffm->is_If()) return NULL; 2143 if (!iffm->is_If()) return NULL;
2145 Node *p_f = iffm->in(0); 2144 Node *p_f = iffm->in(0);
2146 if (!p_f->is_IfFalse()) return NULL; 2145 if (!p_f->is_IfFalse()) return NULL;
2147 if (!p_f->in(0)->is_CountedLoopEnd()) return NULL; 2146 if (!p_f->in(0)->is_CountedLoopEnd()) return NULL;
2148 CountedLoopEndNode *pre_end = p_f->in(0)->as_CountedLoopEnd(); 2147 CountedLoopEndNode *pre_end = p_f->in(0)->as_CountedLoopEnd();
2149 CountedLoopNode* loop_node = pre_end->loopnode(); 2148 if (!pre_end->loopnode()->is_pre_loop()) return NULL;
2150 if (loop_node == NULL || !loop_node->is_pre_loop()) return NULL;
2151 return pre_end; 2149 return pre_end;
2152 } 2150 }
2153 2151
2154 2152
2155 //------------------------------init--------------------------- 2153 //------------------------------init---------------------------