diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-13 19:14:33 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-13 19:14:33 +0000 |
commit | 0dd8cf9cc8350069e94a624959d1ad4487c46a8c (patch) | |
tree | 63472a8da3b4d5a6c33190c256b60a5710d30a18 /gcc/tree-predcom.c | |
parent | fe644b69d013e77c7fc2db2a9863969d4f564561 (diff) | |
parent | 69888cc76b4873822f5e48b66f69e9d20d19fc50 (diff) | |
download | gcc-0dd8cf9cc8350069e94a624959d1ad4487c46a8c.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@206584 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r-- | gcc/tree-predcom.c | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 3eaf81d334d..35743cbe3bd 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -773,10 +773,37 @@ split_data_refs_to_components (struct loop *loop, bad = component_of (comp_father, n); /* If both A and B are reads, we may ignore unsuitable dependences. */ - if (DR_IS_READ (dra) && DR_IS_READ (drb) - && (ia == bad || ib == bad - || !determine_offset (dra, drb, &dummy_off))) - continue; + if (DR_IS_READ (dra) && DR_IS_READ (drb)) + { + if (ia == bad || ib == bad + || !determine_offset (dra, drb, &dummy_off)) + continue; + } + /* If A is read and B write or vice versa and there is unsuitable + dependence, instead of merging both components into a component + that will certainly not pass suitable_component_p, just put the + read into bad component, perhaps at least the write together with + all the other data refs in it's component will be optimizable. */ + else if (DR_IS_READ (dra) && ib != bad) + { + if (ia == bad) + continue; + else if (!determine_offset (dra, drb, &dummy_off)) + { + merge_comps (comp_father, comp_size, bad, ia); + continue; + } + } + else if (DR_IS_READ (drb) && ia != bad) + { + if (ib == bad) + continue; + else if (!determine_offset (dra, drb, &dummy_off)) + { + merge_comps (comp_father, comp_size, bad, ib); + continue; + } + } merge_comps (comp_father, comp_size, ia, ib); } @@ -2420,6 +2447,7 @@ tree_predictive_commoning_loop (struct loop *loop) if (!components) { free_data_refs (datarefs); + free_affine_expand_cache (&name_expansions); return false; } |