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.
Bernd