I am trying to understand how the IR representation exactly works and its structure. More specifically, would like to know if it is possible to access the values of the arguments passed to a function through the IR.
Say for instance we consider the function:
foo(x) = cos(sin(cos(x)))
I make the following assignment:
adj = Zygote.@code_adjoint foo(2.0)
I print the IR of the primal:
println(adj.primal)
Where are the values corresponding to the arguments? For instance, where would the value 2.0
be stored in the IR given the above example? How and when is this mapping %2 --> 2.0
done by the compiler?