<div dir="ltr">Hi Everyone,<br><br>I asked a question on the dev list related to the topic to which John Criswell and Jeremy Lakeman kindly provided some valuable insight.<br><br>I'm still stuck on the issue and i'm hoping i didn't phrase the question well enough.<br><br>I have a <b>foo.c</b> file that is :<div><b><br></b></div><div><div><b>#include <stdio.h></b></div><div><b>int foo(int a, int b){</b></div><div><b>  </b></div><div><b>  return a+b;</b></div><div><b>}</b></div><div><b><br></b></div><div><b>int main() {</b></div><div><b>int x=foo(3,1);  </b></div><div><b>printf("%d\n",x);</b></div><div><b>return 0;</b></div><div><b>}</b></div></div><div><b><br></b></div><div>Now, i obtain the foo.bc/foo.ll file,<br>the code i'm interested in looks like:<br><br><div><b>; Function Attrs: norecurse nounwind readnone uwtable</b></div><div><b>define i32 @addd(i32 %a, i32 %b) #0 {</b></div><div><b>entry:</b></div><div><b>  %add = add nsw i32 %b, %a</b></div><div><b>  ret i32 %add</b></div><div><b>}</b></div></div><div><b><br></b></div><div>running the file with <b>lli</b> <b>foo.ll outputs </b></div><div><b><br></b></div><div><b>4</b></div><div><b><br></b></div><div>Now we know that the values of %a and %b are 3 and 1 respectively, is there any way i can retrieve these values by running foo.bc through a pass??<br><br>I know i->getOperand(0) would get me <b>i32 %a </b> </div><div>i->getOperand(1) would get me <b>i32 %b</b></div><div><b><br></b></div><div><b>How do i retrieve 3 and 1, the integer values that these operands hold ?</b></div><div><b><br></b></div><div>Thanks in advance for any guidance and help! :)<br><br>Best Regards,<br>Ammar Naqvi</div></div>