|
From: Scott P. <pa...@la...> - 2010-09-14 23:14:23
|
For a tool I'm writing, I'm finding that my instrumentation code needs
to pass a ton of arguments to some of my execution-time functions.
For example, given the statement
PUTI(64:8xF64)[t5,0] = t1
the target function needs access to base (64), nElems (8), elemTy
(F64), ix (t5), ix's run-time value ([dynamic]), bias (0), data (t1),
and data's run-time value ([dynamic]). The problem is that the number
of arguments is limited on certain platforms (6 on amd64, for
example). I suppose I can work around that limitation by passing half
the arguments to each of two helper functions, which can aggregate the
arguments then call my real function, but I'm wondering if there's a
cleaner way to pass bulk information from instrumentation code to
execution code.
It'd be great if my instrumentation code could pass a complete IRStmt
to an execution-time function and let that function extract both the
static arguments and dynamic values. However, I suspect that that's
not possible, right?
Any suggestions for an efficient way to pass all parts of an IRStmt
and all the associated execution-time values to an execution-time
function?
Thanks,
-- Scott
|