[LLVMdev] Get identifier for unnamed temporary
eli.friedman at gmail.com
Thu Jul 2 15:15:37 PDT 2009
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.
More information about the llvm-dev