summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-12-15 04:02:23 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-12-15 04:02:23 +0000
commit6ee0b4e9f543fa108b47d3ae7c030d835cacd2c1 (patch)
tree45e66229fd6f923e2dcbfb0cd0f6f2e89cc82f6b /llvm/lib/CodeGen/ScheduleDAG.cpp
parentab5f355d8cce89635936b3f7e6ab28f5ef729436 (diff)
downloadbcm5719-llvm-6ee0b4e9f543fa108b47d3ae7c030d835cacd2c1.tar.gz
bcm5719-llvm-6ee0b4e9f543fa108b47d3ae7c030d835cacd2c1.zip
COFF: Open and map input files asynchronously on Windows.
Profiling revealed that the majority of lld's execution time on Windows was spent opening and mapping input files. We can reduce this cost significantly by performing these operations asynchronously. This change introduces a queue for all operations on input file data. When we discover that we need to load a file (for example, when we find a lazy archive for an undefined symbol, or when we read a linker directive to load a file from disk), the file operation is launched using a future and the symbol resolution operation is enqueued. This implies another change to symbol resolution semantics, but it seems to be harmless ("ninja All" in Chromium still succeeds). To measure the perf impact of this change I linked Chromium's chrome_child.dll with both thin and fat archives. Thin archives: Before (median of 5 runs): 19.50s After: 10.93s Fat archives: Before: 12.00s After: 9.90s On Linux I found that doing this asynchronously had a negative effect on performance, probably because the cost of mapping a file is small enough that it becomes outweighed by the cost of managing the futures. So on non-Windows platforms I use the deferred execution strategy. Differential Revision: https://reviews.llvm.org/D27768 llvm-svn: 289760
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAG.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud