aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@arm.com>2017-07-28 14:58:11 +0000
committerBin Cheng <amker@gcc.gnu.org>2017-07-28 14:58:11 +0000
commit10dfaf9a3ba779d219148b863fc94f5fccd15302 (patch)
tree21d758f58178e65aa9dc436f18b24410980b8782
parent3c62a7fb6e7d2a0f2ee20118de2b0f16cc1b2f74 (diff)
downloadgcc-10dfaf9a3ba779d219148b863fc94f5fccd15302.zip
gcc-10dfaf9a3ba779d219148b863fc94f5fccd15302.tar.gz
gcc-10dfaf9a3ba779d219148b863fc94f5fccd15302.tar.bz2
tree-predcom.c (initialize_root): Delete.
* tree-predcom.c (initialize_root): Delete. (execute_pred_commoning_chain): Initialize root vars and replace reference of non-combined chain directly, rather than call above function. From-SVN: r250668
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-predcom.c30
2 files changed, 16 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d33678..8af1654 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2017-07-28 Bin Cheng <bin.cheng@arm.com>
+ * tree-predcom.c (initialize_root): Delete.
+ (execute_pred_commoning_chain): Initialize root vars and replace
+ reference of non-combined chain directly, rather than call above
+ function.
+
+2017-07-28 Bin Cheng <bin.cheng@arm.com>
+
* tree-predcom.c (ref_at_iteration): Add parameter NITERS. Compute
memory reference to DR at (NITERS + ITERS)-th iteration of loop.
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 8861f31..f875743 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -1536,23 +1536,6 @@ initialize_root_vars (struct loop *loop, chain_p chain, bitmap tmp_vars)
}
}
-/* Create the variables and initialization statement for root of chain
- CHAIN. Uids of the newly created temporary variables are marked
- in TMP_VARS. */
-
-static void
-initialize_root (struct loop *loop, chain_p chain, bitmap tmp_vars)
-{
- dref root = get_chain_root (chain);
- bool in_lhs = (chain->type == CT_STORE_LOAD
- || chain->type == CT_COMBINATION);
-
- initialize_root_vars (loop, chain, tmp_vars);
- replace_ref_with (root->stmt,
- chain->vars[chain->length],
- true, in_lhs);
-}
-
/* Initializes a variable for load motion for ROOT and prepares phi nodes and
initialization on entry to LOOP if necessary. The ssa name for the variable
is stored in VARS. If WRITTEN is true, also a phi node to copy its value
@@ -1749,6 +1732,7 @@ execute_pred_commoning_chain (struct loop *loop, chain_p chain,
unsigned i;
dref a;
tree var;
+ bool in_lhs;
if (chain->combined)
{
@@ -1758,10 +1742,14 @@ execute_pred_commoning_chain (struct loop *loop, chain_p chain,
}
else
{
- /* For non-combined chains, set up the variables that hold its value,
- and replace the uses of the original references by these
- variables. */
- initialize_root (loop, chain, tmp_vars);
+ /* For non-combined chains, set up the variables that hold its value. */
+ initialize_root_vars (loop, chain, tmp_vars);
+ a = get_chain_root (chain);
+ in_lhs = (chain->type == CT_STORE_LOAD
+ || chain->type == CT_COMBINATION);
+ replace_ref_with (a->stmt, chain->vars[chain->length], true, in_lhs);
+
+ /* Replace the uses of the original references by these variables. */
for (i = 1; chain->refs.iterate (i, &a); i++)
{
var = chain->vars[chain->length - a->distance];