mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-28 17:53:58 +00:00
Update cheatsheets
This commit is contained in:
21
opt
Normal file
21
opt
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# opt
|
||||
|
||||
> Runs optimizations and analyse LLVM source files.
|
||||
> More information: <https://llvm.org/docs/CommandGuide/opt.html>.
|
||||
|
||||
- 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}}`
|
||||
Reference in New Issue
Block a user