/* f->eh->eh_return_stub_label is used by code generation. */
lang_hooks.function.final (f);
- f->stmt = NULL;
}
/* Clear out all parts of the state in F that can safely be discarded
KEEP is 1 if this slot is to be retained after a call to
free_temp_slots. Automatic variables for a block are allocated
- with this flag. KEEP is 2 if we allocate a longer term temporary,
- whose lifetime is controlled by CLEANUP_POINT_EXPRs. KEEP is 3
- if we are to allocate something at an inner level to be treated as
- a variable in the block (e.g., a SAVE_EXPR).
+ with this flag. KEEP values of 2 or 3 were needed respectively
+ for variables whose lifetime is controlled by CLEANUP_POINT_EXPRs
+ or for SAVE_EXPRs, but they are now unused and will abort.
TYPE is the type that will be used for the stack slot. */
if (size == -1)
abort ();
+ /* These are now unused. */
+ if (keep > 1)
+ abort ();
+
if (mode == BLKmode)
align = BIGGEST_ALIGNMENT;
else
p->in_use = 1;
p->addr_taken = 0;
p->type = type;
-
- if (keep == 2)
- {
- p->level = target_temp_slot_level;
- p->keep = 1;
- }
- else if (keep == 3)
- {
- p->level = var_temp_slot_level;
- p->keep = 0;
- }
- else
- {
- p->level = temp_slot_level;
- p->keep = keep;
- }
+ p->level = temp_slot_level;
+ p->keep = keep;
pp = temp_slots_at_level (p->level);
insert_slot_to_list (p, pp);
avail_temp_slots = 0;
used_temp_slots = 0;
temp_slot_level = 0;
- var_temp_slot_level = 0;
- target_temp_slot_level = 0;
}
\f
/* These routines are responsible for converting virtual register references
if (TREE_CODE (type) == VOID_TYPE)
return 0;
+ /* If the front end has decided that this needs to be passed by
+ reference, do so. */
+ if ((TREE_CODE (exp) == PARM_DECL || TREE_CODE (exp) == RESULT_DECL)
+ && DECL_BY_REFERENCE (exp))
+ return 1;
if (targetm.calls.return_in_memory (type, fntype))
return 1;
/* Types that are TREE_ADDRESSABLE must be constructed in memory,
data->passed_pointer = true;
passed_mode = nominal_mode = Pmode;
}
- /* See if the frontend wants to pass this by invisible reference. */
- else if (passed_type != nominal_type
- && POINTER_TYPE_P (passed_type)
- && TREE_TYPE (passed_type) == nominal_type)
- {
- nominal_type = passed_type;
- data->passed_pointer = 1;
- passed_mode = nominal_mode = Pmode;
- }
/* Find mode as it is passed by the ABI. */
promoted_mode = passed_mode;
rtx addr = DECL_RTL (all.function_result_decl);
rtx x;
- addr = convert_memory_address (Pmode, addr);
- x = gen_rtx_MEM (DECL_MODE (result), addr);
- set_mem_attributes (x, result, 1);
+ if (DECL_BY_REFERENCE (result))
+ x = addr;
+ else
+ {
+ addr = convert_memory_address (Pmode, addr);
+ x = gen_rtx_MEM (DECL_MODE (result), addr);
+ set_mem_attributes (x, result, 1);
+ }
SET_DECL_RTL (result, x);
}
cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL;
- init_stmt_for_function ();
init_eh_for_function ();
lang_hooks.function.init (cfun);
}
if (value_address)
{
- rtx x = gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), value_address);
- set_mem_attributes (x, DECL_RESULT (subr), 1);
+ rtx x = value_address;
+ if (!DECL_BY_REFERENCE (DECL_RESULT (subr)))
+ {
+ x = gen_rtx_MEM (DECL_MODE (DECL_RESULT (subr)), x);
+ set_mem_attributes (x, DECL_RESULT (subr), 1);
+ }
SET_DECL_RTL (DECL_RESULT (subr), x);
}
}
if (current_function_returns_struct
|| current_function_returns_pcc_struct)
{
- rtx value_address
- = XEXP (DECL_RTL (DECL_RESULT (current_function_decl)), 0);
+ rtx value_address = DECL_RTL (DECL_RESULT (current_function_decl));
tree type = TREE_TYPE (DECL_RESULT (current_function_decl));
+ rtx outgoing;
+
+ if (DECL_BY_REFERENCE (DECL_RESULT (current_function_decl)))
+ type = TREE_TYPE (type);
+ else
+ value_address = XEXP (value_address, 0);
+
#ifdef FUNCTION_OUTGOING_VALUE
- rtx outgoing
- = FUNCTION_OUTGOING_VALUE (build_pointer_type (type),
- current_function_decl);
+ outgoing = FUNCTION_OUTGOING_VALUE (build_pointer_type (type),
+ current_function_decl);
#else
- rtx outgoing
- = FUNCTION_VALUE (build_pointer_type (type), current_function_decl);
-#endif
+ outgoing = FUNCTION_VALUE (build_pointer_type (type),
+ current_function_decl);
+#endif
/* Mark this as a function return value so integrate will delete the
assignment and USE below when inlining this function. */