1; This test is essentially doing very basic things with the opt tool and the 2; new pass manager pipeline. It will be used to flesh out the feature 3; completeness of the opt tool when the new pass manager is engaged. The tests 4; may not be useful once it becomes the default or may get spread out into other 5; files, but for now this is just going to step the new process through its 6; paces. 7 8; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 9; RUN: -passes=no-op-module %s 2>&1 \ 10; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PASS 11; CHECK-MODULE-PASS: Starting llvm::Module pass manager run 12; CHECK-MODULE-PASS-NEXT: Running pass: NoOpModulePass 13; CHECK-MODULE-PASS-NEXT: Finished llvm::Module pass manager run 14 15; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 16; RUN: -passes=no-op-cgscc %s 2>&1 \ 17; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS 18; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 19; RUN: -passes='cgscc(no-op-cgscc)' %s 2>&1 \ 20; RUN: | FileCheck %s --check-prefix=CHECK-CGSCC-PASS 21; CHECK-CGSCC-PASS: Starting llvm::Module pass manager run 22; CHECK-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor 23; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module> 24; CHECK-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module> 25; CHECK-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis 26; CHECK-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis 27; CHECK-CGSCC-PASS-NEXT: Starting CGSCC pass manager run 28; CHECK-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass 29; CHECK-CGSCC-PASS-NEXT: Finished CGSCC pass manager run 30; CHECK-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run 31 32; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 33; RUN: -passes=no-op-function %s 2>&1 \ 34; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS 35; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 36; RUN: -passes='function(no-op-function)' %s 2>&1 \ 37; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PASS 38; CHECK-FUNCTION-PASS: Starting llvm::Module pass manager run 39; CHECK-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor 40; CHECK-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> 41; CHECK-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run 42; CHECK-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass 43; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run 44; CHECK-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run 45 46; RUN: opt -disable-output -debug-pass-manager -passes=print %s 2>&1 \ 47; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-PRINT 48; CHECK-MODULE-PRINT: Starting llvm::Module pass manager run 49; CHECK-MODULE-PRINT: Running pass: VerifierPass 50; CHECK-MODULE-PRINT: Running pass: PrintModulePass 51; CHECK-MODULE-PRINT: ModuleID 52; CHECK-MODULE-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2) 53; CHECK-MODULE-PRINT: Running pass: VerifierPass 54; CHECK-MODULE-PRINT: Finished llvm::Module pass manager run 55 56; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='print,verify' %s 2>&1 \ 57; RUN: | FileCheck %s --check-prefix=CHECK-MODULE-VERIFY 58; CHECK-MODULE-VERIFY: Starting llvm::Module pass manager run 59; CHECK-MODULE-VERIFY: Running pass: PrintModulePass 60; CHECK-MODULE-VERIFY: ModuleID 61; CHECK-MODULE-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2) 62; CHECK-MODULE-VERIFY: Running pass: VerifierPass 63; CHECK-MODULE-VERIFY: Finished llvm::Module pass manager run 64 65; RUN: opt -disable-output -debug-pass-manager -passes='function(print)' %s 2>&1 \ 66; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-PRINT 67; CHECK-FUNCTION-PRINT: Starting llvm::Module pass manager run 68; CHECK-FUNCTION-PRINT: Running pass: VerifierPass 69; CHECK-FUNCTION-PRINT: Running pass: ModuleToFunctionPassAdaptor 70; CHECK-FUNCTION-PRINT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> 71; CHECK-FUNCTION-PRINT: Starting llvm::Function pass manager run 72; CHECK-FUNCTION-PRINT: Running pass: PrintFunctionPass 73; CHECK-FUNCTION-PRINT-NOT: ModuleID 74; CHECK-FUNCTION-PRINT: define void @foo(i1 %x, i8* %p1, i8* %p2) 75; CHECK-FUNCTION-PRINT: Finished llvm::Function pass manager run 76; CHECK-FUNCTION-PRINT: Running pass: VerifierPass 77; CHECK-FUNCTION-PRINT: Finished llvm::Module pass manager run 78 79; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='function(print,verify)' %s 2>&1 \ 80; RUN: | FileCheck %s --check-prefix=CHECK-FUNCTION-VERIFY 81; CHECK-FUNCTION-VERIFY: Starting llvm::Module pass manager run 82; CHECK-FUNCTION-VERIFY: Starting llvm::Function pass manager run 83; CHECK-FUNCTION-VERIFY: Running pass: PrintFunctionPass 84; CHECK-FUNCTION-VERIFY-NOT: ModuleID 85; CHECK-FUNCTION-VERIFY: define void @foo(i1 %x, i8* %p1, i8* %p2) 86; CHECK-FUNCTION-VERIFY: Running pass: VerifierPass 87; CHECK-FUNCTION-VERIFY: Finished llvm::Function pass manager run 88; CHECK-FUNCTION-VERIFY: Finished llvm::Module pass manager run 89 90; RUN: opt -S -o - -passes='no-op-module,no-op-module' %s \ 91; RUN: | FileCheck %s --check-prefix=CHECK-NOOP 92; CHECK-NOOP: define void @foo(i1 %x, i8* %p1, i8* %p2) { 93; CHECK-NOOP: entry: 94; CHECK-NOOP: store i8 42, i8* %p1 95; CHECK-NOOP: br i1 %x, label %loop, label %exit 96; CHECK-NOOP: loop: 97; CHECK-NOOP: %tmp1 = load i8, i8* %p2 98; CHECK-NOOP: br label %loop 99; CHECK-NOOP: exit: 100; CHECK-NOOP: ret void 101; CHECK-NOOP: } 102 103; Round trip through bitcode. 104; RUN: opt -f -o - -passes='no-op-module,no-op-module' %s \ 105; RUN: | llvm-dis \ 106; RUN: | FileCheck %s --check-prefix=CHECK-NOOP 107 108; RUN: opt -disable-output -debug-pass-manager -verify-each -passes='no-op-module,function(no-op-function)' %s 2>&1 \ 109; RUN: | FileCheck %s --check-prefix=CHECK-VERIFY-EACH 110; CHECK-VERIFY-EACH: Starting llvm::Module pass manager run 111; CHECK-VERIFY-EACH: Running pass: VerifierPass 112; CHECK-VERIFY-EACH: Running pass: NoOpModulePass 113; CHECK-VERIFY-EACH: Running pass: VerifierPass 114; CHECK-VERIFY-EACH: Starting llvm::Function pass manager run 115; CHECK-VERIFY-EACH: Running pass: NoOpFunctionPass 116; CHECK-VERIFY-EACH: Running pass: VerifierPass 117; CHECK-VERIFY-EACH: Finished llvm::Function pass manager run 118; CHECK-VERIFY-EACH: Running pass: VerifierPass 119; CHECK-VERIFY-EACH: Finished llvm::Module pass manager run 120 121; RUN: opt -disable-output -debug-pass-manager -disable-verify -passes='no-op-module,function(no-op-function)' %s 2>&1 \ 122; RUN: | FileCheck %s --check-prefix=CHECK-NO-VERIFY 123; CHECK-NO-VERIFY: Starting llvm::Module pass manager run 124; CHECK-NO-VERIFY-NOT: VerifierPass 125; CHECK-NO-VERIFY: Running pass: NoOpModulePass 126; CHECK-NO-VERIFY-NOT: VerifierPass 127; CHECK-NO-VERIFY: Starting llvm::Function pass manager run 128; CHECK-NO-VERIFY: Running pass: NoOpFunctionPass 129; CHECK-NO-VERIFY-NOT: VerifierPass 130; CHECK-NO-VERIFY: Finished llvm::Function pass manager run 131; CHECK-NO-VERIFY-NOT: VerifierPass 132; CHECK-NO-VERIFY: Finished llvm::Module pass manager run 133 134; RUN: opt -disable-output -debug-pass-manager \ 135; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \ 136; RUN: | FileCheck %s --check-prefix=CHECK-ANALYSES 137; CHECK-ANALYSES: Starting llvm::Module pass manager run 138; CHECK-ANALYSES: Running pass: RequireAnalysisPass 139; CHECK-ANALYSES: Running analysis: NoOpModuleAnalysis 140; CHECK-ANALYSES: Starting CGSCC pass manager run 141; CHECK-ANALYSES: Running pass: RequireAnalysisPass 142; CHECK-ANALYSES: Running analysis: NoOpCGSCCAnalysis 143; CHECK-ANALYSES: Starting llvm::Function pass manager run 144; CHECK-ANALYSES: Running pass: RequireAnalysisPass 145; CHECK-ANALYSES: Running analysis: NoOpFunctionAnalysis 146 147; Make sure no-op passes that preserve all analyses don't even try to do any 148; analysis invalidation. 149; RUN: opt -disable-output -debug-pass-manager \ 150; RUN: -passes='require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>))' %s 2>&1 \ 151; RUN: | FileCheck %s --check-prefix=CHECK-NO-OP-INVALIDATION 152; CHECK-NO-OP-INVALIDATION: Starting llvm::Module pass manager run 153; CHECK-NO-OP-INVALIDATION-NOT: Invalidating all non-preserved analyses 154 155; RUN: opt -disable-output -debug-pass-manager \ 156; RUN: -passes='require<no-op-module>,require<no-op-module>,require<no-op-module>' %s 2>&1 \ 157; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS 158; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run 159; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass 160; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis 161; CHECK-DO-CACHE-MODULE-ANALYSIS-RESULTS-NOT: Running analysis: NoOpModuleAnalysis 162 163; RUN: opt -disable-output -debug-pass-manager \ 164; RUN: -passes='require<no-op-module>,invalidate<no-op-module>,require<no-op-module>' %s 2>&1 \ 165; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS 166; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Starting llvm::Module pass manager run 167; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass 168; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis 169; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Invalidating analysis: NoOpModuleAnalysis 170; CHECK-DO-INVALIDATE-MODULE-ANALYSIS-RESULTS: Running analysis: NoOpModuleAnalysis 171 172; RUN: opt -disable-output -debug-pass-manager \ 173; RUN: -passes='cgscc(require<no-op-cgscc>,require<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \ 174; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS 175; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run 176; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass 177; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis 178; CHECK-DO-CACHE-CGSCC-ANALYSIS-RESULTS-NOT: Running analysis: NoOpCGSCCAnalysis 179 180; RUN: opt -disable-output -debug-pass-manager \ 181; RUN: -passes='cgscc(require<no-op-cgscc>,invalidate<no-op-cgscc>,require<no-op-cgscc>)' %s 2>&1 \ 182; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS 183; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Starting llvm::Module pass manager run 184; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass 185; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis 186; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Invalidating analysis: NoOpCGSCCAnalysis 187; CHECK-DO-INVALIDATE-CGSCC-ANALYSIS-RESULTS: Running analysis: NoOpCGSCCAnalysis 188 189; RUN: opt -disable-output -debug-pass-manager \ 190; RUN: -passes='function(require<no-op-function>,require<no-op-function>,require<no-op-function>)' %s 2>&1 \ 191; RUN: | FileCheck %s --check-prefix=CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS 192; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run 193; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass 194; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis 195; CHECK-DO-CACHE-FUNCTION-ANALYSIS-RESULTS-NOT: Running analysis: NoOpFunctionAnalysis 196 197; RUN: opt -disable-output -debug-pass-manager \ 198; RUN: -passes='function(require<no-op-function>,invalidate<no-op-function>,require<no-op-function>)' %s 2>&1 \ 199; RUN: | FileCheck %s --check-prefix=CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS 200; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Starting llvm::Module pass manager run 201; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running pass: RequireAnalysisPass 202; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis 203; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Invalidating analysis: NoOpFunctionAnalysis 204; CHECK-DO-INVALIDATE-FUNCTION-ANALYSIS-RESULTS: Running analysis: NoOpFunctionAnalysis 205 206; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 207; RUN: -passes='require<no-op-module>,module(require<no-op-module>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-module>),require<no-op-module>' %s 2>&1 \ 208; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL 209; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run 210; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass 211; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis 212; CHECK-INVALIDATE-ALL: Starting llvm::Module pass manager run 213; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass 214; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis 215; CHECK-INVALIDATE-ALL: Starting llvm::Function pass manager run 216; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass 217; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis 218; CHECK-INVALIDATE-ALL: Running pass: InvalidateAllAnalysesPass 219; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpFunctionAnalysis 220; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass 221; CHECK-INVALIDATE-ALL: Running analysis: NoOpFunctionAnalysis 222; CHECK-INVALIDATE-ALL: Finished llvm::Function pass manager run 223; CHECK-INVALIDATE-ALL: Invalidating analysis: NoOpModuleAnalysis 224; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass 225; CHECK-INVALIDATE-ALL: Running analysis: NoOpModuleAnalysis 226; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run 227; CHECK-INVALIDATE-ALL-NOT: Invalidating analysis: NoOpModuleAnalysis 228; CHECK-INVALIDATE-ALL: Running pass: RequireAnalysisPass 229; CHECK-INVALIDATE-ALL-NOT: Running analysis: NoOpModuleAnalysis 230; CHECK-INVALIDATE-ALL: Finished llvm::Module pass manager run 231 232; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 233; RUN: -passes='require<no-op-module>,module(require<no-op-module>,cgscc(require<no-op-cgscc>,function(require<no-op-function>,invalidate<all>,require<no-op-function>),require<no-op-cgscc>),require<no-op-module>),require<no-op-module>' %s 2>&1 \ 234; RUN: | FileCheck %s --check-prefix=CHECK-INVALIDATE-ALL-CG 235; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run 236; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 237; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis 238; CHECK-INVALIDATE-ALL-CG: Starting llvm::Module pass manager run 239; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 240; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis 241; CHECK-INVALIDATE-ALL-CG: Starting CGSCC pass manager run 242; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 243; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis 244; CHECK-INVALIDATE-ALL-CG: Starting llvm::Function pass manager run 245; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 246; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis 247; CHECK-INVALIDATE-ALL-CG: Running pass: InvalidateAllAnalysesPass 248; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpFunctionAnalysis 249; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 250; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpFunctionAnalysis 251; CHECK-INVALIDATE-ALL-CG: Finished llvm::Function pass manager run 252; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpFunctionAnalysis 253; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpCGSCCAnalysis 254; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 255; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpCGSCCAnalysis 256; CHECK-INVALIDATE-ALL-CG: Finished CGSCC pass manager run 257; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpCGSCCAnalysis 258; CHECK-INVALIDATE-ALL-CG: Invalidating analysis: NoOpModuleAnalysis 259; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 260; CHECK-INVALIDATE-ALL-CG: Running analysis: NoOpModuleAnalysis 261; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run 262; CHECK-INVALIDATE-ALL-CG-NOT: Invalidating analysis: NoOpModuleAnalysis 263; CHECK-INVALIDATE-ALL-CG: Running pass: RequireAnalysisPass 264; CHECK-INVALIDATE-ALL-CG-NOT: Running analysis: NoOpModuleAnalysis 265; CHECK-INVALIDATE-ALL-CG: Finished llvm::Module pass manager run 266 267; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 268; RUN: -passes='require<targetlibinfo>,invalidate<all>,require<targetlibinfo>' \ 269; RUN: | FileCheck %s --check-prefix=CHECK-TLI 270; CHECK-TLI: Starting llvm::Module pass manager run 271; CHECK-TLI: Running pass: RequireAnalysisPass 272; CHECK-TLI: Running analysis: TargetLibraryAnalysis 273; CHECK-TLI: Running pass: InvalidateAllAnalysesPass 274; CHECK-TLI-NOT: Invalidating analysis: TargetLibraryAnalysis 275; CHECK-TLI: Running pass: RequireAnalysisPass 276; CHECK-TLI-NOT: Running analysis: TargetLibraryAnalysis 277; CHECK-TLI: Finished llvm::Module pass manager run 278 279; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 280; RUN: -passes='require<targetir>,invalidate<all>,require<targetir>' \ 281; RUN: | FileCheck %s --check-prefix=CHECK-TIRA 282; CHECK-TIRA: Starting llvm::Module pass manager run 283; CHECK-TIRA: Running pass: RequireAnalysisPass 284; CHECK-TIRA: Running analysis: TargetIRAnalysis 285; CHECK-TIRA: Running pass: InvalidateAllAnalysesPass 286; CHECK-TIRA-NOT: Invalidating analysis: TargetIRAnalysis 287; CHECK-TIRA: Running pass: RequireAnalysisPass 288; CHECK-TIRA-NOT: Running analysis: TargetIRAnalysis 289; CHECK-TIRA: Finished llvm::Module pass manager run 290 291; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 292; RUN: -passes='require<domtree>' \ 293; RUN: | FileCheck %s --check-prefix=CHECK-DT 294; CHECK-DT: Starting llvm::Module pass manager run 295; CHECK-DT: Running pass: RequireAnalysisPass 296; CHECK-DT: Running analysis: DominatorTreeAnalysis 297; CHECK-DT: Finished llvm::Module pass manager run 298 299; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 300; RUN: -passes='require<basic-aa>' \ 301; RUN: | FileCheck %s --check-prefix=CHECK-BASIC-AA 302; CHECK-BASIC-AA: Starting llvm::Module pass manager run 303; CHECK-BASIC-AA: Running pass: RequireAnalysisPass 304; CHECK-BASIC-AA: Running analysis: BasicAA 305; CHECK-BASIC-AA: Finished llvm::Module pass manager run 306 307; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 308; RUN: -passes='require<aa>' -aa-pipeline='basic-aa' \ 309; RUN: | FileCheck %s --check-prefix=CHECK-AA 310; CHECK-AA: Starting llvm::Module pass manager run 311; CHECK-AA: Running pass: RequireAnalysisPass 312; CHECK-AA: Running analysis: AAManager 313; CHECK-AA: Running analysis: BasicAA 314; CHECK-AA: Finished llvm::Module pass manager run 315 316; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 317; RUN: -passes='require<aa>' -aa-pipeline='default' \ 318; RUN: | FileCheck %s --check-prefix=CHECK-AA-DEFAULT 319; CHECK-AA-DEFAULT: Starting llvm::Module pass manager run 320; CHECK-AA-DEFAULT: Running pass: RequireAnalysisPass 321; CHECK-AA-DEFAULT: Running analysis: AAManager 322; CHECK-AA-DEFAULT: Running analysis: BasicAA 323; CHECK-AA-DEFAULT: Running analysis: ScopedNoAliasAA 324; CHECK-AA-DEFAULT: Running analysis: TypeBasedAA 325; CHECK-AA-DEFAULT: Finished llvm::Module pass manager run 326 327; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 328; RUN: -passes='require<aa>,invalidate<domtree>,aa-eval' -aa-pipeline='basic-aa' \ 329; RUN: | FileCheck %s --check-prefix=CHECK-AA-FUNCTION-INVALIDATE 330; CHECK-AA-FUNCTION-INVALIDATE: Starting llvm::Function pass manager run 331; CHECK-AA-FUNCTION-INVALIDATE: Running pass: RequireAnalysisPass 332; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager 333; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA 334; CHECK-AA-FUNCTION-INVALIDATE: Running pass: InvalidateAnalysisPass 335; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: DominatorTreeAnalysis 336; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: BasicAA 337; CHECK-AA-FUNCTION-INVALIDATE: Invalidating analysis: AAManager 338; CHECK-AA-FUNCTION-INVALIDATE: Running pass: AAEvaluator 339; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: AAManager 340; CHECK-AA-FUNCTION-INVALIDATE: Running analysis: BasicAA 341; CHECK-AA-FUNCTION-INVALIDATE: Finished llvm::Function pass manager run 342 343; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 344; RUN: -passes='require<globals-aa>,function(require<aa>),invalidate<globals-aa>,require<globals-aa>,function(aa-eval)' -aa-pipeline='globals-aa' \ 345; RUN: | FileCheck %s --check-prefix=CHECK-AA-MODULE-INVALIDATE 346; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Module pass manager run 347; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass 348; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA 349; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Function pass manager run 350; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass 351; CHECK-AA-MODULE-INVALIDATE: Running analysis: AAManager 352; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Function pass manager run 353; CHECK-AA-MODULE-INVALIDATE: Running pass: InvalidateAnalysisPass 354; CHECK-AA-MODULE-INVALIDATE: Invalidating analysis: AAManager 355; CHECK-AA-MODULE-INVALIDATE: Invalidating analysis: GlobalsAA 356; CHECK-AA-MODULE-INVALIDATE: Running pass: RequireAnalysisPass 357; CHECK-AA-MODULE-INVALIDATE: Running analysis: GlobalsAA 358; CHECK-AA-MODULE-INVALIDATE: Starting llvm::Function pass manager run 359; CHECK-AA-MODULE-INVALIDATE: Running pass: AAEvaluator 360; CHECK-AA-MODULE-INVALIDATE: Running analysis: AAManager 361; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Function pass manager run 362; CHECK-AA-MODULE-INVALIDATE: Finished llvm::Module pass manager run 363 364; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 365; RUN: -passes='require<memdep>' \ 366; RUN: | FileCheck %s --check-prefix=CHECK-MEMDEP 367; CHECK-MEMDEP: Starting llvm::Module pass manager run 368; CHECK-MEMDEP: Running pass: RequireAnalysisPass 369; CHECK-MEMDEP: Running analysis: MemoryDependenceAnalysis 370; CHECK-MEMDEP: Finished llvm::Module pass manager run 371 372; RUN: opt -disable-output -disable-verify -debug-pass-manager %s 2>&1 \ 373; RUN: -passes='require<callgraph>' \ 374; RUN: | FileCheck %s --check-prefix=CHECK-CALLGRAPH 375; CHECK-CALLGRAPH: Starting llvm::Module pass manager run 376; CHECK-CALLGRAPH: Running pass: RequireAnalysisPass 377; CHECK-CALLGRAPH: Running analysis: CallGraphAnalysis 378; CHECK-CALLGRAPH: Finished llvm::Module pass manager run 379 380; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 381; RUN: -passes='default<O0>' %s 2>&1 \ 382; RUN: | FileCheck %s --check-prefix=CHECK-O0 383; CHECK-O0: Starting llvm::Module pass manager run 384; CHECK-O0-NEXT: Finished llvm::Module pass manager run 385 386; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 387; RUN: -passes='repeat<3>(no-op-module)' %s 2>&1 \ 388; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-MODULE-PASS 389; CHECK-REPEAT-MODULE-PASS: Starting llvm::Module pass manager run 390; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: RepeatedPass 391; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run 392; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass 393; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run 394; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run 395; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass 396; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run 397; CHECK-REPEAT-MODULE-PASS-NEXT: Starting llvm::Module pass manager run 398; CHECK-REPEAT-MODULE-PASS-NEXT: Running pass: NoOpModulePass 399; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run 400; CHECK-REPEAT-MODULE-PASS-NEXT: Finished llvm::Module pass manager run 401 402; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 403; RUN: -passes='cgscc(repeat<3>(no-op-cgscc))' %s 2>&1 \ 404; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-CGSCC-PASS 405; CHECK-REPEAT-CGSCC-PASS: Starting llvm::Module pass manager run 406; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: ModuleToPostOrderCGSCCPassAdaptor 407; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(CGSCCAnalysisManager|AnalysisManager<.*LazyCallGraph::SCC.*>).*}},{{.*}}Module> 408; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*(FunctionAnalysisManager|AnalysisManager<.*Function.*>).*}},{{.*}}Module> 409; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: LazyCallGraphAnalysis 410; CHECK-REPEAT-CGSCC-PASS-NEXT: Running analysis: TargetLibraryAnalysis 411; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run 412; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: RepeatedPass 413; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run 414; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass 415; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run 416; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run 417; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass 418; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run 419; CHECK-REPEAT-CGSCC-PASS-NEXT: Starting CGSCC pass manager run 420; CHECK-REPEAT-CGSCC-PASS-NEXT: Running pass: NoOpCGSCCPass 421; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run 422; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished CGSCC pass manager run 423; CHECK-REPEAT-CGSCC-PASS-NEXT: Finished llvm::Module pass manager run 424 425; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 426; RUN: -passes='function(repeat<3>(no-op-function))' %s 2>&1 \ 427; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-FUNCTION-PASS 428; CHECK-REPEAT-FUNCTION-PASS: Starting llvm::Module pass manager run 429; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor 430; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> 431; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run 432; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: RepeatedPass 433; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run 434; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass 435; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run 436; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run 437; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass 438; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run 439; CHECK-REPEAT-FUNCTION-PASS-NEXT: Starting llvm::Function pass manager run 440; CHECK-REPEAT-FUNCTION-PASS-NEXT: Running pass: NoOpFunctionPass 441; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run 442; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Function pass manager run 443; CHECK-REPEAT-FUNCTION-PASS-NEXT: Finished llvm::Module pass manager run 444 445; RUN: opt -disable-output -disable-verify -debug-pass-manager \ 446; RUN: -passes='loop(repeat<3>(no-op-loop))' %s 2>&1 \ 447; RUN: | FileCheck %s --check-prefix=CHECK-REPEAT-LOOP-PASS 448; CHECK-REPEAT-LOOP-PASS: Starting llvm::Module pass manager run 449; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: ModuleToFunctionPassAdaptor 450; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> 451; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run 452; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: FunctionToLoopPassAdaptor 453; CHECK-REPEAT-LOOP-PASS-NEXT: Starting llvm::Function pass manager run 454; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LoopSimplify 455; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: LoopAnalysis 456; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: DominatorTreeAnalysis 457; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AssumptionAnalysis 458; CHECK-REPEAT-LOOP-PASS-NEXT: Invalidating all non-preserved analyses 459; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: LCSSAPass 460; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run 461; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: AAManager 462; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetLibraryAnalysis 463; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: ScalarEvolutionAnalysis 464; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: TargetIRAnalysis 465; CHECK-REPEAT-LOOP-PASS-NEXT: Running analysis: InnerAnalysisManagerProxy<{{.*}}> 466; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run 467; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: RepeatedPass 468; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run 469; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass 470; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run 471; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run 472; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass 473; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run 474; CHECK-REPEAT-LOOP-PASS-NEXT: Starting Loop pass manager run 475; CHECK-REPEAT-LOOP-PASS-NEXT: Running pass: NoOpLoopPass 476; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run 477; CHECK-REPEAT-LOOP-PASS-NEXT: Finished Loop pass manager run 478; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Function pass manager run 479; CHECK-REPEAT-LOOP-PASS-NEXT: Invalidating all non-preserved analyses 480; CHECK-REPEAT-LOOP-PASS-NEXT: Finished llvm::Module pass manager run 481 482define void @foo(i1 %x, i8* %p1, i8* %p2) { 483entry: 484 store i8 42, i8* %p1 485 br i1 %x, label %loop, label %exit 486 487loop: 488 %tmp1 = load i8, i8* %p2 489 br label %loop 490 491exit: 492 ret void 493} 494 495declare void @bar() 496