This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rtl]: Fix PR rtl-optimization/32450: Call to mcount clobbers registers
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 6 Jul 2007 10:10:57 +0200
- Subject: Re: [PATCH, rtl]: Fix PR rtl-optimization/32450: Call to mcount clobbers registers
- References: <468D2590.80209@gmail.com>
> Attached patch fixes this issue with a Big Hammer Approach. When
> profiling is on, "blockage" insn nails instructions down to where they
> should be, preventing them to escape past NOTE_INSN_PROLOGUE_END.
I guess that the alternative would be to also emit the call to the profiling
routine in the RTL stream. Probably not worth the pain.
> 2007-07-05 Uros Bizjak <ubizjak@gmail.com>
>
> PR rtl_optimization/32450
> * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn
> to ensure that instructions are not moved into the prologue when
> profiling is on. Remove unused prologue_end variable.
> (expand_function_end): Emit blockage insn instead of ASM_INPUT rtx
> as a scheduling barrier.
OK everywhere if you expand a bit on the problem in the comment, e.g.
/* Ensure that instructions are not moved into the prologue when
profiling is on, lest the profiling routine is emitted within
the live range of a call-clobbered register. */
> 2007-07-05 Uros Bizjak <ubizjak@gmail.com>
>
> PR rtl_optimization/32450
> * gcc.dg/pr32450.c: New runtime test.
-march=core2 is problematic, -mtune=core2 instead if it is accepted (not on
the 4.1 branch) and the testcase still fails.
--
Eric Botcazou