diff options
Diffstat (limited to 'gcc/tree-ssa-address.c')
-rw-r--r-- | gcc/tree-ssa-address.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 1ea6d2d..49b69b8 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see #include "ggc.h" #include "target.h" #include "expmed.h" +#include "tree-ssa-address.h" /* TODO -- handling of symbols (according to Richard Hendersons comments, http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00949.html): @@ -173,6 +174,13 @@ gen_addr_rtx (enum 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 @@ -256,6 +264,17 @@ addr_for_mem_ref (struct mem_address *addr, addr_space_t as, return address; } +/* implement addr_for_mem_ref() directly from a tree, which avoids exporting + the mem_address structure. */ + +rtx +addr_for_mem_ref (tree exp, addr_space_t as, bool really_expand) +{ + struct mem_address addr; + get_address_description (exp, &addr); + return addr_for_mem_ref (&addr, as, really_expand); +} + /* Returns address of MEM_REF in TYPE. */ tree |