public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH GCC8][12/33]Expose interfaces of tree-ssa-address.c
@ 2017-04-18 10:44 Bin Cheng
  2017-04-25 15:30 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Bin Cheng @ 2017-04-18 10:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Hi,
This patch exposes several interfaces in tree-ssa-address.c so that they can be used
in cost computation for address iv_use.

Is it OK?

Thanks,
bin
2017-04-11  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-address.c (struct mem_address): Move to header file.
	(valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
	* tree-ssa-address.h (struct mem_address): Move from C file.
	(valid_mem_ref_p, move_fixed_address_to_symbol): Declare.

[-- Attachment #2: 0012-expose-ssa-address-interface-20170220.txt --]
[-- Type: text/plain, Size: 2442 bytes --]

From 859b2cfc74bb7a022047008e2b80d6600b50db5f Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Wed, 1 Mar 2017 17:43:10 +0000
Subject: [PATCH 12/33] expose-ssa-address-interface-20170220.txt

---
 gcc/tree-ssa-address.c | 11 ++---------
 gcc/tree-ssa-address.h | 10 ++++++++++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index 8d46a3e..e35d323 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -178,13 +178,6 @@ gen_addr_rtx (machine_mode address_mode,
     *addr = const0_rtx;
 }
 
-/* Description of a memory address.  */
-
-struct mem_address
-{
-  tree symbol, base, index, step, offset;
-};
-
 /* Returns address for TARGET_MEM_REF with parameters given by ADDR
    in address space AS.
    If REALLY_EXPAND is false, just make fake registers instead
@@ -330,7 +323,7 @@ tree_mem_ref_addr (tree type, tree mem_ref)
 /* Returns true if a memory reference in MODE and with parameters given by
    ADDR is valid on the current target.  */
 
-static bool
+bool
 valid_mem_ref_p (machine_mode mode, addr_space_t as,
 		 struct mem_address *addr)
 {
@@ -408,7 +401,7 @@ fixed_address_object_p (tree obj)
 /* If ADDR contains an address of object that is a link time constant,
    move it to PARTS->symbol.  */
 
-static void
+void
 move_fixed_address_to_symbol (struct mem_address *parts, aff_tree *addr)
 {
   unsigned i;
diff --git a/gcc/tree-ssa-address.h b/gcc/tree-ssa-address.h
index 311348e..cd62ed9 100644
--- a/gcc/tree-ssa-address.h
+++ b/gcc/tree-ssa-address.h
@@ -20,10 +20,20 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_TREE_SSA_ADDRESS_H
 #define GCC_TREE_SSA_ADDRESS_H
 
+/* Description of a memory address.  */
+
+struct mem_address
+{
+  tree symbol, base, index, step, offset;
+};
+
 extern rtx addr_for_mem_ref (struct mem_address *, addr_space_t, bool);
 extern rtx addr_for_mem_ref (tree exp, addr_space_t as, bool really_expand);
 extern void get_address_description (tree, struct mem_address *);
 extern tree tree_mem_ref_addr (tree, tree);
+extern bool valid_mem_ref_p (machine_mode, addr_space_t, struct mem_address *);
+extern void move_fixed_address_to_symbol (struct mem_address *,
+					  struct aff_tree *);
 tree create_mem_ref (gimple_stmt_iterator *, tree,
 		     struct aff_tree *, tree, tree, tree, bool);
 extern void copy_ref_info (tree, tree);
-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH GCC8][12/33]Expose interfaces of tree-ssa-address.c
  2017-04-18 10:44 [PATCH GCC8][12/33]Expose interfaces of tree-ssa-address.c Bin Cheng
@ 2017-04-25 15:30 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2017-04-25 15:30 UTC (permalink / raw)
  To: Bin Cheng, gcc-patches; +Cc: nd

On 04/18/2017 04:43 AM, Bin Cheng wrote:
> Hi,
> This patch exposes several interfaces in tree-ssa-address.c so that they can be used
> in cost computation for address iv_use.
> 
> Is it OK?
> 
> Thanks,
> bin
> 2017-04-11  Bin Cheng  <bin.cheng@arm.com>
> 
> 	* tree-ssa-address.c (struct mem_address): Move to header file.
> 	(valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
> 	* tree-ssa-address.h (struct mem_address): Move from C file.
> 	(valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
> 
OK.
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-25 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 10:44 [PATCH GCC8][12/33]Expose interfaces of tree-ssa-address.c Bin Cheng
2017-04-25 15:30 ` Jeff Law

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).