
Expanding from D94808 - we ensure the same InlineAdvisor is used by both InlinerPass instances. The notion of mandatory inlining is moved into the core InlineAdvisor: advisors anyway have to handle that case, so this change also factors out that a bit better. Differential Revision: https://reviews.llvm.org/D94825
19 lines
317 B
LLVM
19 lines
317 B
LLVM
; RUN: opt %s -o - -S -passes='default<O2>' | FileCheck %s
|
|
; RUN: opt %s -o - -S -passes=inliner-wrapper | FileCheck %s
|
|
|
|
; CHECK-NOT: call void @b()
|
|
define void @b() alwaysinline {
|
|
entry:
|
|
br label %for.cond
|
|
|
|
for.cond:
|
|
call void @a()
|
|
br label %for.cond
|
|
}
|
|
|
|
define void @a() {
|
|
entry:
|
|
call void @b()
|
|
ret void
|
|
}
|