[CaptureTracker] Provide an ordered basic block to PointerMayBeCapturedBefore
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 31 Jul 2015 14:31:35 +0000 (14:31 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 31 Jul 2015 14:31:35 +0000 (14:31 +0000)
commit8fea35acadea2e55824682a78bef54639e5ecfce
treec9710c2cae1bf99f8e6adb7afc659b03f7985d51
parent289b5e7f39c04256777ade0a896225349958de7d
[CaptureTracker] Provide an ordered basic block to PointerMayBeCapturedBefore

This patch is a follow up from r240560 and is a step further into
mitigating the compile time performance issues in CaptureTracker.

By providing the CaptureTracker with a "cached ordered basic block"
instead of computing it every time, MemDepAnalysis can use this cache
throughout its calls to AA->callCapturesBefore, avoiding to recompute it
for every scanned instruction. In the same testcase used in r240560,
compile time is reduced from 2min to 30s.

This also fixes PR22348.

rdar://problem/19230319
Differential Revision: http://reviews.llvm.org/D11364

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243750 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/AliasAnalysis.h
include/llvm/Analysis/CaptureTracking.h
include/llvm/Analysis/OrderedBasicBlock.h [new file with mode: 0644]
lib/Analysis/AliasAnalysis.cpp
lib/Analysis/CMakeLists.txt
lib/Analysis/CaptureTracking.cpp
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Analysis/OrderedBasicBlock.cpp [new file with mode: 0644]