1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 08:35:23 +02:00

opt: add page (#2527)

This commit is contained in:
Guilherme Leobas 2018-11-01 13:25:03 +01:00 committed by Starbeamrainbowlabs
parent 17a5bb1ed0
commit 244adaf400

15
pages/common/opt.md Normal file
View file

@ -0,0 +1,15 @@
# opt
> A tool that takes LLVM source files and runs specified optimizations and/or analyses on them.
- Run an optimization or analysis on a bitcode file:
`opt -{{passname}} {{path/to/file.bc}} -S -o {{file_opt.bc}}`
- Output the Control Flow Graph of a function to a "dot" file:
`opt {{-dot-cfg}} -S {{path/to/file.bc}} -disable-output`
- Optimize the program at level 2 and output the result to another file:
`opt -O2 {{path/to/file.bc}} -S -o {{path/to/output_file.bc}}`