This is an archive of the discontinued LLVM Phabricator instance.

[asan] Speed up compilation of large C++ stringmaps (tons of allocas) with ASan
ClosedPublic

Authored by kubamracek on Nov 7 2016, 5:25 PM.

Details

Summary

This addresses PR30746 https://llvm.org/bugs/show_bug.cgi?id=30746. The ASan pass iterates over entry-block instructions and checks each alloca whether it's in NonInstrumentedStaticAllocaVec, which is apparently slow. This patch gathers the instructions to move during visitAllocaInst.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 77124.Nov 7 2016, 5:25 PM
kubamracek retitled this revision from to [asan] Speed up compilation of large C++ stringmaps (tons of allocas) with ASan.
kubamracek updated this object.
kubamracek added reviewers: kcc, dvyukov, eugenis, zaks.anna.
kubamracek set the repository for this revision to rL LLVM.
kubamracek added a project: Restricted Project.
kubamracek added a subscriber: llvm-commits.
aprantl added a subscriber: aprantl.Nov 8 2016, 8:31 AM
aprantl added inline comments.
lib/Transforms/Instrumentation/AddressSanitizer.cpp
772 ↗(On Diff #77124)

Nit: clang-format would put the return on the next line.

eugenis accepted this revision.Nov 8 2016, 1:29 PM
eugenis edited edge metadata.

LGTM w/ nit

lib/Transforms/Instrumentation/AddressSanitizer.cpp
641 ↗(On Diff #77124)

This can be just SmallVector.

This revision is now accepted and ready to land.Nov 8 2016, 1:29 PM
This revision was automatically updated to reflect the committed changes.