* [PATCH GCC][2/4]Remove interface initialize_root in predcom
@ 2017-06-27 10:48 Bin Cheng
2017-06-27 10:53 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Bin Cheng @ 2017-06-27 10:48 UTC (permalink / raw)
To: gcc-patches; +Cc: nd
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
Hi,
This simple patch removes interface initialize_root. It's simple enough and called only once.
Bootstrap(O2/O3) in patch series on x86_64 and AArch64. Is it OK?
Thanks,
bin
2017-06-21 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.
[-- Attachment #2: remove-initialize_root-20170620.txt --]
[-- Type: text/plain, Size: 2351 bytes --]
From 5670159613b9582437d3713aa69578e1a6b2cf0c Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Tue, 20 Jun 2017 16:31:43 +0100
Subject: [PATCH 4/6] remove-initialize_root-20170620.txt
---
gcc/tree-predcom.c | 30 +++++++++---------------------
1 file changed, 9 insertions(+), 21 deletions(-)
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 0238e87..1c5944d 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];
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH GCC][2/4]Remove interface initialize_root in predcom
2017-06-27 10:48 [PATCH GCC][2/4]Remove interface initialize_root in predcom Bin Cheng
@ 2017-06-27 10:53 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2017-06-27 10:53 UTC (permalink / raw)
To: Bin Cheng; +Cc: gcc-patches, nd
On Tue, Jun 27, 2017 at 12:48 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> This simple patch removes interface initialize_root. It's simple enough and called only once.
> Bootstrap(O2/O3) in patch series on x86_64 and AArch64. Is it OK?
Ok.
> Thanks,
> bin
> 2017-06-21 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-27 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 10:48 [PATCH GCC][2/4]Remove interface initialize_root in predcom Bin Cheng
2017-06-27 10:53 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).