This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Can register rename pass rename a callee-saved register?
- From: Ian Lance Taylor <iant at google dot com>
- To: "Mohamed Shafi" <shafitvm at gmail dot com>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Thu, 19 Jun 2008 06:05:24 -0700
- Subject: Re: Can register rename pass rename a callee-saved register?
- References: <ba0bd44d0806190216j3bb01651x1023d20069b1bb9b@mail.gmail.com>
"Mohamed Shafi" <shafitvm@gmail.com> writes:
> Before register renaming pass, callee registers was being used in the
> body of the code. Hence function prologue saved the register and
> epilogue restored the register. But register renaming pass removed
> this particular callee saved register.The output and code generation
> is proper, but there is an unnecessary save and restore of a callee
> saved register in the prologue and epilogue even though the reference
> of the callee saved register has been removed by the renaming pass.
> I am using the prologue/epilogue patterns instead of the target macros.
Which version of gcc? I was under the impression that this
longstanding buglet was cleaned up by the dataflow work.
> So is the rename pass allowed to rename a callee saved register? Where
> might this going wrong?
If this is the buglet I'm thinking of, the resulting code does work,
despite being suboptimal. It just does an unnecessary save and
restore.
Ian