13
13
; RUN: %python %S/../../../../lib/Analysis/models/saved-model-to-tflite.py %t_savedmodel %t
14
14
;
15
15
; When the bounds are very wide ("no bounds"), all inlinings happen.
16
- ; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -ml-inliner- model-under-training=%t -training-log=%t1 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=10.0 -S < %s | FileCheck %s --check-prefixes=NOBOUNDS-OUT,CHECK
16
+ ; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-model-under-training=%t -training-log=%t1 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=10.0 -S < %s | FileCheck %s --check-prefixes=NOBOUNDS-OUT,CHECK
17
17
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t1 | FileCheck %s --check-prefix=NOBOUNDS
18
18
;
19
19
; When the bounds are very restrictive, the first inlining happens but it's
20
20
; considered as "bad" (since it trips over the bounds) and its reward is a
21
21
; penalty. However, the mandatory inlining, which is considered next, happens.
22
22
; No other inlinings happend.
23
- ; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-ir2native-model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -ml-inliner- model-under-training=%t -training-log=%t2 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.0 -S < %s | FileCheck %s --check-prefixes=BOUNDS-OUT,CHECK
23
+ ; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-model-under-training=%t -training-log=%t2 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.0 -S < %s | FileCheck %s --check-prefixes=BOUNDS-OUT,CHECK
24
24
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t2 | FileCheck %s --check-prefix=BOUNDS
25
25
;
26
26
; With more restrictive bounds, the first inlining happens and is OK. The
27
27
; mandatory inlining happens next, and it trips over the bounds, which then
28
28
; forces no further inlinings.
29
- ; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-ir2native- model=%S/../../../../unittests/Analysis/Inputs/ir2native_x86_64_model -ml-inliner-model- under-training=%t -training-log=%t3 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.1 -S < %s | FileCheck %s --check-prefixes=RELAXED-BOUNDS-OUT,CHECK
29
+ ; RUN: opt -passes=scc-oz-module-inliner -ml-inliner-model- under-training=%t -training-log=%t3 -enable-ml-inliner=development -ml-advisor-size-increase-threshold=1.2 -S < %s | FileCheck %s --check-prefixes=RELAXED-BOUNDS-OUT,CHECK
30
30
; RUN: %python %S/../../../../lib/Analysis/models/log_reader.py %t3 | FileCheck %s --check-prefix=RELAXED-BOUNDS
31
31
32
32
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
@@ -52,15 +52,16 @@ define i64 @top() {
52
52
}
53
53
attributes #0 = { alwaysinline }
54
54
; NOBOUNDS: observation: 0
55
- ; NOBOUNDS: delta_size: 6
56
- ; RELAXED-BOUNDS: delta_size: 6
57
- ; BOUNDS: delta_size: 2147483647
55
+ ; NOBOUNDS: inlining_decision: 1
56
+ ; RELAXED-BOUNDS: inlining_decision: 1
57
+ ; BOUNDS: inlining_decision: 1
58
58
; NOBOUNDS: observation: 1
59
- ; BOUNDS-NOT: observation
60
- ; RELAXED-BOUNDS-NOT : observation
61
- ; NOBOUNDS: delta_size: -11
59
+ ; BOUNDS-NOT: observation: 1
60
+ ; RELAXED-BOUNDS: observation: 1
61
+ ; NOBOUNDS: inlining_decision: 1
62
62
; NOBOUNDS: observation: 2
63
- ; NOBOUNDS: delta_size: 4
63
+ ; NOBOUNDS: inlining_decision
64
+ ; RELAXED-BOUNDS-NOT: observation: 2
64
65
65
66
; CHECK-LABEL: @top
66
67
; must_be_inlined must always be inlined, so we won't find a call to it in @top()
0 commit comments