Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/block.cpp @ 566:91263420e1c6
6791852: assert(b->_nodes[insidx] == n,"got insidx set incorrectly")
Summary: Move the CreateEx up before each round of IFG construction
Reviewed-by: never, phh
author | kvn |
---|---|
date | Fri, 06 Feb 2009 13:31:03 -0800 |
parents | 72c5366e5d86 |
children | 0fbdb4381b99 523ded093c31 |
comparison
equal
deleted
inserted
replaced
565:7fe62bb75bf4 | 566:91263420e1c6 |
---|---|
878 _blocks[i]->dump_head(&_bbs); | 878 _blocks[i]->dump_head(&_bbs); |
879 } | 879 } |
880 } | 880 } |
881 | 881 |
882 void PhaseCFG::verify( ) const { | 882 void PhaseCFG::verify( ) const { |
883 #ifdef ASSERT | |
883 // Verify sane CFG | 884 // Verify sane CFG |
884 for( uint i = 0; i < _num_blocks; i++ ) { | 885 for( uint i = 0; i < _num_blocks; i++ ) { |
885 Block *b = _blocks[i]; | 886 Block *b = _blocks[i]; |
886 uint cnt = b->_nodes.size(); | 887 uint cnt = b->_nodes.size(); |
887 uint j; | 888 uint j; |
892 n->as_Mach()->ideal_Opcode() == Op_CreateEx ) { | 893 n->as_Mach()->ideal_Opcode() == Op_CreateEx ) { |
893 assert( j == 1 || b->_nodes[j-1]->is_Phi(), | 894 assert( j == 1 || b->_nodes[j-1]->is_Phi(), |
894 "CreateEx must be first instruction in block" ); | 895 "CreateEx must be first instruction in block" ); |
895 } | 896 } |
896 for( uint k = 0; k < n->req(); k++ ) { | 897 for( uint k = 0; k < n->req(); k++ ) { |
897 Node *use = n->in(k); | 898 Node *def = n->in(k); |
898 if( use && use != n ) { | 899 if( def && def != n ) { |
899 assert( _bbs[use->_idx] || use->is_Con(), | 900 assert( _bbs[def->_idx] || def->is_Con(), |
900 "must have block; constants for debug info ok" ); | 901 "must have block; constants for debug info ok" ); |
902 // Verify that instructions in the block is in correct order. | |
903 // Uses must follow their definition if they are at the same block. | |
904 // Mostly done to check that MachSpillCopy nodes are placed correctly | |
905 // when CreateEx node is moved in build_ifg_physical(). | |
906 if( _bbs[def->_idx] == b && | |
907 !(b->head()->is_Loop() && n->is_Phi()) && | |
908 // See (+++) comment in reg_split.cpp | |
909 !(n->jvms() != NULL && n->jvms()->is_monitor_use(k)) ) { | |
910 assert( b->find_node(def) < j, "uses must follow definitions" ); | |
911 } | |
901 } | 912 } |
902 } | 913 } |
903 } | 914 } |
904 | 915 |
905 j = b->end_idx(); | 916 j = b->end_idx(); |
912 } | 923 } |
913 else if( bp->is_Mach() && bp->as_Mach()->ideal_Opcode() == Op_If ) { | 924 else if( bp->is_Mach() && bp->as_Mach()->ideal_Opcode() == Op_If ) { |
914 assert( b->_num_succs == 2, "Conditional branch must have two targets"); | 925 assert( b->_num_succs == 2, "Conditional branch must have two targets"); |
915 } | 926 } |
916 } | 927 } |
928 #endif | |
917 } | 929 } |
918 #endif | 930 #endif |
919 | 931 |
920 //============================================================================= | 932 //============================================================================= |
921 //------------------------------UnionFind-------------------------------------- | 933 //------------------------------UnionFind-------------------------------------- |