Mercurial > hg > CbC > CbC_gcc
comparison gcc/tree-ssa-sink.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
23 #include "system.h" | 23 #include "system.h" |
24 #include "coretypes.h" | 24 #include "coretypes.h" |
25 #include "tm.h" | 25 #include "tm.h" |
26 #include "tree.h" | 26 #include "tree.h" |
27 #include "basic-block.h" | 27 #include "basic-block.h" |
28 #include "diagnostic.h" | |
29 #include "gimple-pretty-print.h" | 28 #include "gimple-pretty-print.h" |
30 #include "tree-inline.h" | 29 #include "tree-inline.h" |
31 #include "tree-flow.h" | 30 #include "tree-flow.h" |
32 #include "gimple.h" | 31 #include "gimple.h" |
33 #include "tree-dump.h" | 32 #include "tree-dump.h" |
189 /* If the store is to a global symbol, we need to keep it. */ | 188 /* If the store is to a global symbol, we need to keep it. */ |
190 if (is_global_var (lhs)) | 189 if (is_global_var (lhs)) |
191 return true; | 190 return true; |
192 | 191 |
193 } | 192 } |
194 else if (INDIRECT_REF_P (lhs)) | 193 else if (INDIRECT_REF_P (lhs) |
194 || TREE_CODE (lhs) == MEM_REF | |
195 || TREE_CODE (lhs) == TARGET_MEM_REF) | |
195 return ptr_deref_may_alias_global_p (TREE_OPERAND (lhs, 0)); | 196 return ptr_deref_may_alias_global_p (TREE_OPERAND (lhs, 0)); |
197 else if (CONSTANT_CLASS_P (lhs)) | |
198 return true; | |
196 else | 199 else |
197 gcc_unreachable (); | 200 gcc_unreachable (); |
198 } | 201 } |
199 | 202 |
200 return false; | 203 return false; |
422 | 425 |
423 if (gimple_bb (use) == frombb) | 426 if (gimple_bb (use) == frombb) |
424 return false; | 427 return false; |
425 if (sinkbb == frombb || sinkbb->loop_depth > frombb->loop_depth | 428 if (sinkbb == frombb || sinkbb->loop_depth > frombb->loop_depth |
426 || sinkbb->loop_father != frombb->loop_father) | 429 || sinkbb->loop_father != frombb->loop_father) |
430 return false; | |
431 | |
432 /* If the latch block is empty, don't make it non-empty by sinking | |
433 something into it. */ | |
434 if (sinkbb == frombb->loop_father->latch | |
435 && empty_block_p (sinkbb)) | |
427 return false; | 436 return false; |
428 | 437 |
429 /* Move the expression to a post dominator can't reduce the number of | 438 /* Move the expression to a post dominator can't reduce the number of |
430 executions. */ | 439 executions. */ |
431 if (dominated_by_p (CDI_POST_DOMINATORS, frombb, sinkbb)) | 440 if (dominated_by_p (CDI_POST_DOMINATORS, frombb, sinkbb)) |
593 | PROP_ssa, /* properties_required */ | 602 | PROP_ssa, /* properties_required */ |
594 0, /* properties_provided */ | 603 0, /* properties_provided */ |
595 0, /* properties_destroyed */ | 604 0, /* properties_destroyed */ |
596 0, /* todo_flags_start */ | 605 0, /* todo_flags_start */ |
597 TODO_update_ssa | 606 TODO_update_ssa |
607 | TODO_verify_ssa | |
608 | TODO_verify_flow | |
598 | TODO_dump_func | 609 | TODO_dump_func |
599 | TODO_ggc_collect | 610 | TODO_ggc_collect /* todo_flags_finish */ |
600 | TODO_verify_ssa /* todo_flags_finish */ | |
601 } | 611 } |
602 }; | 612 }; |