brintos

brintos / llvm-project-archived public Read only

0
0
Text · 626 B · b806488 Raw
23 lines · plain
1; RUN: opt < %s -passes=inline -pass-remarks-missed=inline -inline-cost-full -S 2>&1 | FileCheck %s2; RUN: opt < %s -passes=inline -pass-remarks-missed=inline -S 2>&1 | FileCheck %s3 4declare void @foo()5declare void @bar()6 7define void @callee() {8entry:9  call void @foo() noduplicate10  ; Just to inflate the cost11  call void @bar() "call-inline-cost"="1000"12  ret void13}14 15define void @caller() {16; CHECK: 'callee' not inlined into 'caller' because it should never be inlined (cost=never): noduplicate17; CHECK: define void @caller()18; CHECK-NEXT: call void @callee()19; CHECK-NEXT: ret void20  call void @callee()21  ret void22}23