1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Transforms/Inline/internal-scc-members.ll
Mircea Trofin cb0c00be5f [llvm] Add interface to drive inlining decision using ML model
Summary:

This change introduces InliningAdvisor (and related APIs), the interface
that abstracts decision making away from the inlining pass. We will use
this interface to delegate decision making to a trained ML model,
subsequently (see referenced RFC).

RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140763.html

Reviewers: davidxl, eraman, dblaikie

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79042
2020-05-13 13:27:29 -07:00

33 lines
740 B
LLVM

; Test that the inliner can handle deleting functions within an SCC while still
; processing the calls in that SCC.
;
; RUN: opt < %s -S -inline | FileCheck %s
; RUN: opt < %s -S -passes=inline | FileCheck %s
; RUN: opt < %s -S -passes=inliner-wrapper | FileCheck %s
; CHECK-LABEL: define internal void @test1_scc0()
; CHECK-NOT: call
; CHECK: call void @test1_scc0()
; CHECK-NOT: call
; CHECK: ret
define internal void @test1_scc0() {
entry:
call void @test1_scc1()
ret void
}
; CHECK-NOT: @test1_scc1
define internal void @test1_scc1() {
entry:
call void @test1_scc0()
ret void
}
; CHECK-LABEL: define void @test1()
; CHECK: call void @test1_scc0()
define void @test1() {
entry:
call void @test1_scc0() noinline
ret void
}