llvm.org GIT mirror llvm / bed7e68
Keep track of analysis information inherited from Module pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48576 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 11 years ago
2 changed file(s) with 62 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11581158
11591159 if (F.isDeclaration())
11601160 return false;
1161
1162 // Collect inherited analysis from Module level pass manager.
1163 populateInheritedAnalysis(TPM->activeStack);
11611164
11621165 for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
11631166 FunctionPass *FP = getContainedPass(Index);
14701473
14711474 // [1] Create new Function Pass Manager
14721475 FPP = new FPPassManager(PMD->getDepth() + 1);
1476 FPP->populateInheritedAnalysis(PMS);
14731477
14741478 // [2] Set up new manager's top level manager
14751479 PMTopLevelManager *TPM = PMD->getTopLevelManager();
0 ; PR 2034
1 ; RUN: llvm-as < %s | opt -anders-aa -instcombine -gvn -disable-output
2 %struct.FULL = type { i32, i32, [1000 x float*] }
3
4 define i32 @sgesl(%struct.FULL* %a, i32* %ipvt, float* %b, i32 %job) {
5 entry:
6 %a_addr = alloca %struct.FULL* ; <%struct.FULL**> [#uses=1]
7 %ipvt_addr = alloca i32* ; [#uses=1]
8 %b_addr = alloca float* ; [#uses=1]
9 %job_addr = alloca i32 ; [#uses=1]
10 %akk = alloca float* ; [#uses=2]
11 %k = alloca i32 ; [#uses=1]
12 %l = alloca i32 ; [#uses=1]
13 %n = alloca i32 ; [#uses=1]
14 %nm1 = alloca i32 ; [#uses=1]
15 %tmp5 = load i32* %job_addr, align 4 ; [#uses=1]
16 %tmp6 = icmp eq i32 %tmp5, 0 ; [#uses=1]
17 %tmp67 = zext i1 %tmp6 to i8 ; [#uses=1]
18 %toBool = icmp ne i8 %tmp67, 0 ; [#uses=1]
19 br i1 %toBool, label %cond_true, label %cond_next137
20
21 cond_true: ; preds = %entry
22 %tmp732 = load i32* %nm1, align 4 ; [#uses=1]
23 %tmp743 = icmp slt i32 0, %tmp732 ; [#uses=1]
24 %tmp74754 = zext i1 %tmp743 to i8 ; [#uses=1]
25 %toBool765 = icmp ne i8 %tmp74754, 0 ; [#uses=1]
26 br i1 %toBool765, label %bb, label %bb77
27
28 bb: ; preds = %cond_true
29 %tmp9 = load %struct.FULL** %a_addr, align 4 ; <%struct.FULL*> [#uses=1]
30 %tmp10 = getelementptr %struct.FULL* %tmp9, i32 0, i32 2 ; <[1000 x float*]*> [#uses=1]
31 %tmp11 = getelementptr [1000 x float*]* %tmp10, i32 0, i32 0 ; [#uses=1]
32 %tmp12 = load float** %tmp11, align 4 ; [#uses=1]
33 %tmp13 = load i32* %k, align 4 ; [#uses=1]
34 %tmp14 = getelementptr float* %tmp12, i32 %tmp13 ; [#uses=1]
35 store float* %tmp14, float** %akk, align 4
36 %tmp17 = load float** %b_addr, align 4 ; [#uses=0]
37 %tmp18 = load i32* %l, align 4 ; [#uses=0]
38 ret i32 0
39
40 bb77: ; preds = %cond_true
41 ret i32 0
42
43 cond_next137: ; preds = %entry
44 %tmp18922 = load i32* %n, align 4 ; [#uses=1]
45 %tmp19023 = icmp slt i32 0, %tmp18922 ; [#uses=1]
46 %tmp19019124 = zext i1 %tmp19023 to i8 ; [#uses=1]
47 %toBool19225 = icmp ne i8 %tmp19019124, 0 ; [#uses=1]
48 br i1 %toBool19225, label %bb138, label %bb193
49
50 bb138: ; preds = %cond_next137
51 store float* null, float** %akk, align 4
52 ret i32 0
53
54 bb193: ; preds = %cond_next137
55 %tmp196 = load i32** %ipvt_addr, align 4 ; [#uses=0]
56 ret i32 0
57 }