summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2015-10-10 05:37:02 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2015-10-10 05:37:02 +0000
commit2cd66e9270d922a96f99e249dc4bf9bf8ba32178 (patch)
tree7d2198190fd074731414ea4bd2d8ab9a2d02469a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent7143d8001a59cf9c4c4747c951dabc8ab59fa137 (diff)
[RuntimeDyld] Fix performance problem in resolveRelocations with many sections
Summary: Rather than just iterating over all sections and checking whether we have relocations for them, iterate over the relocation map instead. This showed up heavily in an artificial julia benchmark that does lots of compilation. On that particular benchmark, this patch gives ~15% performance improvements. As far as I can tell the primary reason why the original loop was so expensive is that Relocations[i] actually constructs a relocationList (allocating memory & doing lots of other unnecessary computing) if none is found. Reviewers: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13545 llvm-svn: 249942
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions