diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-11-27 20:29:15 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-11-27 20:29:15 +0000 |
commit | 65235d337ac7b892e8171c4a0ec74d83d128837a (patch) | |
tree | 436c983a432ffc86e3f81d2f07a71c8635c1bf4b /gcc/gcse.c | |
parent | 4cd300ceec5916fd3433e717d700d8c5224ce6e3 (diff) |
2012-11-27 Paolo Bonzini <pbonzini@redhat.com>
PR rtl-optimization/55489
* gcse.c (compute_transp): Precompute a canonical version
of XEXP (x, 0), and pass it to canon_true_dependence.
* alias.c (init_alias_analysis): Fix allocation of reg_known_value.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193868 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index ad09afd0d6d..ee45b6544f9 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -1677,6 +1677,10 @@ compute_transp (const_rtx x, int indx, sbitmap *bmap) { bitmap_iterator bi; unsigned bb_index; + rtx x_addr; + + x_addr = get_addr (XEXP (x, 0)); + x_addr = canon_rtx (x_addr); /* First handle all the blocks with calls. We don't need to do any list walking for them. */ @@ -1685,27 +1689,27 @@ compute_transp (const_rtx x, int indx, sbitmap *bmap) bitmap_clear_bit (bmap[bb_index], indx); } - /* Now iterate over the blocks which have memory modifications - but which do not have any calls. */ - EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set, - blocks_with_calls, - 0, bb_index, bi) - { - vec<modify_pair> list - = canon_modify_mem_list[bb_index]; - modify_pair *pair; - unsigned ix; + /* Now iterate over the blocks which have memory modifications + but which do not have any calls. */ + EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set, + blocks_with_calls, + 0, bb_index, bi) + { + vec<modify_pair> list + = canon_modify_mem_list[bb_index]; + modify_pair *pair; + unsigned ix; - FOR_EACH_VEC_ELT_REVERSE (list, ix, pair) - { - rtx dest = pair->dest; - rtx dest_addr = pair->dest_addr; + FOR_EACH_VEC_ELT_REVERSE (list, ix, pair) + { + rtx dest = pair->dest; + rtx dest_addr = pair->dest_addr; - if (canon_true_dependence (dest, GET_MODE (dest), - dest_addr, x, NULL_RTX)) - bitmap_clear_bit (bmap[bb_index], indx); - } - } + if (canon_true_dependence (dest, GET_MODE (dest), + dest_addr, x, x_addr)) + bitmap_clear_bit (bmap[bb_index], indx); + } + } } x = XEXP (x, 0); |