53 lines · plain
1; RUN: opt < %s 2>&1 -disable-output \2; RUN: -passes=inline -print-after-all | FileCheck %s -check-prefix=INL3; RUN: opt < %s 2>&1 -disable-output \4; RUN: -passes=inliner-wrapper -print-after-all | FileCheck %s -check-prefix=INL5; RUN: opt < %s 2>&1 -disable-output \6; RUN: -passes=inline -print-after-all -print-module-scope | FileCheck %s -check-prefix=INL-MOD7; RUN: opt < %s 2>&1 -disable-output \8; RUN: -passes=inliner-wrapper -print-after-all -print-module-scope | FileCheck %s -check-prefix=INL-MOD9 10; INL: IR Dump After InlinerPass on (foo, bar) ***11; INL: define void @foo()12; INL-NEXT: call void @bar()13; INL: define void @bar()14; INL-NEXT: call void @foo()15; INL: IR Dump After InlinerPass on (tester) ***16; INL: define void @tester()17; INL-NEXT: call void @foo()18 19; INL-MOD-LABEL:*** IR Dump After InlinerPass on (foo, bar) ***20; INL-MOD-NEXT: ModuleID =21; INL-MOD-NEXT: source_filename =22; INL-MOD: define void @tester()23; INL-MOD-NEXT: call void @foo()24; INL-MOD: define void @foo()25; INL-MOD-NEXT: call void @bar()26; INL-MOD: define void @bar()27; INL-MOD-NEXT: call void @foo()28; INL-MOD-LABEL:*** IR Dump After InlinerPass on (tester) ***29; INL-MOD-NEXT: ModuleID =30; INL-MOD-NEXT: source_filename =31; INL-MOD: define void @tester()32; INL-MOD-NEXT: call void @foo()33; INL-MOD: define void @foo()34; INL-MOD-NEXT: call void @bar()35; INL-MOD: define void @bar()36; INL-MOD-NEXT: call void @foo()37; INL-MOD-NOT: Printing <null> Function38 39define void @tester() noinline {40 call void @foo()41 ret void42}43 44define void @foo() noinline {45 call void @bar()46 ret void47}48 49define void @bar() noinline {50 call void @foo()51 ret void52}53