i386.c (override_options): Set defaults for flag_omit_frame_pointer...

* i386.c (override_options): Set defaults for flag_omit_frame_pointer,
	flag_asynchronous_unwind_tables, flag_pcc_struct_return.
	* i386.c (optimization_options): Set flag_omit_frame_pointer,
	flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2.
	Do not clear -momit-leaf-frame-pointer when profiling.
	(ix86_frame_pointer_required): Frame pointer is allways required when
	profiling.

From-SVN: r58681
This commit is contained in:
Jan Hubicka 2002-10-31 18:16:52 +01:00 committed by Jan Hubicka
parent 14b4829dfd
commit 55ba61f31a
2 changed files with 44 additions and 13 deletions

View File

@ -1,3 +1,13 @@
Thu Oct 31 18:08:00 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.c (override_options): Set defaults for flag_omit_frame_pointer,
flag_asynchronous_unwind_tables, flag_pcc_struct_return.
* i386.c (optimization_options): Set flag_omit_frame_pointer,
flag_asynchronous_unwind_tables, flag_pcc_struct_return to 2.
Do not clear -momit-leaf-frame-pointer when profiling.
(ix86_frame_pointer_required): Frame pointer is allways required when
profiling.
Thu Oct 31 16:09:44 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.md (negdf2_ifs_rex64): Don't allow GPR operand.

View File

@ -1000,6 +1000,27 @@ override_options ()
real_format_for_mode[XFmode - QFmode] = &ieee_extended_intel_96_format;
real_format_for_mode[TFmode - QFmode] = &ieee_extended_intel_128_format;
/* Set the default values for switches whose defualt depends on TARGET_64BIT
in case they wasn't overwriten by command line options. */
if (TARGET_64BIT)
{
if (flag_omit_frame_pointer == 2)
flag_omit_frame_pointer = 1;
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = 1;
if (flag_pcc_struct_return == 2)
flag_pcc_struct_return = 0;
}
else
{
if (flag_omit_frame_pointer == 2)
flag_omit_frame_pointer = 0;
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = 0;
if (flag_pcc_struct_return == 2)
flag_pcc_struct_return = 1;
}
#ifdef SUBTARGET_OVERRIDE_OPTIONS
SUBTARGET_OVERRIDE_OPTIONS;
#endif
@ -1212,9 +1233,6 @@ override_options ()
ix86_tls_dialect_string);
}
if (profile_flag)
target_flags &= ~MASK_OMIT_LEAF_FRAME_POINTER;
/* Keep nonleaf frame pointers. */
if (TARGET_OMIT_LEAF_FRAME_POINTER)
flag_omit_frame_pointer = 1;
@ -1319,15 +1337,15 @@ optimization_options (level, size)
if (level > 1)
flag_schedule_insns = 0;
#endif
if (TARGET_64BIT && optimize >= 1)
flag_omit_frame_pointer = 1;
if (TARGET_64BIT)
{
flag_pcc_struct_return = 0;
flag_asynchronous_unwind_tables = 1;
}
if (profile_flag)
flag_omit_frame_pointer = 0;
/* The default values of these switches depend on the TARGET_64BIT
that is not known at this moment. Mark these values with 2 and
let user the to override these. In case there is no command line option
specifying them, we will set the defaults in override_options. */
if (optimize >= 1)
flag_omit_frame_pointer = 2;
flag_pcc_struct_return = 2;
flag_asynchronous_unwind_tables = 2;
}
/* Table of valid machine attributes. */
@ -4045,7 +4063,10 @@ ix86_frame_pointer_required ()
the frame pointer by default. Turn it back on now if we've not
got a leaf function. */
if (TARGET_OMIT_LEAF_FRAME_POINTER
&& (!current_function_is_leaf || current_function_profile))
&& (!current_function_is_leaf))
return 1;
if (current_function_profile)
return 1;
return 0;