OSDN Git Service

[asan] Speed up isInterestingAlloca check
authorAnna Zaks <ganna@apple.com>
Fri, 27 Mar 2015 18:52:01 +0000 (18:52 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 27 Mar 2015 18:52:01 +0000 (18:52 +0000)
commit8ea048fa832418f07dd97380de78526efa10b2cc
tree4e2530d93d0881721953939fc0a945fc7986b5fe
parent4193093152f5fd86479ee2313982bfbb6239fda2
[asan] Speed up isInterestingAlloca check

We make many redundant calls to isInterestingAlloca in the AddressSanitzier
pass. This is especially inefficient for allocas that have many uses. Let's
cache the results to speed up compilation.

The compile time improvements depend on the input. I did not see much
difference on benchmarks; however, I have a test case where compile time
goes from minutes to under a second.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233397 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp