opt
A tool that takes LLVM source files and runs specified optimizations and/or analyses on them. More information: <https://llvm.org/docs/CommandGuide/opt.html>.
Install
- All systems
-
curl cmd.cat/opt.sh
- Debian
-
apt-get install llvm-3.0 - Ubuntu
-
apt-get install llvm-8 -
Alpine
-
apk add llvm - Arch Linux
-
pacman -S llvm6 - Kali Linux
-
apt-get install llvm-7 - CentOS
-
yum install llvm - Fedora
-
dnf install llvm3.7 - Windows (WSL2)
-
sudo apt-get updatesudo apt-get install llvm-8 - OS X
-
brew install llvm - Raspbian
-
apt-get install llvm-3.2 - Docker
-
docker run cmd.cat/opt optpowered by Commando
A tool that takes LLVM source files and runs specified optimizations and/or analyses on them. 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
© tl;dr; authors and contributors