Mercurial > hg > truffle
comparison src/share/vm/opto/loopTransform.cpp @ 216:8d191a7697e2
6715633: when matching a memory node the adr_type should not change
Summary: verify the adr_type of a mach node was not changed
Reviewed-by: rasbold, never
author | kvn |
---|---|
date | Fri, 20 Jun 2008 11:10:05 -0700 |
parents | ba764ed4b6f2 |
children | 9c2ecc2ffb12 |
comparison
equal
deleted
inserted
replaced
215:273eaa04d9a1 | 216:8d191a7697e2 |
---|---|
688 // Step A2: Build a zero-trip guard for the post-loop. After leaving the | 688 // Step A2: Build a zero-trip guard for the post-loop. After leaving the |
689 // main-loop, the post-loop may not execute at all. We 'opaque' the incr | 689 // main-loop, the post-loop may not execute at all. We 'opaque' the incr |
690 // (the main-loop trip-counter exit value) because we will be changing | 690 // (the main-loop trip-counter exit value) because we will be changing |
691 // the exit value (via unrolling) so we cannot constant-fold away the zero | 691 // the exit value (via unrolling) so we cannot constant-fold away the zero |
692 // trip guard until all unrolling is done. | 692 // trip guard until all unrolling is done. |
693 Node *zer_opaq = new (C, 2) Opaque1Node(incr); | 693 Node *zer_opaq = new (C, 2) Opaque1Node(C, incr); |
694 Node *zer_cmp = new (C, 3) CmpINode( zer_opaq, limit ); | 694 Node *zer_cmp = new (C, 3) CmpINode( zer_opaq, limit ); |
695 Node *zer_bol = new (C, 2) BoolNode( zer_cmp, b_test ); | 695 Node *zer_bol = new (C, 2) BoolNode( zer_cmp, b_test ); |
696 register_new_node( zer_opaq, new_main_exit ); | 696 register_new_node( zer_opaq, new_main_exit ); |
697 register_new_node( zer_cmp , new_main_exit ); | 697 register_new_node( zer_cmp , new_main_exit ); |
698 register_new_node( zer_bol , new_main_exit ); | 698 register_new_node( zer_bol , new_main_exit ); |
758 | 758 |
759 // Step B2: Build a zero-trip guard for the main-loop. After leaving the | 759 // Step B2: Build a zero-trip guard for the main-loop. After leaving the |
760 // pre-loop, the main-loop may not execute at all. Later in life this | 760 // pre-loop, the main-loop may not execute at all. Later in life this |
761 // zero-trip guard will become the minimum-trip guard when we unroll | 761 // zero-trip guard will become the minimum-trip guard when we unroll |
762 // the main-loop. | 762 // the main-loop. |
763 Node *min_opaq = new (C, 2) Opaque1Node(limit); | 763 Node *min_opaq = new (C, 2) Opaque1Node(C, limit); |
764 Node *min_cmp = new (C, 3) CmpINode( pre_incr, min_opaq ); | 764 Node *min_cmp = new (C, 3) CmpINode( pre_incr, min_opaq ); |
765 Node *min_bol = new (C, 2) BoolNode( min_cmp, b_test ); | 765 Node *min_bol = new (C, 2) BoolNode( min_cmp, b_test ); |
766 register_new_node( min_opaq, new_pre_exit ); | 766 register_new_node( min_opaq, new_pre_exit ); |
767 register_new_node( min_cmp , new_pre_exit ); | 767 register_new_node( min_cmp , new_pre_exit ); |
768 register_new_node( min_bol , new_pre_exit ); | 768 register_new_node( min_bol , new_pre_exit ); |
808 assert( cmp_end->in(2) == limit, "" ); | 808 assert( cmp_end->in(2) == limit, "" ); |
809 Node *pre_limit = new (C, 3) AddINode( init, stride ); | 809 Node *pre_limit = new (C, 3) AddINode( init, stride ); |
810 | 810 |
811 // Save the original loop limit in this Opaque1 node for | 811 // Save the original loop limit in this Opaque1 node for |
812 // use by range check elimination. | 812 // use by range check elimination. |
813 Node *pre_opaq = new (C, 3) Opaque1Node(pre_limit, limit); | 813 Node *pre_opaq = new (C, 3) Opaque1Node(C, pre_limit, limit); |
814 | 814 |
815 register_new_node( pre_limit, pre_head->in(0) ); | 815 register_new_node( pre_limit, pre_head->in(0) ); |
816 register_new_node( pre_opaq , pre_head->in(0) ); | 816 register_new_node( pre_opaq , pre_head->in(0) ); |
817 | 817 |
818 // Since no other users of pre-loop compare, I can hack limit directly | 818 // Since no other users of pre-loop compare, I can hack limit directly |