Without this patch, opt is never called for llvm-assembly (.ll) files when "-opt" is passed to llvmc: $ llvmc -clang -v test.ll llc -f -O2 test.ll -o /tmp/llvm_gvO2nK/test.s as /tmp/llvm_gvO2nK/test.s -o /tmp/llvm_gvO2nK/test.o llvm-ld -native -disable-internalize /tmp/llvm_gvO2nK/test.o -o a.out $ llvmc -clang -opt -v test.ll llc -f -O2 test.ll -o /tmp/llvm_2xiL86/test.s as /tmp/llvm_2xiL86/test.s -o /tmp/llvm_2xiL86/test.o llvm-ld -native -disable-internalize /tmp/llvm_2xiL86/test.o -o a.out This patch makes a small change to tools/llvmc/src/Base.td so that "-opt" is honored for .ll files. Invoking llvmc with this patch results in: $ llvmc -clang -v test.ll llc -O2 test.ll -o /tmp/llvm_nbnJRg/test.s as /tmp/llvm_nbnJRg/test.s -o /tmp/llvm_nbnJRg/test.o llvm-ld -native -disable-internalize /tmp/llvm_nbnJRg/test.o -o a.out $ llvmc -clang -opt -v test.ll llvm-as test.ll -o /tmp/llvm_OoIRlO/test.bc opt -f -O2 /tmp/llvm_OoIRlO/test.bc -o /tmp/llvm_OoIRlO/test.bc-GHASUE llc -O2 /tmp/llvm_OoIRlO/test.bc-GHASUE -o /tmp/llvm_OoIRlO/test.s as /tmp/llvm_OoIRlO/test.s -o /tmp/llvm_OoIRlO/test.o llvm-ld -native -disable-internalize /tmp/llvm_OoIRlO/test.o -o a.out -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-opt-ll.diff Type: text/x-patch Size: 647 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110214/888ca705/attachment.bin>
Without this patch, opt is never called for llvm-assembly (.ll) files when "-opt" is passed to llvmc: $ llvmc -clang -v test.ll llc -f -O2 test.ll -o /tmp/llvm_gvO2nK/test.s as /tmp/llvm_gvO2nK/test.s -o /tmp/llvm_gvO2nK/test.o llvm-ld -native -disable-internalize /tmp/llvm_gvO2nK/test.o -o a.out $ llvmc -clang -opt -v test.ll llc -f -O2 test.ll -o /tmp/llvm_2xiL86/test.s as /tmp/llvm_2xiL86/test.s -o /tmp/llvm_2xiL86/test.o llvm-ld -native -disable-internalize /tmp/llvm_2xiL86/test.o -o a.out This patch makes a small change to tools/llvmc/src/Base.td so that "-opt" is honored for .ll files. Invoking llvmc with this patch results in: $ llvmc -clang -v test.ll llc -O2 test.ll -o /tmp/llvm_nbnJRg/test.s as /tmp/llvm_nbnJRg/test.s -o /tmp/llvm_nbnJRg/test.o llvm-ld -native -disable-internalize /tmp/llvm_nbnJRg/test.o -o a.out $ llvmc -clang -opt -v test.ll llvm-as test.ll -o /tmp/llvm_OoIRlO/test.bc opt -f -O2 /tmp/llvm_OoIRlO/test.bc -o /tmp/llvm_OoIRlO/test.bc-GHASUE llc -O2 /tmp/llvm_OoIRlO/test.bc-GHASUE -o /tmp/llvm_OoIRlO/test.s as /tmp/llvm_OoIRlO/test.s -o /tmp/llvm_OoIRlO/test.o llvm-ld -native -disable-internalize /tmp/llvm_OoIRlO/test.o -o a.out Cheers, Kaelyn -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-opt-ll.diff Type: text/x-patch Size: 647 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110215/0680220b/attachment.bin>
Mikhail Glushenkov
2011-Feb-19 00:37 UTC
[LLVMdev] Make "llvmc -opt" call "opt" for .ll files
Hi, Kaelyn Uhrain <kaelyn.alexi <at> gmail.com> writes:> > Without this patch, opt is never called for llvm-assembly (.ll) files > when "-opt" is passed to llvmc: > > [...]Thanks, applied in r126000!
Apparently Analagous Threads
- [LLVMdev] Make "llvmc -opt" call "opt" for .ll files
- [LLVMdev] [cfe-dev] RFC: Codifying (but not formalizing) the optimization levels in LLVM and Clang
- [LLVMdev] [cfe-dev] RFC: Codifying (but not formalizing) the optimization levels in LLVM and Clang
- Fwd: buildbot failure in LLVM on sanitizer-x86_64-linux-bootstrap
- [LLVMdev] git web interface