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]

Re: Bogus libcalls with multiple REG_RETVAL notes


  In message <Pine.LNX.4.21.0009151359090.32574-100000@mahatma.cygnus.co.uk>you
 write:
  > Currently, gcc will in most cases generate libcalls incorrectly: it creates
  > two insns with a REG_RETVAL note.  One of them is the weird "equal form"
  > generated in calls.c, and the other one the regular one generated by the
  > callers of emit_library_call.
  > 
  > AFAICT the code in emit_library_call_value_1 to create the reg note with
  > the equal form is totally bogus and should be deleted.  That gives us
  > rtl that looks similar to what earlier compilers emitted.
  > 
  > I've found one place where we don't create a libcall sequence after
  > calling emit_library_call, and that's in prepare_float_lib_cmp.  That's
  > a possibility for further optimization.
  > 
  > 
  > Bernd
  > 
  > 	* calls.c (emit_library_call_value_1): Don't create a libcall
  > 	sequence here; our caller will in most cases do it.
Ironic -- I briefly looked at this yesterday for a different port -- the
extra libcall notes just looked weird and they were in an area where we
were somehow getting things wrong.

I removed the libcall block created by emit_library_call_value_1 in the hope
that it would solve my problem, but it didn't and I tabled the change until I
could look at it in more detail.  Thanks for unknowingly taking a TODO off
my list :-)

Approved, please install.

Thanks,
jeff



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