This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pro_and_epilogue pass ran several time for same function?
- From: Ian Lance Taylor <iant at google dot com>
- To: "Paulo J. Matos" <pocmatos at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 08 Jan 2010 07:34:52 -0800
- Subject: Re: pro_and_epilogue pass ran several time for same function?
- References: <11b141711001080705n5570440evae1459d5cd812ff9@mail.gmail.com>
"Paulo J. Matos" <pocmatos@gmail.com> writes:
> I just noticed that the pro_and_epilogue pass in gcc3.4.3 for certain
> functions is ran multiple times with sibcalls enabled. Why is that?
>
> What I did was to put a printf on the epilogue and sibcall_epilogue
> pattern so that during compilation it prints the name of the function
> currently generating the epilogue for, however, I get a print in
> epilogue and a print in sibcall_epilogue for the same function a
> couple of times. Why?
One obvious possibility is function cloning, but I can't remember
whether gcc 3.4.3 did that. Take a look at the dump file and see
whether the function appears more than once. If that doesn't help,
run cc1 under a debugger and do a backtrace to find out where the
calls are coming from.
Ian