Mircea Trofin e8049dc3c8 [NewPM][Inliner] Move the 'always inliner' case in the same CGSCC pass as 'regular' inliner
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
2021-01-15 17:59:38 -08:00

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
}