summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp
diff options
context:
space:
mode:
authorRoman Tereshin <rtereshin@apple.com>2018-03-22 21:29:07 +0000
committerRoman Tereshin <rtereshin@apple.com>2018-03-22 21:29:07 +0000
commitd96de6f6ae28a8a6652c32f055f50c5e2c59a1aa (patch)
treee9bfb95df8fc22c4cc5f0ce3f956c8fb94e084ce /clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp
parent107d6d684539a034c6ab3a1ae915179c5bbde8ba (diff)
downloadbcm5719-llvm-d96de6f6ae28a8a6652c32f055f50c5e2c59a1aa.tar.gz
bcm5719-llvm-d96de6f6ae28a8a6652c32f055f50c5e2c59a1aa.zip
[MIR] Making MIR Printing, opt -dot-cfg, and -debug printing faster
Value::printAsOperand has been scanning the entire module just to print a single value as an operand, regardless being asked to print a type or not at all, and regardless really needing to scan the module to print a type. It made some of the users of the method exceptionally slow on large IR-modules (or large MIR-files with large IR-modules embedded). This patch defers scanning a module looking for struct types, mostly numbered struct types, as much as possible, speeding up those users w/o changing any APIs at all. See speedup examples below: Release Build: # 83 seconds -> 5.5 seconds time ./bin/llc -start-before=irtranslator -stop-after=irtranslator \ -global-isel -global-isel-abort=2 -simplify-mir sqlite3.O0.ll -o \ sqlite3.O0.ll.regbankselected.mir # 133 seconds -> 6.2 seconds time ./bin/opt sqlite3.O0.ll -dot-cfg -disable-output Release + Asserts Build: # 95 seconds -> 5.5 seconds time ./bin/llc -start-before=irtranslator -stop-after=irtranslator \ -global-isel -global-isel-abort=2 -simplify-mir sqlite3.O0.ll -o \ sqlite3.O0.ll.regbankselected.mir # 146 seconds -> 6.2 seconds time ./bin/opt sqlite3.O0.ll -dot-cfg -disable-output # 1096 seconds -> 553 seconds time ./bin/llc -debug-only=isel -fast-isel=false -stop-after=isel \ sqlite3.O0.ll -o /dev/null 2> err where sqlite3.O0.ll is non-optimized IR produced from sqlite-amalgamation (http://sqlite.org/download.html), which is entire SQLite3 implementation in a single C-file. Benchmarked on 4-cores / 8 threads PCI-E SSD iMac running macOS Reviewers: dexonsmith, bkramer, void, chandlerc, aditya_nandakumar, dsanders, qcolombet, Reviewed By: bogner Subscribers: thegameg, llvm-commits Differential Revision: https://reviews.llvm.org/D44132 llvm-svn: 328246
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud