Mercurial > hg > CbC > CbC_gcc
comparison gcc/dse.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
1 /* RTL dead store elimination. | 1 /* RTL dead store elimination. |
2 Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 2 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 |
3 Free Software Foundation, Inc. | |
3 | 4 |
4 Contributed by Richard Sandiford <rsandifor@codesourcery.com> | 5 Contributed by Richard Sandiford <rsandifor@codesourcery.com> |
5 and Kenneth Zadeck <zadeck@naturalbridge.com> | 6 and Kenneth Zadeck <zadeck@naturalbridge.com> |
6 | 7 |
7 This file is part of GCC. | 8 This file is part of GCC. |
1013 static bool | 1014 static bool |
1014 const_or_frame_p (rtx x) | 1015 const_or_frame_p (rtx x) |
1015 { | 1016 { |
1016 switch (GET_CODE (x)) | 1017 switch (GET_CODE (x)) |
1017 { | 1018 { |
1018 case MEM: | |
1019 return MEM_READONLY_P (x); | |
1020 | |
1021 case CONST: | 1019 case CONST: |
1022 case CONST_INT: | 1020 case CONST_INT: |
1023 case CONST_DOUBLE: | 1021 case CONST_DOUBLE: |
1024 case CONST_VECTOR: | 1022 case CONST_VECTOR: |
1025 case SYMBOL_REF: | 1023 case SYMBOL_REF: |
1197 if (dump_file) | 1195 if (dump_file) |
1198 fprintf (dump_file, " no cselib val - should be a wild read.\n"); | 1196 fprintf (dump_file, " no cselib val - should be a wild read.\n"); |
1199 return false; | 1197 return false; |
1200 } | 1198 } |
1201 if (dump_file) | 1199 if (dump_file) |
1202 fprintf (dump_file, " varying cselib base=%d offset = %d\n", | 1200 fprintf (dump_file, " varying cselib base=%u:%u offset = %d\n", |
1203 (*base)->value, (int)*offset); | 1201 (*base)->uid, (*base)->hash, (int)*offset); |
1204 return true; | 1202 return true; |
1205 } | 1203 } |
1206 | 1204 |
1207 | 1205 |
1208 /* Clear the rhs field from the active_local_stores array. */ | 1206 /* Clear the rhs field from the active_local_stores array. */ |
2617 dse_step1 (void) | 2615 dse_step1 (void) |
2618 { | 2616 { |
2619 basic_block bb; | 2617 basic_block bb; |
2620 bitmap regs_live = BITMAP_ALLOC (NULL); | 2618 bitmap regs_live = BITMAP_ALLOC (NULL); |
2621 | 2619 |
2622 cselib_init (false); | 2620 cselib_init (0); |
2623 all_blocks = BITMAP_ALLOC (NULL); | 2621 all_blocks = BITMAP_ALLOC (NULL); |
2624 bitmap_set_bit (all_blocks, ENTRY_BLOCK); | 2622 bitmap_set_bit (all_blocks, ENTRY_BLOCK); |
2625 bitmap_set_bit (all_blocks, EXIT_BLOCK); | 2623 bitmap_set_bit (all_blocks, EXIT_BLOCK); |
2626 | 2624 |
2627 FOR_ALL_BB (bb) | 2625 FOR_ALL_BB (bb) |