1; Test behavior when inlining policy grows size out of control. 2; In all cases, the end result is the same: mandatory inlinings must happen. 3; However, when we discover we 'trip' over the artificially-low size increase 4; factor, we don't inline anymore. 5; REQUIRES: have_tf_aot 6; RUN: opt -passes=scc-oz-module-inliner -enable-ml-inliner=release -ml-advisor-size-increase-threshold=10.0 -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=NOBOUNDS 7; RUN: opt -passes=scc-oz-module-inliner -enable-ml-inliner=release -ml-advisor-size-increase-threshold=1.0 -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=BOUNDS 8 9target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 10target triple = "x86_64-grtev4-linux-gnu" 11 12declare i64 @f1() 13 14define i64 @f2() #0 { 15 %r = call i64 @f1() 16 %r2 = add i64 13, %r 17 ret i64 %r2 18} 19 20define i64 @some_function() { 21 %r = call i64 @f1() 22 %r2 = add i64 13, %r 23 ret i64 %r2 24} 25 26define i64 @top() { 27 %r = call i64 @f2() 28 %r2 = call i64 @some_function() 29 %r3 = add i64 %r, %r2 30 ret i64 %r3 31} 32 33attributes #0 = { alwaysinline } 34 35; CHECK-LABEL: @top 36; f2 must always be inlined, so we won't find a call to it in @top() 37; CHECK-NOT: call i64 @f2 38; @some-function isn't mandatory, and when we set the increase threshold too low, 39; it won't be inlined. 40; NOBOUNDS-NOT: @some_function 41; BOUNDS: call i64 @some_function