[LLVMdev] [Fwd: Re: [Fwd: Regarding Inter Procedural Constant Propagation]]
Duncan Sands
baldrick at free.fr
Mon Apr 25 01:55:23 PDT 2011
Hi Netra,
> 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
almost all LLVM optimization passes work poorly if you haven't run the
mem2reg pass first, so try at least
opt -mem2reg -ipconstprop main.bc -o main1.bc
> 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?
Because you didn't tell opt to run that pass.
Ciao, Duncan.
More information about the llvm-dev
mailing list