Eli Friedman | 3 Jul 00:15
Picon

Re: Get identifier for unnamed temporary

On Thu, Jul 2, 2009 at 3:00 PM, Scott Ricketts<sricketts <at> maxentric.com> wrote:
> If I have
>
> %3 = add i32 %1, %2
>
> then I would like to insert a function call that will somehow log that
> %3 requires %1 and %2 to be computed at this step. So my original plan
> was to have my pass create a mapping of identifiers to numerical
> constants, and then to pass the appropriate constants to the
> instrumenting function at runtime.
>
> Is there a better approach?

Just ignore the identifiers, and construct your own instruction
numbering by iterating over the function.

-Eli

Gmane