defaults.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): New macro.
* defaults.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): New macro. * tm.texi (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): Document it. * toplev.c (main): If the target does not allow profiling without a frame pointer, issue an error message. * config/i386/linux.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): Define it to false. From-SVN: r42312
This commit is contained in:
parent
e86f9f3267
commit
4da5f005d4
5 changed files with 62 additions and 0 deletions
|
@ -1,3 +1,14 @@
|
|||
2001-05-19 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* defaults.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER): New
|
||||
macro.
|
||||
* tm.texi (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER):
|
||||
Document it.
|
||||
* toplev.c (main): If the target does not allow profiling without
|
||||
a frame pointer, issue an error message.
|
||||
* config/i386/linux.h (TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER):
|
||||
Define it to false.
|
||||
|
||||
Sat May 19 07:53:42 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* recog.c (general_operand): Modify last change to allow it if reload
|
||||
|
@ -102,6 +113,16 @@ Fri May 18 15:39:16 CEST 2001 Jan Hubicka <jh@suse.cz>
|
|||
|
||||
2001-05-18 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* basic-block.h (struct basic_block_def): Add documentation about
|
||||
what a basic block is, and what the various fields are used for.
|
||||
* flow.c (calculate_globlal_regs_live): Add documentation about
|
||||
how the algorithm works, and how we know that it will terminate.
|
||||
Check that the the inductive assumption that guarantees
|
||||
termination actually holds.
|
||||
(mark_used_regs): Treat conditionally set registers as used.
|
||||
(debug_regset): Add comment.
|
||||
* rtl.texi (cond_exec): Add documentation.
|
||||
|
||||
* function.c (expand_function_start): Avoid creating BLKmode
|
||||
pseudos.
|
||||
|
||||
|
|
|
@ -73,6 +73,15 @@ Boston, MA 02111-1307, USA. */
|
|||
fprintf (FILE, "\tcall\tmcount\n"); \
|
||||
}
|
||||
|
||||
/* True if it is possible to profile code that does not have a frame
|
||||
pointer.
|
||||
|
||||
The GLIBC version of mcount for the x86 assumes that there is a
|
||||
frame, so we cannot allow profiling without a frame pointer. */
|
||||
|
||||
#undef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
|
||||
#define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER false
|
||||
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "unsigned int"
|
||||
|
||||
|
|
|
@ -336,5 +336,12 @@ do { \
|
|||
? ptrmemfunc_vbit_in_pfn : ptrmemfunc_vbit_in_delta)
|
||||
#endif
|
||||
|
||||
/* True if it is possible to profile code that does not have a frame
|
||||
pointer. */
|
||||
|
||||
#ifndef TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
|
||||
#define TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER true
|
||||
#endif
|
||||
|
||||
#endif /* GCC_DEFAULTS_H */
|
||||
|
||||
|
|
15
gcc/tm.texi
15
gcc/tm.texi
|
@ -3992,6 +3992,21 @@ Registers or condition codes clobbered by @code{FUNCTION_PROLOGUE} or
|
|||
@item BLOCK_PROFILER_CODE
|
||||
A C function or functions which are needed in the library to
|
||||
support block profiling.
|
||||
|
||||
@findex TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
|
||||
@item TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
|
||||
On some targets, it is impossible to use profiling when the frame
|
||||
pointer has been omitted. For example, on x86 GNU/Linux systems,
|
||||
the @code{mcount} routine provided by the GNU C Library finds the
|
||||
address of the routine that called the routine that called @code{mcount}
|
||||
by looking in the immediate caller's stack frame. If the immediate
|
||||
caller has no frame pointer, this lookup will fail.
|
||||
|
||||
By default, GCC assumes that the target does allow profiling when the
|
||||
frame pointer is omitted. This macro should be defined to a C
|
||||
expression that evaluates to @code{false} if the target does not allow
|
||||
profiling when the frame pointer is omitted.
|
||||
|
||||
@end table
|
||||
|
||||
@node Inlining
|
||||
|
|
10
gcc/toplev.c
10
gcc/toplev.c
|
@ -4932,6 +4932,16 @@ toplev_main (argc, argv)
|
|||
warning ("this target machine does not have delayed branches");
|
||||
#endif
|
||||
|
||||
/* Some operating systems do not allow profiling without a frame
|
||||
pointer. */
|
||||
if (!TARGET_ALLOWS_PROFILING_WITHOUT_FRAME_POINTER
|
||||
&& profile_flag
|
||||
&& flag_omit_frame_pointer)
|
||||
{
|
||||
error ("profiling does not work without a frame pointer");
|
||||
flag_omit_frame_pointer = 0;
|
||||
}
|
||||
|
||||
user_label_prefix = USER_LABEL_PREFIX;
|
||||
if (flag_leading_underscore != -1)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue