Avatar
norio_nomura 3/5/2019 9:36 AM
$ swift test -c release -Xswiftc -save-optimization-record -Xswiftc -save-optimization-record-path -Xswiftc - とするとspecialized出来たかどうかを、各メソッド毎に出力してくれるぽい。 (edited)
9:37 AM
--- !Missed Pass: sil-inliner Name: sil.NoInlinedCost DebugLoc: File: /Users/norio/github/InlinableTest/Sources/InlinableTest/InlinableTest.swift Line: 17 Column: 29 Function: 'MyStruct.inlinedRanges<A>(_:)' Args: - String: 'Not profitable to inline function ' - Callee: '"specialized InlinableTest.RangeManager.ranges<A>(for:)"' DebugLoc: File: /Users/norio/github/InlinableTest/Sources/InlinableTest/InlinableTest.swift Line: 48 Column: 10 - String: ' (cost = ' - Cost: '72' - String: ', benefit = ' - Benefit: '40' - String: ')' ...
9:39 AM
どうやら@usableFromInlineなジェネリックメソッドを@inlinableなメソッドでspecialize出来ていないぽい。 (edited)