Commit 4361b41d by Mark Mitchell Committed by Mark Mitchell

calls.c (expand_call): Don't create a VAR_DECL just to throw it away.

	* calls.c (expand_call): Don't create a VAR_DECL just to throw it
	away.
	* expr.c (expand_expr, case TARGET_EXPR): Don't call
	mark_addressable.
	* tree.h (get_file_function_name): Remove two duplicate
	declarations.

	* typeck.c (mark_addressable): Remove code that pokes around in
	RTL.

From-SVN: r36038
parent 9b1ee05b
2000-08-29 Mark Mitchell <mark@codesourcery.com>
* calls.c (expand_call): Don't create a VAR_DECL just to throw it
away.
* expr.c (expand_expr, case TARGET_EXPR): Don't call
mark_addressable.
* tree.h (get_file_function_name): Remove two duplicate
declarations.
2000-08-28 Kazu Hirata <kazu@hxi.com> 2000-08-28 Kazu Hirata <kazu@hxi.com>
* tree.c: Fix formatting. * tree.c: Fix formatting.
......
...@@ -2260,8 +2260,7 @@ expand_call (exp, target, ignore) ...@@ -2260,8 +2260,7 @@ expand_call (exp, target, ignore)
structure_value_addr = XEXP (target, 0); structure_value_addr = XEXP (target, 0);
else else
{ {
/* Assign a temporary to hold the value. */ rtx d;
tree d;
/* For variable-sized objects, we must be called with a target /* For variable-sized objects, we must be called with a target
specified. If we were to allocate space on the stack here, specified. If we were to allocate space on the stack here,
...@@ -2270,14 +2269,9 @@ expand_call (exp, target, ignore) ...@@ -2270,14 +2269,9 @@ expand_call (exp, target, ignore)
if (struct_value_size < 0) if (struct_value_size < 0)
abort (); abort ();
/* This DECL is just something to feed to mark_addressable; d = assign_temp (TREE_TYPE (exp), 1, 1, 1);
it doesn't get pushed. */ mark_temp_addr_taken (d);
d = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE (exp)); structure_value_addr = XEXP (d, 0);
DECL_RTL (d) = assign_temp (TREE_TYPE (exp), 1, 0, 1);
mark_addressable (d);
mark_temp_addr_taken (DECL_RTL (d));
structure_value_addr = XEXP (DECL_RTL (d), 0);
TREE_USED (d) = 1;
target = 0; target = 0;
} }
} }
......
2000-08-29 Mark Mitchell <mark@codesourcery.com>
* typeck.c (mark_addressable): Remove code that pokes around in
RTL.
2000-08-28 Jason Merrill <jason@redhat.com> 2000-08-28 Jason Merrill <jason@redhat.com>
* lex.c (file_name_nondirectory): Move to toplev.c. * lex.c (file_name_nondirectory): Move to toplev.c.
......
...@@ -4925,19 +4925,6 @@ mark_addressable (exp) ...@@ -4925,19 +4925,6 @@ mark_addressable (exp)
return 1; return 1;
} }
case VAR_DECL: case VAR_DECL:
if (TREE_STATIC (x) && TREE_READONLY (x)
&& DECL_RTL (x) != 0
&& ! DECL_IN_MEMORY_P (x))
{
TREE_ASM_WRITTEN (x) = 0;
DECL_RTL (x) = 0;
rest_of_decl_compilation (x, 0,
!DECL_FUNCTION_SCOPE_P (x),
0);
TREE_ADDRESSABLE (x) = 1;
return 1;
}
/* Caller should not be trying to mark initialized /* Caller should not be trying to mark initialized
constant fields addressable. */ constant fields addressable. */
my_friendly_assert (DECL_LANG_SPECIFIC (x) == 0 my_friendly_assert (DECL_LANG_SPECIFIC (x) == 0
...@@ -4952,8 +4939,6 @@ mark_addressable (exp) ...@@ -4952,8 +4939,6 @@ mark_addressable (exp)
cp_warning ("address requested for `%D', which is declared `register'", cp_warning ("address requested for `%D', which is declared `register'",
x); x);
TREE_ADDRESSABLE (x) = 1; TREE_ADDRESSABLE (x) = 1;
if (cfun && expanding_p)
put_var_into_stack (x);
return 1; return 1;
case FUNCTION_DECL: case FUNCTION_DECL:
......
...@@ -8104,10 +8104,7 @@ expand_expr (exp, target, tmode, modifier) ...@@ -8104,10 +8104,7 @@ expand_expr (exp, target, tmode, modifier)
preserve_temp_slots (target); preserve_temp_slots (target);
DECL_RTL (slot) = target; DECL_RTL (slot) = target;
if (TREE_ADDRESSABLE (slot)) if (TREE_ADDRESSABLE (slot))
{ put_var_into_stack (slot);
TREE_ADDRESSABLE (slot) = 0;
mark_addressable (slot);
}
/* Since SLOT is not known to the called function /* Since SLOT is not known to the called function
to belong to its stack frame, we must build an explicit to belong to its stack frame, we must build an explicit
...@@ -8145,10 +8142,7 @@ expand_expr (exp, target, tmode, modifier) ...@@ -8145,10 +8142,7 @@ expand_expr (exp, target, tmode, modifier)
/* If we must have an addressable slot, then make sure that /* If we must have an addressable slot, then make sure that
the RTL that we just stored in slot is OK. */ the RTL that we just stored in slot is OK. */
if (TREE_ADDRESSABLE (slot)) if (TREE_ADDRESSABLE (slot))
{ put_var_into_stack (slot);
TREE_ADDRESSABLE (slot) = 0;
mark_addressable (slot);
}
} }
} }
......
...@@ -2436,7 +2436,6 @@ extern tree builtin_function PARAMS ((const char *, tree, int, ...@@ -2436,7 +2436,6 @@ extern tree builtin_function PARAMS ((const char *, tree, int,
/* In tree.c */ /* In tree.c */
extern char *perm_calloc PARAMS ((int, long)); extern char *perm_calloc PARAMS ((int, long));
extern void clean_symbol_name PARAMS ((char *)); extern void clean_symbol_name PARAMS ((char *));
extern tree get_file_function_name PARAMS ((int));
extern tree get_file_function_name_long PARAMS ((const char *)); extern tree get_file_function_name_long PARAMS ((const char *));
extern tree get_set_constructor_bits PARAMS ((tree, char *, int)); extern tree get_set_constructor_bits PARAMS ((tree, char *, int));
extern tree get_set_constructor_bytes PARAMS ((tree, extern tree get_set_constructor_bytes PARAMS ((tree,
...@@ -2649,7 +2648,6 @@ extern void preserve_momentary PARAMS ((void)); ...@@ -2649,7 +2648,6 @@ extern void preserve_momentary PARAMS ((void));
extern void saveable_allocation PARAMS ((void)); extern void saveable_allocation PARAMS ((void));
extern void temporary_allocation PARAMS ((void)); extern void temporary_allocation PARAMS ((void));
extern void resume_temporary_allocation PARAMS ((void)); extern void resume_temporary_allocation PARAMS ((void));
extern tree get_file_function_name PARAMS ((int));
extern void set_identifier_size PARAMS ((int)); extern void set_identifier_size PARAMS ((int));
extern int int_fits_type_p PARAMS ((tree, tree)); extern int int_fits_type_p PARAMS ((tree, tree));
extern int tree_log2 PARAMS ((tree)); extern int tree_log2 PARAMS ((tree));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment