On Thu, Jan 7, 2010 at 5:29 PM, Dave Korn <dave.korn.cyg...@googlemail.com> wrote: > Paulo J. Matos wrote: > >> The problem with this is that I only want to sibcall when it happens >> to reduce my code size. >> >> I noticed (in the internals manual) we cannot actually fallback to a >> normal call once we decide to sibcall through FUNCTION_OK_FOR_SIBCALL, >> however, FUNCTION_OK_FOR_SIBCALL is called during expansion which >> doesn't provide me with as much information as I need to choose >> between sibcalling or not. The best timing would be when the epilogue >> is generated, but this doesn't seem possible. >> >> One example of the kind of information is if some registers are ever >> live. This changes in some cases between the expand pass and the >> pro_and_epilogue pass. As well as the framesize. > > Yep, this takes place during reload which iterates stack frame layout, > reload and spill generation and register elimination until it converges on a > stable solution. > >> All of this >> information is important to have as a precise instrument to decide if >> sibcall should actually be done. >> >> Any suggestion on how to achieve this? >
Thanks for the tip. I had thought about heuristic already but I was trying to avoid such a 'non-precise' solution but I guess that's the way I will go If there's no other path. -- Paulo Jorge Matos - pocmatos at gmail.com http://www.pmatos.net