This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Work in progress: "Super Sib Calls"; opinions sought


 In message <3D7D5B94.63674DC3@anu.edu.au>, Jason Ozolins writes:
 >Simon Marlow wrote:

 >Doing the dependency analysis would be great, but it strikes me that if
 >it were easy, someone would probably already have done it.  :-) 
I believe a number of compilers have done this -- mostly to minimize
argument register copying for functions which shuffle their incoming
arguments and pass them down to another function.  

 >perfect, what's wrong with an effort to make tail-calls work with
 >overlapping arguments in a way that is easier to verify correctness,
 >leaving open the option to do the dependency analysis as an optimization
 >later on?
Because it's the dependency analysis that you use to actually verify
correctness.  That's really the best way to solve the correctness problem.
Once you have the dependency analysis to solve the correctness problem,
optimizing away the unwanted copies is relatively easy.

I strongly suspect if you sit down and try to write code to get the
overlapping argument problem correct that you'll find that dependency
analysis is the natural answer.


jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]