mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
81c2fc4c81
Summary: Passes that call `getAnalysisIfAvailable<T>` also need to call `addUsedIfAvailable<T>` in `getAnalysisUsage` to indicate to the legacy pass manager that it uses `T`. This contract was being violated by passes that used `createLegacyPMAAResults`. This change fixes this by exposing a helper in AliasAnalysis.h, `addUsedAAAnalyses`, that is complementary to createLegacyPMAAResults and does the right thing when called from `getAnalysisUsage`. Reviewers: chandlerc Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D17010 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260183 91177308-0d34-0410-b5e6-96231b3b80d8
11 lines
345 B
LLVM
11 lines
345 B
LLVM
; RUN: opt -debug-pass=Executions -globals-aa -functionattrs -disable-output < %s 2>&1 | FileCheck %s
|
|
|
|
; CHECK: Executing Pass 'Globals Alias Analysis'
|
|
; CHECK-NOT: Freeing Pass 'Globals Alias Analysis'
|
|
; CHECK: Executing Pass 'Deduce function attributes'
|
|
; CHECK: Freeing Pass 'Globals Alias Analysis'
|
|
|
|
define void @test(i8* %p) {
|
|
ret void
|
|
}
|