This is the mail archive of the
mailing list for the GCC project.
Can register rename pass rename a callee-saved register?
- From: "Mohamed Shafi" <shafitvm at gmail dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Thu, 19 Jun 2008 14:46:44 +0530
- Subject: Can register rename pass rename a callee-saved register?
I am involved in gcc port in which i found the following problem.
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.
So is the rename pass allowed to rename a callee saved register? Where
might this going wrong?
Thanks for you help.