If you use -stop-after or similar options, llc will normally print MIR.
This patch checks for -filetype=null as a special case to disable MIR
printing. As the comment says, "The Null output is intended for use for
performance analysis ...", and I found this useful for timing a subset
of the passes that llc runs without the significant overhead of printing
MIR just to send it to /dev/null.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/LLVMTargetMachine.cpp | ||
---|---|---|
203 |
More than 50% in MIR printing in cases like this: $ ~/llvm-release/bin/llc -march=aarch64 sqlite3.bc -filetype=null -stop-after=finalize-isel -time-passes > /dev/null ===-------------------------------------------------------------------------=== ... Pass execution timing report ... ===-------------------------------------------------------------------------=== Total Execution Time: 4.7993 seconds (4.8033 wall clock) ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 2.5278 ( 54.2%) 0.0577 ( 42.8%) 2.5856 ( 53.9%) 2.5887 ( 53.9%) MIR Printing Pass 1.3541 ( 29.0%) 0.0530 ( 39.3%) 1.4071 ( 29.3%) 1.4081 ( 29.3%) AArch64 Instruction Selection 0.1636 ( 3.5%) 0.0024 ( 1.8%) 0.1660 ( 3.5%) 0.1661 ( 3.5%) CodeGen Prepare ... |
Just say createPrintMIRPass is redundant for null output?
How much overhead have you measured?