aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-12-02 11:04:23 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-12-02 11:04:23 -0800
commit998d7deb143c6511c68e21abb811af9f5524f89d (patch)
tree7dcf60eaed1d63b62946ca9c11cf34b2d9ceaa21 /gcc/final.c
parent3d55d212918e4f8853365fbf7531d30b9d88a82f (diff)
downloadgcc-998d7deb143c6511c68e21abb811af9f5524f89d.zip
gcc-998d7deb143c6511c68e21abb811af9f5524f89d.tar.gz
gcc-998d7deb143c6511c68e21abb811af9f5524f89d.tar.bz2
rtl.h (mem_attrs): Rename decl to expr; adjust all users.
* rtl.h (mem_attrs): Rename decl to expr; adjust all users. (MEM_EXPR): Rename from MEM_DECL; adjust all users. * emit-rtl.c (set_mem_expr): Rename from set_mem_decl. * expr.h, final.c, reload1.c: Adjust users. * alias.c (nonoverlapping_component_refs_p): New. (decl_for_component_ref, adjust_offset_for_component_ref): New. (nonoverlapping_memrefs_p): Use them. * emit-rtl.c (component_ref_for_mem_expr): New. (set_mem_attributes): Use it. (set_mem_offset): New. * expr.c (expand_assignment): Call set_mem_attributes for inner references; adjust the memory offset as needed. * print-rtl.c (print_mem_expr): New. (print_rtx): Use it. From-SVN: r47534
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 7af2c1f..158da0b 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -245,7 +245,7 @@ static int add_bb_string PARAMS ((const char *, int));
static void notice_source_line PARAMS ((rtx));
static rtx walk_alter_subreg PARAMS ((rtx *));
static void output_asm_name PARAMS ((void));
-static tree get_decl_from_op PARAMS ((rtx, int *));
+static tree get_mem_expr_from_op PARAMS ((rtx, int *));
static void output_asm_operand_names PARAMS ((rtx *, int *, int));
static void output_operand PARAMS ((rtx, int));
#ifdef LEAF_REGISTERS
@@ -3302,16 +3302,16 @@ output_asm_name ()
}
}
-/* If OP is a REG or MEM and we can find a decl corresponding to it or
- its address, return that decl. Set *PADDRESSP to 1 if the decl
+/* If OP is a REG or MEM and we can find a MEM_EXPR corresponding to it
+ or its address, return that expr . Set *PADDRESSP to 1 if the expr
corresponds to the address of the object and 0 if to the object. */
static tree
-get_decl_from_op (op, paddressp)
+get_mem_expr_from_op (op, paddressp)
rtx op;
int *paddressp;
{
- tree decl;
+ tree expr;
int inner_addressp;
*paddressp = 0;
@@ -3321,8 +3321,8 @@ get_decl_from_op (op, paddressp)
else if (GET_CODE (op) != MEM)
return 0;
- if (MEM_DECL (op) != 0)
- return MEM_DECL (op);
+ if (MEM_EXPR (op) != 0)
+ return MEM_EXPR (op);
/* Otherwise we have an address, so indicate it and look at the address. */
*paddressp = 1;
@@ -3331,18 +3331,18 @@ get_decl_from_op (op, paddressp)
/* First check if we have a decl for the address, then look at the right side
if it is a PLUS. Otherwise, strip off arithmetic and keep looking.
But don't allow the address to itself be indirect. */
- if ((decl = get_decl_from_op (op, &inner_addressp)) && ! inner_addressp)
- return decl;
+ if ((expr = get_mem_expr_from_op (op, &inner_addressp)) && ! inner_addressp)
+ return expr;
else if (GET_CODE (op) == PLUS
- && (decl = get_decl_from_op (XEXP (op, 1), &inner_addressp)))
- return decl;
+ && (expr = get_mem_expr_from_op (XEXP (op, 1), &inner_addressp)))
+ return expr;
while (GET_RTX_CLASS (GET_CODE (op)) == '1'
|| GET_RTX_CLASS (GET_CODE (op)) == '2')
op = XEXP (op, 0);
- decl = get_decl_from_op (op, &inner_addressp);
- return inner_addressp ? 0 : decl;
+ expr = get_mem_expr_from_op (op, &inner_addressp);
+ return inner_addressp ? 0 : expr;
}
/* Output operand names for assembler instructions. OPERANDS is the
@@ -3361,13 +3361,14 @@ output_asm_operand_names (operands, oporder, nops)
for (i = 0; i < nops; i++)
{
int addressp;
- tree decl = get_decl_from_op (operands[oporder[i]], &addressp);
+ tree expr = get_mem_expr_from_op (operands[oporder[i]], &addressp);
- if (decl && DECL_NAME (decl))
+ if (expr)
{
- fprintf (asm_out_file, "%c%s %s%s",
+ fprintf (asm_out_file, "%c%s %s",
wrote ? ',' : '\t', wrote ? "" : ASM_COMMENT_START,
- addressp ? "*" : "", IDENTIFIER_POINTER (DECL_NAME (decl)));
+ addressp ? "*" : "");
+ print_mem_expr (asm_out_file, expr);
wrote = 1;
}
}