brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · e2dc4e9 Raw
55 lines · plain
1; This test is checking basic properties of -print-module-scope options:2;   - dumps all the module IR at once3;   - all the function attributes are shown, including those of declarations4;   - works on top of -print-after and -filter-print-funcs5;6; RUN: opt < %s 2>&1 -disable-output \7; RUN: 	   -passes=simplifycfg -print-after-all -print-module-scope \8; RUN:	   | FileCheck %s -check-prefix=CFG9; RUN: opt < %s 2>&1 -disable-output \10; RUN: 	   -passes=simplifycfg -print-after=simplifycfg -print-module-scope \11; RUN:	   | FileCheck %s -check-prefix=CFG12; RUN: opt < %s 2>&1 -disable-output \13; RUN: 	   -passes=simplifycfg -print-after=simplifycfg -filter-print-funcs=foo -print-module-scope \14; RUN:	   | FileCheck %s -check-prefix=FOO15 16; CFG:      IR Dump After {{Simplify the CFG|SimplifyCFGPass}} {{.*}}foo17; CFG-NEXT: ModuleID =18; CFG: define void @foo19; CFG: define void @bar20; CFG: declare void @baz21; CFG: IR Dump After {{.*}}bar22; CFG-NEXT: ModuleID =23; CFG: define void @foo24; CFG: define void @bar25; CFG: declare void @baz26 27; FOO:      IR Dump After {{Simplify the CFG|SimplifyCFGPass}} {{.*foo}}28; FOO-NEXT: ModuleID =29; FOO:   Function Attrs: nounwind ssp30; FOO: define void @foo31; FOO:   Function Attrs: nounwind32; FOO: define void @bar33; FOO:   Function Attrs: nounwind ssp memory(none)34; FOO: declare void @baz35 36define void @foo() nounwind ssp {37  call void @baz()38  ret void39}40 41define void @bar() #0 {42  ret void43}44 45declare void @baz() #146 47attributes #0 = { nounwind "frame-pointer"="all" }48 49attributes #1 = { nounwind readnone ssp "use-soft-float"="false" }50; FOO: attributes #{{[0-9]}} = { nounwind "frame-pointer"="all" }51 52; FOO: attributes #{{[0-9]}} = { nounwind ssp memory(none) "use-soft-float"="false" }53 54; FOO-NOT: IR Dump After {{Simplify the CFG|SimplifyCFGPass}}55