Hi,
I used the following commands on the program attached below:
llvm-gcc --emit-llvm main.c -c -o main.bc
opt -ipconstprop main.bc -o main1.bc
diff main.bc main1.bc
no difference was o/p
The Program Segment is as shown below:
#include <stdio.h>
void f1(int a)
{
a=a+1;
printf("%d",a);
}
void f2()
{
int b;
b=1;
f1(b);
}
int main()
{
int a=1;
f2();
f1(a);
}
Also,when i use the following command:
opt -print-after-all main.bc
The dumps generated dont include IPCP or Intraprocedural Const Propagation
dumps.Why so?
Is there any other way to see the effect of a pass on the i/p bitcode file?
Kindly let me know where i am going wrong.
Netra,