This is the mail archive of the
mailing list for the GCC project.
Re: The nvptx port [7/11+] Inform the port about call arguments
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Jeff Law <law at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 22 Oct 2014 00:06:54 +0200
- Subject: Re: The nvptx port [7/11+] Inform the port about call arguments
- Authentication-results: sourceware.org; auth=none
- References: <54451994 dot 9070209 at codesourcery dot com> <54451C57 dot 5020705 at codesourcery dot com> <5446CC00 dot 9000009 at redhat dot com> <5446D037 dot 8030607 at codesourcery dot com> <5446D5CD dot 6080204 at redhat dot com>
On 10/21/2014 11:53 PM, Jeff Law wrote:
So, in the end I'm torn. I don't like adding new hooks when they're not
needed, but I have some reservations about relying on the order of stuff
in CALL_INSN_FUNCTION_USAGE and I worry a bit that you might end up with
stuff other than arguments on that list -- the PA port could filter on
the hard registers used for passing arguments, so other stuff appearing
isn't a big deal.
This is another worry. Also, at the moment we don't actually add the
pseudos to CALL_INSN_FUNCTION_USAGE (that's patch 6/11), we use the regs
saved by the call_args hook to make proper USEs in a PARALLEL. I'm not
convinced the rest of the compiler would be too happy to see pseudos there.
So, in all I'd say it's probably possible to do it that way, but it
feels a lot iffier than I'd be happy with. I for one didn't know about
the PA requirement, so I could easily have broken it unknowingly if I'd
made some random change modifying call expansion.