[LLVMdev] [Fwd: Re: [Fwd: Regarding Inter Procedural Constant Propagation]]

netra at cse.iitb.ac.in netra at cse.iitb.ac.in
Fri Apr 15 20:15:21 PDT 2011

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)

 void f2()
        int b;

int main()
	int a=1;

 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.


>> ---------------------------- Original Message ----------------------------
>> Subject: Regarding Inter Procedural Constant Propagation
>> From:    netra at cse.iitb.ac.in<mailto:netra at cse.iitb.ac.in>
>> Date:    Wed, April 13, 2011 1:29 am
>> To:      llvmdev at cs.illinois.edu<mailto:llvmdev at cs.illinois.edu>
>> --------------------------------------------------------------------------
>> Hi,
>> I want to see the output of a InterProcedural Constant Propagation Pass
>> IPCP in llvm.
>> I have llvm 2.8 installed.And i used opt -print-after-all command to see
>> the .bc output generated after each pass.
>> However,this does not include dump produced by IPCP  :( why?
>> Kindly tell me how to view dump produced by IPCP.
>> P.S: i have tried opt -ipcp src.bc -o src1.bc
>> However the src.bc and src1.bc both files r identical. :(
>> Kindly help me regarding this.
>> Regards,
>> Netra


More information about the llvm-dev mailing list