This is the mail archive of the gcc-patches@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: Fix problem with late insns in sibcall


    Personally, I think it would make the most sense for this to
    be exposed to the compiler earlier.  I.e. the Ada front end
    should generate

	Shift(Point.X);
  ==>
	tmp = Shift(Point.X);
	Point.X = tmp;

I don't follow.  What it generates is

	Point.X = Shift (Point.X);

That could also occur in C code just as above.  If a temporary is needed
for some reason, why shouldn't the middle-end make it?

    In this way, the store into Point.X won't be hidden inside the
    CALL_PLACEHOLDER, and optimize_sibling_and_tail_recursive_calls will
    notice that the call is not the last thing performed by the function.

You lost me here.  Why can't the above C code occur?


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