[LLVMdev] Reproducing clang -O3 with opt

Hal Finkel hfinkel at anl.gov
Wed Dec 3 00:42:32 PST 2014


----- Original Message -----
> From: "Adam Nemet" <anemet at apple.com>
> To: "LLVM Dev" <llvmdev at cs.uiuc.edu>
> Sent: Wednesday, December 3, 2014 2:19:04 AM
> Subject: [LLVMdev] Reproducing clang -O3 with opt
> 
> This is probably a trivial question but the way I used to do this
> turns out to be flawed.
> 
> I used run clang with -O0 -emit-llvm and then use the resulting IR
> with opt -O3.  The problem is that clang at -O0 does not generate
> TBAA metadata so the passes run by opt behave differently.
> 
> What’s the recommended way of doing this?

Run clang -O3 -mllvm -disable-llvm-optzns -emit-llvm

 -Hal

> 
> Thanks,
> Adam
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-dev mailing list