For --run-mode=compile-bril-llvm, when --llvm-output-dir=DIR is provided, save compile-unopt.ll and compile.ll to DIR.
Note that when these options are provided, it runs clang a second time, as I don't think it's possible to dump llvm ir and the binary in the same command. An alternative would be to break up opt and llc from the other stages of clang, but that would lead to more complexity in the common case.
Example:
$ cargo run benchmarks/passing/bril/mem/fib.bril --optimize-egglog=true --optimize-bril-llvm=true --run-mode=compile-bril-llvm --llvm-output-dir=output
$ ls output
compile-unopt.ll compile.ll
For
--run-mode=compile-bril-llvm
, when--llvm-output-dir=DIR
is provided, savecompile-unopt.ll
andcompile.ll
toDIR
.Note that when these options are provided, it runs clang a second time, as I don't think it's possible to dump llvm ir and the binary in the same command. An alternative would be to break up
opt
andllc
from the other stages ofclang
, but that would lead to more complexity in the common case.Example: