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]

call_insn's and argument locations



Is there any good way to find out where the arguments to a call_insn are?
Part of my work involves working on an SSA pass (to be run after the DCE
pass) that inspects call_insn instructions.  The only problem is that I'm
not sure how to find out where the arguments are.  Should I effectively do
what expand_call does to get the register and stack slot numbers from the
back end?  Is there an easier way?  (for example, are the N SET insn's
before the call_insn required to be arguments [at the SSA phase]?)

On another topic, is there any particular reason why expand_call doesn't
cache the locations of the function call arguments in the tree type that
represents the function?  Every time a function is called, GCC has to go
through the trouble of finding registers & stack slots to put arguments
in... shouldn't this be invariant across different calls to the same
function/same prototype?

If so, couldn't this be cached in the tree expression?  It seems like
this could save a significant amount of time (although it certainly be
smart to profile it before making crazy assertions about it. :)

Thanks for the help,

-Chris


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