Mercurial > hg > truffle
comparison src/share/vm/opto/loopopts.cpp @ 4779:c8d8e124380c
7064302: JDK7 build 147 crashed after testing my java 6-compiled web app
Summary: Don't split CMove node if it's control edge is different from split region.
Reviewed-by: never
author | kvn |
---|---|
date | Thu, 12 Jan 2012 12:28:59 -0800 |
parents | 670a74b863fc |
children | 5e990493719e |
comparison
equal
deleted
inserted
replaced
4778:35acf8f0a2e4 | 4779:c8d8e124380c |
---|---|
817 | 817 |
818 // Check some safety conditions | 818 // Check some safety conditions |
819 if( iff->is_If() ) { // Classic split-if? | 819 if( iff->is_If() ) { // Classic split-if? |
820 if( iff->in(0) != n_ctrl ) return; // Compare must be in same blk as if | 820 if( iff->in(0) != n_ctrl ) return; // Compare must be in same blk as if |
821 } else if (iff->is_CMove()) { // Trying to split-up a CMOVE | 821 } else if (iff->is_CMove()) { // Trying to split-up a CMOVE |
822 // Can't split CMove with different control edge. | |
823 if (iff->in(0) != NULL && iff->in(0) != n_ctrl ) return; | |
822 if( get_ctrl(iff->in(2)) == n_ctrl || | 824 if( get_ctrl(iff->in(2)) == n_ctrl || |
823 get_ctrl(iff->in(3)) == n_ctrl ) | 825 get_ctrl(iff->in(3)) == n_ctrl ) |
824 return; // Inputs not yet split-up | 826 return; // Inputs not yet split-up |
825 if ( get_loop(n_ctrl) != get_loop(get_ctrl(iff)) ) { | 827 if ( get_loop(n_ctrl) != get_loop(get_ctrl(iff)) ) { |
826 return; // Loop-invar test gates loop-varying CMOVE | 828 return; // Loop-invar test gates loop-varying CMOVE |
935 if( n_loop->is_member( u_loop ) ) break; // Found use in inner loop | 937 if( n_loop->is_member( u_loop ) ) break; // Found use in inner loop |
936 if( u->Opcode() == Op_Opaque1 ) break; // Found loop limit, bugfix for 4677003 | 938 if( u->Opcode() == Op_Opaque1 ) break; // Found loop limit, bugfix for 4677003 |
937 } | 939 } |
938 bool did_break = (i < imax); // Did we break out of the previous loop? | 940 bool did_break = (i < imax); // Did we break out of the previous loop? |
939 if (!did_break && n->outcnt() > 1) { // All uses in outer loops! | 941 if (!did_break && n->outcnt() > 1) { // All uses in outer loops! |
940 Node *late_load_ctrl; | 942 Node *late_load_ctrl = NULL; |
941 if (n->is_Load()) { | 943 if (n->is_Load()) { |
942 // If n is a load, get and save the result from get_late_ctrl(), | 944 // If n is a load, get and save the result from get_late_ctrl(), |
943 // to be later used in calculating the control for n's clones. | 945 // to be later used in calculating the control for n's clones. |
944 clear_dom_lca_tags(); | 946 clear_dom_lca_tags(); |
945 late_load_ctrl = get_late_ctrl(n, n_ctrl); | 947 late_load_ctrl = get_late_ctrl(n, n_ctrl); |