diff options
author | renlin <renlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-06 14:37:59 +0000 |
---|---|---|
committer | renlin <renlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-06 14:37:59 +0000 |
commit | 081102136a147ce69fbcc9b65268c405c4a2884d (patch) | |
tree | 699a5f6106ebad87a8fc9a8e702a867222760c70 | |
parent | dab7110f682e5b3151edd9f8ed6599199c1b2dde (diff) | |
download | gcc-081102136a147ce69fbcc9b65268c405c4a2884d.tar.gz |
[PATCH]Keep location info when expand complex component-wise load/store.
gcc/
* tree-ssa-forwprop.c (execute): Keep location info while rewrite
complex gimple.
* tree-ssa.c (execute_update_addresses_taken): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220480 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa.c | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 41a824d057b..47d98adbd5c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-06 Renlin Li <renlin.li@arm.com> + + * tree-ssa-forwprop.c (execute): Keep location info while rewrite + complex gimple. + * tree-ssa.c (execute_update_addresses_taken): Likewise. + 2015-02-06 Jeff Law <law@redhat.com> PR target/64889 diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 82d832d4754..d8db20acd3c 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -2274,6 +2274,8 @@ pass_forwprop::execute (function *fun) = gimple_build_assign (gimple_assign_lhs (use_stmt), new_rhs); + location_t loc = gimple_location (use_stmt); + gimple_set_location (new_stmt, loc); gimple_stmt_iterator gsi2 = gsi_for_stmt (use_stmt); unlink_stmt_vdef (use_stmt); gsi_remove (&gsi2, true); @@ -2305,6 +2307,8 @@ pass_forwprop::execute (function *fun) TREE_TYPE (TREE_TYPE (use_lhs)), unshare_expr (use_lhs)); gimple new_stmt = gimple_build_assign (new_lhs, rhs); + location_t loc = gimple_location (use_stmt); + gimple_set_location (new_stmt, loc); gimple_set_vuse (new_stmt, gimple_vuse (use_stmt)); gimple_set_vdef (new_stmt, make_ssa_name (gimple_vop (cfun))); SSA_NAME_DEF_STMT (gimple_vdef (new_stmt)) = new_stmt; diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 5bf64476beb..10d3314558e 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1561,6 +1561,8 @@ execute_update_addresses_taken (void) TREE_TYPE (other), TREE_OPERAND (lhs, 0)); gimple load = gimple_build_assign (other, lrhs); + location_t loc = gimple_location (stmt); + gimple_set_location (load, loc); gimple_set_vuse (load, gimple_vuse (stmt)); gsi_insert_before (&gsi, load, GSI_SAME_STMT); gimple_assign_set_lhs (stmt, TREE_OPERAND (lhs, 0)); |