[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)
commitdfc1d96ef8b17e7c3cca31d3a6591dfd04aa074b
treecfd49467bddfd66ba6f98f31b68c7ac1cc48da7d
parent8b559ecf52f9d5964bf5d36ba5530ae6841563fd
[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

llvm-svn: 243750
llvm/include/llvm/Analysis/AliasAnalysis.h
llvm/include/llvm/Analysis/CaptureTracking.h
llvm/include/llvm/Analysis/OrderedBasicBlock.h [new file with mode: 0644]
llvm/lib/Analysis/AliasAnalysis.cpp
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Analysis/CaptureTracking.cpp
llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
llvm/lib/Analysis/OrderedBasicBlock.cpp [new file with mode: 0644]