mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-10 19:34:29 +00:00
[InlineAdvisor] Add single quotes around caller/callee names
Clang diagnostics refer to identifier names in quotes. This patch makes inline remarks conform to the convention. New behavior: ``` % clang -O2 -Rpass=inline -Rpass-missed=inline -S a.c a.c:4:25: remark: 'foo' inlined into 'bar' with (cost=-30, threshold=337) at callsite bar:0:25; [-Rpass=inline] int bar(int a) { return foo(a); } ^ ``` Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D107791
This commit is contained in:
parent
093493032d
commit
76093b1739
@ -16,9 +16,11 @@
|
||||
; YAML-NEXT: Function: main
|
||||
; YAML-NEXT: Hotness: 300
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: tinkywinky
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: main
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '0'
|
||||
@ -30,7 +32,7 @@
|
||||
; Next try with pass remarks to stderr
|
||||
; RUN: %clang -target x86_64-scei-ps4 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -Rpass=inline -fdiagnostics-show-hotness -o %t2.o -c 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK: tinkywinky inlined into main with (cost=0, threshold=337) (hotness: 300)
|
||||
; CHECK: 'tinkywinky' inlined into 'main' with (cost=0, threshold=337) (hotness: 300)
|
||||
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-scei-ps4"
|
||||
|
@ -11,6 +11,6 @@
|
||||
int foo(int x, int y) __attribute__((always_inline));
|
||||
int foo(int x, int y) { return x + y; }
|
||||
|
||||
// expected-remark@+2 {{foo inlined into bar}} expected-note@+2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
|
||||
// expected-remark@+2 {{'foo' inlined into 'bar'}} expected-note@+2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
|
||||
#line 1230 "/bad/path/to/original.c"
|
||||
int bar(int j) { return foo(j, j - 2); }
|
||||
|
@ -14,7 +14,7 @@ float foz(int x, int y) { return x * y; }
|
||||
// twice.
|
||||
//
|
||||
int bar(int j) {
|
||||
// expected-remark@+2 {{foz not inlined into bar because it should never be inlined (cost=never)}}
|
||||
// expected-remark@+1 {{foo inlined into bar}}
|
||||
// expected-remark@+2 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
|
||||
// expected-remark@+1 {{'foo' inlined into 'bar'}}
|
||||
return foo(j, j - 2) * foz(j - 2, j);
|
||||
}
|
||||
|
@ -67,19 +67,19 @@ int foo(int x, int y) { return x + y; }
|
||||
int sum = 0;
|
||||
|
||||
void bar(int x) {
|
||||
// HOTNESS_OFF: foo inlined into bar
|
||||
// HOTNESS_OFF: 'foo' inlined into 'bar'
|
||||
// HOTNESS_OFF-NOT: hotness:
|
||||
// THRESHOLD-NOT: inlined
|
||||
// THRESHOLD-NOT: hotness
|
||||
// NO_PGO: '-fdiagnostics-show-hotness' requires profile-guided optimization information
|
||||
// NO_PGO: '-fdiagnostics-hotness-threshold=' requires profile-guided optimization information
|
||||
// expected-remark@+1 {{foo inlined into bar with (cost=always): always inline attribute at callsite bar:8:10; (hotness:}}
|
||||
// expected-remark@+1 {{'foo' inlined into 'bar' with (cost=always): always inline attribute at callsite bar:8:10; (hotness:}}
|
||||
sum += foo(x, x - 2);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
for (int i = 0; i < 30; i++)
|
||||
// expected-remark@+1 {{bar inlined into main with}}
|
||||
// expected-remark@+1 {{'bar' inlined into 'main' with}}
|
||||
bar(argc);
|
||||
return sum;
|
||||
}
|
||||
|
@ -60,19 +60,19 @@ int foo(int x, int y) { return x + y; }
|
||||
int sum = 0;
|
||||
|
||||
void bar(int x) {
|
||||
// HOTNESS_OFF: foo inlined into bar
|
||||
// HOTNESS_OFF: 'foo' inlined into 'bar'
|
||||
// HOTNESS_OFF-NOT: hotness:
|
||||
// THRESHOLD-NOT: inlined
|
||||
// THRESHOLD-NOT: hotness
|
||||
// NO_PGO: '-fdiagnostics-show-hotness' requires profile-guided optimization information
|
||||
// NO_PGO: '-fdiagnostics-hotness-threshold=' requires profile-guided optimization information
|
||||
// expected-remark@+1 {{foo inlined into bar with (cost=always): always inliner at callsite bar:8:10; (hotness:}}
|
||||
// expected-remark@+1 {{'foo' inlined into 'bar' with (cost=always): always inliner at callsite bar:8:10; (hotness:}}
|
||||
sum += foo(x, x - 2);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
for (int i = 0; i < 30; i++)
|
||||
// expected-remark@+1 {{bar not inlined into main because it should never be inlined (cost=never): no alwaysinline attribute (hotness:}}
|
||||
// expected-remark@+1 {{'bar' not inlined into 'main' because it should never be inlined (cost=never): no alwaysinline attribute (hotness:}}
|
||||
bar(argc);
|
||||
return sum;
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ float foz(int x, int y) { return x * y; }
|
||||
// twice.
|
||||
//
|
||||
int bar(int j) {
|
||||
// expected-remark@+3 {{foz not inlined into bar because it should never be inlined (cost=never)}}
|
||||
// expected-remark@+2 {{foz not inlined into bar because it should never be inlined (cost=never)}}
|
||||
// expected-remark@+1 {{foo inlined into bar}}
|
||||
// expected-remark@+3 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
|
||||
// expected-remark@+2 {{'foz' not inlined into 'bar' because it should never be inlined (cost=never)}}
|
||||
// expected-remark@+1 {{'foo' inlined into 'bar'}}
|
||||
return foo(j, j - 2) * foz(j - 2, j);
|
||||
}
|
||||
|
@ -21,14 +21,14 @@ __attribute__((noinline)) int callee2() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
// REMARKS: _Z7callee1v inlined into _Z7caller1v
|
||||
// HOT_CALL: _Z7callee1v inlined into _Z7caller1v
|
||||
// REMARKS: '_Z7callee1v' inlined into '_Z7caller1v'
|
||||
// HOT_CALL: '_Z7callee1v' inlined into '_Z7caller1v'
|
||||
int caller1() {
|
||||
return callee1();
|
||||
}
|
||||
|
||||
// REMARKS: _Z7callee2v not inlined into _Z7caller2v
|
||||
// HOT_CALL-NOT: _Z7callee2v not inlined into _Z7caller2v
|
||||
// REMARKS: '_Z7callee2v' not inlined into '_Z7caller2v'
|
||||
// HOT_CALL-NOT: '_Z7callee2v' not inlined into '_Z7caller2v'
|
||||
int caller2() {
|
||||
return callee2();
|
||||
}
|
||||
|
@ -32,9 +32,11 @@
|
||||
; YAML-NEXT: Name: Inlined
|
||||
; YAML-NEXT: Function: main
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: tinkywinky
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: main
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '0'
|
||||
@ -49,9 +51,11 @@
|
||||
; YAML-HOT-NEXT: Function: main
|
||||
; YAML-HOT-NEXT: Hotness: 300
|
||||
; YAML-HOT-NEXT: Args:
|
||||
; YAML-HOT-NEXT: - String: ''''
|
||||
; YAML-HOT-NEXT: - Callee: tinkywinky
|
||||
; YAML-HOT-NEXT: - String: ' inlined into '
|
||||
; YAML-HOT-NEXT: - String: ''' inlined into '''
|
||||
; YAML-HOT-NEXT: - Caller: main
|
||||
; YAML-HOT-NEXT: - String: ''''
|
||||
; YAML-HOT-NEXT: - String: ' with '
|
||||
; YAML-HOT-NEXT: - String: '(cost='
|
||||
; YAML-HOT-NEXT: - Cost: '0'
|
||||
|
@ -56,9 +56,9 @@ void DefaultInlineAdvice::recordUnsuccessfulInliningImpl(
|
||||
"; " + inlineCostStr(*OIC));
|
||||
ORE.emit([&]() {
|
||||
return OptimizationRemarkMissed(DEBUG_TYPE, "NotInlined", DLoc, Block)
|
||||
<< NV("Callee", Callee) << " will not be inlined into "
|
||||
<< NV("Caller", Caller) << ": "
|
||||
<< NV("Reason", Result.getFailureReason());
|
||||
<< "'" << NV("Callee", Callee) << "' is not inlined into '"
|
||||
<< "'" << NV("Caller", Caller)
|
||||
<< "': " << NV("Reason", Result.getFailureReason());
|
||||
});
|
||||
}
|
||||
|
||||
@ -343,15 +343,15 @@ llvm::shouldInline(CallBase &CB,
|
||||
if (IC.isNever()) {
|
||||
ORE.emit([&]() {
|
||||
return OptimizationRemarkMissed(DEBUG_TYPE, "NeverInline", Call)
|
||||
<< NV("Callee", Callee) << " not inlined into "
|
||||
<< NV("Caller", Caller) << " because it should never be inlined "
|
||||
<< IC;
|
||||
<< "'" << NV("Callee", Callee) << "' not inlined into '"
|
||||
<< NV("Caller", Caller)
|
||||
<< "' because it should never be inlined " << IC;
|
||||
});
|
||||
} else {
|
||||
ORE.emit([&]() {
|
||||
return OptimizationRemarkMissed(DEBUG_TYPE, "TooCostly", Call)
|
||||
<< NV("Callee", Callee) << " not inlined into "
|
||||
<< NV("Caller", Caller) << " because too costly to inline "
|
||||
<< "'" << NV("Callee", Callee) << "' not inlined into '"
|
||||
<< NV("Caller", Caller) << "' because too costly to inline "
|
||||
<< IC;
|
||||
});
|
||||
}
|
||||
@ -368,9 +368,9 @@ llvm::shouldInline(CallBase &CB,
|
||||
ORE.emit([&]() {
|
||||
return OptimizationRemarkMissed(DEBUG_TYPE, "IncreaseCostInOtherContexts",
|
||||
Call)
|
||||
<< "Not inlining. Cost of inlining " << NV("Callee", Callee)
|
||||
<< " increases the cost of inlining " << NV("Caller", Caller)
|
||||
<< " in other contexts";
|
||||
<< "Not inlining. Cost of inlining '" << NV("Callee", Callee)
|
||||
<< "' increases the cost of inlining '" << NV("Caller", Caller)
|
||||
<< "' in other contexts";
|
||||
});
|
||||
setInlineRemark(CB, "deferred");
|
||||
// IC does not bool() to false, so get an InlineCost that will.
|
||||
@ -444,8 +444,8 @@ void llvm::emitInlinedInto(OptimizationRemarkEmitter &ORE, DebugLoc DLoc,
|
||||
StringRef RemarkName = AlwaysInline ? "AlwaysInline" : "Inlined";
|
||||
OptimizationRemark Remark(PassName ? PassName : DEBUG_TYPE, RemarkName,
|
||||
DLoc, Block);
|
||||
Remark << ore::NV("Callee", &Callee) << " inlined into ";
|
||||
Remark << ore::NV("Caller", &Caller);
|
||||
Remark << "'" << ore::NV("Callee", &Callee) << "' inlined into '"
|
||||
<< ore::NV("Caller", &Caller) << "'";
|
||||
if (ForProfileContext)
|
||||
Remark << " to match profiling context";
|
||||
Remark << " with " << IC;
|
||||
|
@ -36,15 +36,16 @@ ReplayInlineAdvisor::ReplayInlineAdvisor(
|
||||
}
|
||||
|
||||
// Example for inline remarks to parse:
|
||||
// main:3:1.1: _Z3subii inlined into main at callsite sum:1 @ main:3:1.1
|
||||
// main:3:1.1: '_Z3subii' inlined into 'main' at callsite sum:1 @ main:3:1.1
|
||||
// We use the callsite string after `at callsite` to replay inlining.
|
||||
line_iterator LineIt(*BufferOrErr.get(), /*SkipBlanks=*/true);
|
||||
for (; !LineIt.is_at_eof(); ++LineIt) {
|
||||
StringRef Line = *LineIt;
|
||||
auto Pair = Line.split(" at callsite ");
|
||||
|
||||
auto Callee = Pair.first.split(" inlined into").first.rsplit(": ").second;
|
||||
|
||||
StringRef Callee = Pair.first.split(" inlined into")
|
||||
.first.rsplit(": '")
|
||||
.second.drop_back();
|
||||
auto CallSite = Pair.second.split(";").first;
|
||||
|
||||
if (Callee.empty() || CallSite.empty())
|
||||
|
@ -58,9 +58,11 @@
|
||||
; YAML-NEXT: Function: main
|
||||
; YAML-NEXT: Hotness: 300
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: tinkywinky
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: main
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '-15000'
|
||||
@ -69,7 +71,7 @@
|
||||
; YAML-NEXT: - String: ')'
|
||||
; YAML-NEXT: ...
|
||||
|
||||
; CHECK: tinkywinky inlined into main with (cost=-15000, threshold=337) (hotness: 300)
|
||||
; CHECK: 'tinkywinky' inlined into 'main' with (cost=-15000, threshold=337) (hotness: 300)
|
||||
|
||||
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-scei-ps4"
|
||||
|
@ -25,9 +25,11 @@
|
||||
; YAML-NEXT: Name: Inlined
|
||||
; YAML-NEXT: Function: main
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: tinkywinky
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: main
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '-15000'
|
||||
|
@ -26,9 +26,11 @@
|
||||
; YAML-NEXT: Function: main
|
||||
; YAML-NEXT: Hotness: 300
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: foo
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: main
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '-15000'
|
||||
|
@ -41,9 +41,9 @@
|
||||
; RUN: FileCheck %s -allow-empty
|
||||
; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
|
||||
|
||||
; REMARKS: remark: {{.*}} foo inlined into main
|
||||
; REMARKS: remark: {{.*}} 'foo' inlined into 'main'
|
||||
; REMARKS: remark: {{.*}} loop not vectorized: cannot prove it is safe to reorder memory operations
|
||||
; REMARKS_DH: llvm-lto: remark: {{.*}} foo inlined into main
|
||||
; REMARKS_DH: llvm-lto: remark: {{.*}} 'foo' inlined into 'main'
|
||||
; REMARKS_DH: llvm-lto: remark: {{.*}} loop not vectorized: cannot prove it is safe to reorder memory operations
|
||||
; CHECK-NOT: remark:
|
||||
; CHECK-NOT: llvm-lto:
|
||||
@ -56,9 +56,11 @@
|
||||
; YAML-NEXT: Name: Inlined
|
||||
; YAML-NEXT: Function: main
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: foo
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: main
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '-15000'
|
||||
|
@ -34,8 +34,8 @@
|
||||
; YAML-MISS-NEXT: Function: caller2
|
||||
; YAML-MISS-NEXT: Hotness: 1
|
||||
|
||||
; CHECK-RPASS: callee1 inlined into caller1 with (cost=-30, threshold=4500) (hotness: 400)
|
||||
; CHECK-RPASS-NOT: callee2 not inlined into caller2 because it should never be inlined (cost=never): noinline function attribute (hotness: 1)
|
||||
; CHECK-RPASS: 'callee1' inlined into 'caller1' with (cost=-30, threshold=4500) (hotness: 400)
|
||||
; CHECK-RPASS-NOT: 'callee2' not inlined into 'caller2' because it should never be inlined (cost=never): noinline function attribute (hotness: 1)
|
||||
|
||||
define void @callee1() !prof !20 {
|
||||
; CHECK: callee1 :hot
|
||||
|
@ -32,8 +32,8 @@ entry:
|
||||
%1 = load i32, i32* %j.addr, align 4
|
||||
%sub = sub nsw i32 %1, 2
|
||||
%call = call i32 @foo(i32 %0, i32 %sub)
|
||||
; CHECK: foo inlined into bar
|
||||
; REMARKS-NOT: foo inlined into bar
|
||||
; CHECK: 'foo' inlined into 'bar'
|
||||
; REMARKS-NOT: 'foo' inlined into 'bar'
|
||||
ret i32 %call
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
; CHECK-NOT: llvm-lto:
|
||||
|
||||
|
||||
; Verify that bar is imported and inlined into foo
|
||||
; Verify that bar is imported 'and' inlined into 'foo'
|
||||
; RUN: cat %t.yaml.thin.0.yaml | FileCheck %s -check-prefix=YAML1
|
||||
; YAML1: --- !Passed
|
||||
; YAML1-NEXT: Pass: inline
|
||||
@ -23,9 +23,11 @@
|
||||
; YAML1-NEXT: Function: main
|
||||
; YAML1-NEXT: Hotness: 50
|
||||
; YAML1-NEXT: Args:
|
||||
; YAML1-NEXT: - String: ''''
|
||||
; YAML1-NEXT: - Callee: foo
|
||||
; YAML1-NEXT: - String: ' inlined into '
|
||||
; YAML1-NEXT: - String: ''' inlined into '
|
||||
; YAML1-NEXT: - Caller: main
|
||||
; YAML1-NEXT: - String: ''''
|
||||
; YAML1-NEXT: - String: ' with '
|
||||
; YAML1-NEXT: - String: '(cost='
|
||||
; YAML1-NEXT: - Cost: '-30'
|
||||
@ -35,16 +37,18 @@
|
||||
; YAML1-NEXT: ...
|
||||
|
||||
|
||||
; Verify that bar is imported and inlined into foo
|
||||
; Verify that bar is imported 'and' inlined into 'foo'
|
||||
; RUN: cat %t.yaml.thin.1.yaml | FileCheck %s -check-prefix=YAML2
|
||||
; YAML2: --- !Passed
|
||||
; YAML2-NEXT: Pass: inline
|
||||
; YAML2-NEXT: Name: Inlined
|
||||
; YAML2-NEXT: Function: foo
|
||||
; YAML2-NEXT: Args:
|
||||
; YAML2-NEXT: - String: ''''
|
||||
; YAML2-NEXT: - Callee: bar
|
||||
; YAML2-NEXT: - String: ' inlined into '
|
||||
; YAML2-NEXT: - String: ''' inlined into '
|
||||
; YAML2-NEXT: - Caller: foo
|
||||
; YAML2-NEXT: - String: ''''
|
||||
; YAML2-NEXT: - String: ' with '
|
||||
; YAML2-NEXT: - String: '(cost='
|
||||
; YAML2-NEXT: - Cost: '-30'
|
||||
|
@ -15,16 +15,18 @@
|
||||
; CHECK-NOT: llvm-lto:
|
||||
|
||||
|
||||
; Verify that bar is imported and inlined into foo
|
||||
; Verify that bar is imported 'and' inlined into 'foo'
|
||||
; RUN: cat %t.yaml.thin.0.yaml | FileCheck %s -check-prefix=YAML1
|
||||
; YAML1: --- !Passed
|
||||
; YAML1-NEXT: Pass: inline
|
||||
; YAML1-NEXT: Name: Inlined
|
||||
; YAML1-NEXT: Function: main
|
||||
; YAML1-NEXT: Args:
|
||||
; YAML1-NEXT: - String: ''''
|
||||
; YAML1-NEXT: - Callee: foo
|
||||
; YAML1-NEXT: - String: ' inlined into '
|
||||
; YAML1-NEXT: - String: ''' inlined into '
|
||||
; YAML1-NEXT: - Caller: main
|
||||
; YAML1-NEXT: - String: ''''
|
||||
; YAML1-NEXT: - String: ' with '
|
||||
; YAML1-NEXT: - String: '(cost='
|
||||
; YAML1-NEXT: - Cost: '-30'
|
||||
@ -34,16 +36,18 @@
|
||||
; YAML1-NEXT: ...
|
||||
|
||||
|
||||
; Verify that bar is imported and inlined into foo
|
||||
; Verify that bar is imported 'and' inlined into 'foo'
|
||||
; RUN: cat %t.yaml.thin.1.yaml | FileCheck %s -check-prefix=YAML2
|
||||
; YAML2: --- !Passed
|
||||
; YAML2-NEXT: Pass: inline
|
||||
; YAML2-NEXT: Name: Inlined
|
||||
; YAML2-NEXT: Function: foo
|
||||
; YAML2-NEXT: Args:
|
||||
; YAML2-NEXT: - String: ''''
|
||||
; YAML2-NEXT: - Callee: bar
|
||||
; YAML2-NEXT: - String: ' inlined into '
|
||||
; YAML2-NEXT: - String: ''' inlined into '
|
||||
; YAML2-NEXT: - Caller: foo
|
||||
; YAML2-NEXT: - String: ''''
|
||||
; YAML2-NEXT: - String: ' with '
|
||||
; YAML2-NEXT: - String: '(cost='
|
||||
; YAML2-NEXT: - Cost: '-30'
|
||||
|
@ -4,38 +4,38 @@
|
||||
; Make sure that soft float implementations are calculated as being more expensive
|
||||
; to the inliner.
|
||||
|
||||
; NOFP-DAG: single not inlined into test_single because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: single not inlined into test_single because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15, threshold=75)
|
||||
; NOFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15015, threshold=75)
|
||||
; NOFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
|
||||
; NOFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
|
||||
; NOFP-DAG: 'single' not inlined into 'test_single' because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: 'single' not inlined into 'test_single' because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15, threshold=75)
|
||||
; NOFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15015, threshold=75)
|
||||
; NOFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
|
||||
; NOFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
|
||||
; NOFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
|
||||
|
||||
; FULLFP-DAG: single inlined into test_single with (cost=0, threshold=75)
|
||||
; FULLFP-DAG: single inlined into test_single with (cost=-15000, threshold=75)
|
||||
; FULLFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15, threshold=75)
|
||||
; FULLFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15015, threshold=75)
|
||||
; FULLFP-DAG: double inlined into test_double with (cost=0, threshold=75)
|
||||
; FULLFP-DAG: double inlined into test_double with (cost=-15000, threshold=75)
|
||||
; FULLFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
|
||||
; FULLFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
|
||||
; FULLFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
|
||||
; FULLFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
|
||||
; FULLFP-DAG: 'single' inlined into 'test_single' with (cost=0, threshold=75)
|
||||
; FULLFP-DAG: 'single' inlined into 'test_single' with (cost=-15000, threshold=75)
|
||||
; FULLFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15, threshold=75)
|
||||
; FULLFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15015, threshold=75)
|
||||
; FULLFP-DAG: 'double' inlined into 'test_double' with (cost=0, threshold=75)
|
||||
; FULLFP-DAG: 'double' inlined into 'test_double' with (cost=-15000, threshold=75)
|
||||
; FULLFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
|
||||
; FULLFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
|
||||
; FULLFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
|
||||
; FULLFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
|
||||
|
||||
; SINGLEFP-DAG: single inlined into test_single with (cost=0, threshold=75)
|
||||
; SINGLEFP-DAG: single inlined into test_single with (cost=-15000, threshold=75)
|
||||
; SINGLEFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15, threshold=75)
|
||||
; SINGLEFP-DAG: single_cheap inlined into test_single_cheap with (cost=-15015, threshold=75)
|
||||
; SINGLEFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: double not inlined into test_double because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: single_force_soft not inlined into test_single_force_soft because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
|
||||
; SINGLEFP-DAG: single_force_soft_fneg not inlined into test_single_force_soft_fneg because too costly to inline (cost=100, threshold=75)
|
||||
; SINGLEFP-DAG: 'single' inlined into 'test_single' with (cost=0, threshold=75)
|
||||
; SINGLEFP-DAG: 'single' inlined into 'test_single' with (cost=-15000, threshold=75)
|
||||
; SINGLEFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15, threshold=75)
|
||||
; SINGLEFP-DAG: 'single_cheap' inlined into 'test_single_cheap' with (cost=-15015, threshold=75)
|
||||
; SINGLEFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: 'double' not inlined into 'test_double' because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: 'single_force_soft' not inlined into 'test_single_force_soft' because too costly to inline (cost=125, threshold=75)
|
||||
; SINGLEFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
|
||||
; SINGLEFP-DAG: 'single_force_soft_fneg' not inlined into 'test_single_force_soft_fneg' because too costly to inline (cost=100, threshold=75)
|
||||
|
||||
define i32 @test_single(i32 %a, i8 %b, i32 %c, i8 %d) #0 {
|
||||
%call = call float @single(i32 %a, i8 zeroext %b)
|
||||
|
@ -1,2 +1,2 @@
|
||||
remark: calls.cc:10:0: _Z3sumii inlined into main with (cost=45, threshold=337) at callsite main:3:0.1;
|
||||
remark: calls.cc:4:0: _Z3subii inlined into main with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;
|
||||
remark: calls.cc:10:0: '_Z3sumii' inlined into 'main' with (cost=45, threshold=337) at callsite main:3:0.1;
|
||||
remark: calls.cc:4:0: '_Z3subii' inlined into 'main' with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;
|
||||
|
@ -110,10 +110,10 @@ attributes #0 = { "use-sample-profile" }
|
||||
!25 = !DILocation(line: 11, scope: !12)
|
||||
!26 = !DILocation(line: 12, scope: !12)
|
||||
|
||||
; DEFAULT: _Z3subii inlined into _Z3sumii
|
||||
; DEFAULT: _Z3sumii inlined into main
|
||||
; DEFAULT-NOT: _Z3subii inlined into main
|
||||
; DEFAULT: '_Z3subii' inlined into '_Z3sumii'
|
||||
; DEFAULT: '_Z3sumii' inlined into 'main'
|
||||
; DEFAULT-NOT: '_Z3subii' inlined into 'main'
|
||||
|
||||
; REPLAY: _Z3sumii inlined into main
|
||||
; REPLAY: _Z3subii inlined into main
|
||||
; REPLAY-NOT: _Z3subii inlined into _Z3sumii
|
||||
; REPLAY: '_Z3sumii' inlined into 'main'
|
||||
; REPLAY: '_Z3subii' inlined into 'main'
|
||||
; REPLAY-NOT: '_Z3subii' inlined into '_Z3sumii'
|
||||
|
@ -5,8 +5,8 @@
|
||||
; Test that we don't inline when caller and callee don't have matching
|
||||
; noprofile fn attrs.
|
||||
|
||||
; CHECK-INLINE: profile not inlined into profile_caller because it should never be inlined (cost=never): conflicting attributes
|
||||
; CHECK-INLINE: noprofile not inlined into noprofile_caller because it should never be inlined (cost=never): conflicting attributes
|
||||
; CHECK-INLINE: 'profile' not inlined into 'profile_caller' because it should never be inlined (cost=never): conflicting attributes
|
||||
; CHECK-INLINE: 'noprofile' not inlined into 'noprofile_caller' because it should never be inlined (cost=never): conflicting attributes
|
||||
|
||||
define i32 @profile() { ret i32 42 }
|
||||
define i32 @noprofile() noprofile { ret i32 43 }
|
||||
|
@ -2,8 +2,8 @@
|
||||
; RUN: opt -passes='cgscc(inline)' %s -S -pass-remarks-missed=inline 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-INLINE %s
|
||||
; RUN: opt -passes=always-inline -o - -S %s | FileCheck %s
|
||||
|
||||
; CHECK-INLINE: ssp not inlined into nossp_caller because it should never be inlined (cost=never): stack protected callee but caller requested no stack protector
|
||||
; CHECK-INLINE: nossp not inlined into ssp_caller because it should never be inlined (cost=never): stack protected caller but callee requested no stack protector
|
||||
; CHECK-INLINE: 'ssp' not inlined into 'nossp_caller' because it should never be inlined (cost=never): stack protected callee but caller requested no stack protector
|
||||
; CHECK-INLINE: 'nossp' not inlined into 'ssp_caller' because it should never be inlined (cost=never): stack protected caller but callee requested no stack protector
|
||||
|
||||
; Not interesting to test.
|
||||
define i32 @nossp() { ret i32 41 }
|
||||
|
@ -18,7 +18,7 @@
|
||||
; 4 return foo();
|
||||
; 5 }
|
||||
|
||||
; CHECK: remark: /tmp/s.c:4:10: foo inlined into bar with (cost={{[0-9\-]+}}, threshold={{[0-9]+}})
|
||||
; CHECK: remark: /tmp/s.c:4:10: 'foo' inlined into 'bar' with (cost={{[0-9\-]+}}, threshold={{[0-9]+}})
|
||||
; THRESHOLD-NOT: remark
|
||||
|
||||
; ModuleID = '/tmp/s.c'
|
||||
|
@ -22,7 +22,7 @@
|
||||
; 4 return foo();
|
||||
; 5 }
|
||||
|
||||
; CHECK: remark: /tmp/s.c:4:10: foo inlined into bar with (cost={{[0-9\-]+}}, threshold={{[0-9]+}}) at callsite bar:1:10; (hotness: 30)
|
||||
; CHECK: remark: /tmp/s.c:4:10: 'foo' inlined into 'bar' with (cost={{[0-9\-]+}}, threshold={{[0-9]+}}) at callsite bar:1:10; (hotness: 30)
|
||||
|
||||
; YAML: --- !Passed
|
||||
; YAML-NEXT: Pass: inline
|
||||
@ -31,11 +31,13 @@
|
||||
; YAML-NEXT: Function: bar
|
||||
; YAML-NEXT: Hotness: 30
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: foo
|
||||
; YAML-NEXT: DebugLoc: { File: '/tmp/s.c', Line: 1, Column: 0 }
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: bar
|
||||
; YAML-NEXT: DebugLoc: { File: '/tmp/s.c', Line: 3, Column: 0 }
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '{{[0-9\-]+}}'
|
||||
|
@ -8,8 +8,8 @@
|
||||
; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 \
|
||||
; RUN: | FileCheck %s
|
||||
|
||||
; CHECK: foo inlined into bar with (cost=always): always inline attribute (hotness: 30)
|
||||
; CHECK: foz not inlined into bar because it should never be inlined (cost=never): noinline function attribute (hotness: 30)
|
||||
; CHECK: 'foo' inlined into 'bar' with (cost=always): always inline attribute (hotness: 30)
|
||||
; CHECK: 'foz' not inlined into 'bar' because it should never be inlined (cost=never): noinline function attribute (hotness: 30)
|
||||
|
||||
; Function Attrs: alwaysinline nounwind uwtable
|
||||
define i32 @foo() #0 !prof !1 {
|
||||
|
@ -28,8 +28,8 @@
|
||||
|
||||
; HOTNESS-DAG: fox will not be inlined into bar because its definition is unavailable
|
||||
; NO_HOTNESS-NOT: fox will not be inlined into bar because its definition is unavailable
|
||||
; ALWAYS-DAG: foo inlined into bar with (cost=always): always inline attribute
|
||||
; CHECK-DAG: foz not inlined into bar because it should never be inlined (cost=never): noinline function attribute
|
||||
; ALWAYS-DAG: 'foo' inlined into 'bar' with (cost=always): always inline attribute
|
||||
; CHECK-DAG: 'foz' not inlined into 'bar' because it should never be inlined (cost=never): noinline function attribute
|
||||
|
||||
; Function Attrs: alwaysinline nounwind uwtable
|
||||
define i32 @foo(i32 %x, i32 %y) #0 !prof !1 {
|
||||
|
@ -1,2 +1,2 @@
|
||||
remark: calls.cc:10:0: _Z3sumii inlined into main to match profiling context with (cost=45, threshold=337) at callsite main:3:0.1;
|
||||
remark: calls.cc:4:0: _Z3subii inlined into main to match profiling context with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;
|
||||
remark: calls.cc:10:0: '_Z3sumii' inlined into 'main' to match profiling context with (cost=45, threshold=337) at callsite main:3:0.1;
|
||||
remark: calls.cc:4:0: '_Z3subii' inlined into 'main' to match profiling context with (cost=-5, threshold=337) at callsite _Z3sumii:1:0 @ main:3:0.1;
|
||||
|
@ -54,10 +54,10 @@ attributes #0 = {"use-sample-profile"}
|
||||
!11 = distinct !DISubprogram(name: "zoo", linkageName: "_Z3zoov", scope: !1, file: !1, line: 24, unit: !0)
|
||||
|
||||
|
||||
; ICP-ALL: remark: test.cc:5:0: _Z3bazv inlined into test
|
||||
; ICP-ALL-NEXT: remark: test.cc:4:0: _Z3foov inlined into test
|
||||
; ICP-ALL-NEXT: remark: test.cc:4:0: _Z3barv inlined into test
|
||||
; ICP-ALL: remark: test.cc:5:0: '_Z3bazv' inlined into 'test'
|
||||
; ICP-ALL-NEXT: remark: test.cc:4:0: '_Z3foov' inlined into 'test'
|
||||
; ICP-ALL-NEXT: remark: test.cc:4:0: '_Z3barv' inlined into 'test'
|
||||
; ICP-ALL-NOT: remark
|
||||
|
||||
; ICP-HOT: remark: test.cc:4:0: _Z3foov inlined into test
|
||||
; ICP-HOT: remark: test.cc:4:0: '_Z3foov' inlined into 'test'
|
||||
; ICP-HOT-NOT: remark
|
||||
|
@ -21,16 +21,16 @@
|
||||
; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/profile-context-tracker.prof -sample-profile-inline-size -profile-summary-cutoff-hot=999900 -sample-profile-inline-limit-min=10 -sample-profile-inline-growth-limit=1 -profile-sample-accurate -S -pass-remarks=inline -o /dev/null 2>&1 | FileCheck %s --check-prefix=INLINE-NEW-LIMIT2
|
||||
|
||||
|
||||
; INLINE-BASE: remark: merged.cpp:14:10: _Z5funcAi inlined into main to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
|
||||
; INLINE-BASE: remark: merged.cpp:27:11: _Z8funcLeafi inlined into main to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11 @ main:3:10
|
||||
; INLINE-BASE: remark: merged.cpp:33:11: _Z8funcLeafi inlined into _Z5funcBi to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
|
||||
; INLINE-BASE: remark: merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
|
||||
; INLINE-BASE: remark: merged.cpp:27:11: '_Z8funcLeafi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcAi:1:11 @ main:3:10
|
||||
; INLINE-BASE: remark: merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
|
||||
|
||||
; INLINE-NEW: remark: merged.cpp:14:10: _Z5funcAi inlined into main to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
|
||||
; INLINE-NEW: remark: merged.cpp:14:10: '_Z5funcAi' inlined into 'main' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite main:3:10
|
||||
; INLINE-NEW-NOT: remark
|
||||
|
||||
; INLINE-NEW-LIMIT1-NOT: remark
|
||||
|
||||
; INLINE-NEW-LIMIT2: remark: merged.cpp:33:11: _Z8funcLeafi inlined into _Z5funcBi to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
|
||||
; INLINE-NEW-LIMIT2: remark: merged.cpp:33:11: '_Z8funcLeafi' inlined into '_Z5funcBi' to match profiling context with (cost={{[0-9]+}}, threshold={{[0-9]+}}) at callsite _Z5funcBi:1:11
|
||||
; INLINE-NEW-LIMIT2-NOT: remark
|
||||
|
||||
@factor = dso_local global i32 3, align 4, !dbg !0
|
||||
|
@ -113,10 +113,10 @@ attributes #0 = { "use-sample-profile" }
|
||||
!26 = !DILocation(line: 12, scope: !12)
|
||||
|
||||
|
||||
; DEFAULT: _Z3sumii inlined into main
|
||||
; DEFAULT: _Z3subii inlined into _Z3sumii
|
||||
; DEFAULT-NOT: _Z3subii inlined into main
|
||||
; DEFAULT: '_Z3sumii' inlined into 'main'
|
||||
; DEFAULT: '_Z3subii' inlined into '_Z3sumii'
|
||||
; DEFAULT-NOT: '_Z3subii' inlined into 'main'
|
||||
|
||||
; REPLAY: _Z3sumii inlined into main
|
||||
; REPLAY: _Z3subii inlined into main
|
||||
; REPLAY-NOT: _Z3subii inlined into _Z3sumii
|
||||
; REPLAY: '_Z3sumii' inlined into 'main'
|
||||
; REPLAY: '_Z3subii' inlined into 'main'
|
||||
; REPLAY-NOT: '_Z3subii' inlined into '_Z3sumii'
|
||||
|
@ -79,11 +79,13 @@ if.end:
|
||||
;YAML-NEXT: DebugLoc: { File: test.cpp, Line: 10, Column: 11 }
|
||||
;YAML-NEXT: Function: foo
|
||||
;YAML-NEXT: Args:
|
||||
;YAML-NEXT: - String: ''''
|
||||
;YAML-NEXT: - Callee: zen
|
||||
;YAML-NEXT: DebugLoc: { File: test.cpp, Line: 38, Column: 0 }
|
||||
;YAML-NEXT: - String: ' inlined into '
|
||||
;YAML-NEXT: - String: ''' inlined into '''
|
||||
;YAML-NEXT: - Caller: foo
|
||||
;YAML-NEXT: DebugLoc: { File: test.cpp, Line: 9, Column: 0 }
|
||||
;YAML-NEXT: - String: ''''
|
||||
;YAML-NEXT: - String: ' to match profiling context'
|
||||
;YAML-NEXT: - String: ' with '
|
||||
;YAML-NEXT: - String: '(cost='
|
||||
|
@ -36,8 +36,8 @@
|
||||
; YAML-MISS-NEXT: Function: _Z7caller2v
|
||||
; YAML-MISS-NEXT: Hotness: 2
|
||||
|
||||
; CHECK-RPASS: _Z7callee1v inlined into _Z7caller1v with (cost=-30, threshold=4500) at callsite _Z7caller1v:1:10; (hotness: 401)
|
||||
; CHECK-RPASS-NOT: _Z7callee2v not inlined into _Z7caller2v because it should never be inlined (cost=never): noinline function attribute (hotness: 2)
|
||||
; CHECK-RPASS: '_Z7callee1v' inlined into '_Z7caller1v' with (cost=-30, threshold=4500) at callsite _Z7caller1v:1:10; (hotness: 401)
|
||||
; CHECK-RPASS-NOT: '_Z7callee2v' not inlined into '_Z7caller2v' because it should never be inlined (cost=never): noinline function attribute (hotness: 2)
|
||||
|
||||
; ModuleID = 'remarks-hotness.cpp'
|
||||
source_filename = "remarks-hotness.cpp"
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
; We are expecting foo() to be inlined in main() (almost all the cycles are
|
||||
; spent inside foo).
|
||||
; CHECK: remark: remarks.cc:13:21: _Z3foov inlined into main to match profiling context with (cost=130, threshold=2147483647) at callsite main:0:21;
|
||||
; CHECK: remark: remarks.cc:9:19: rand inlined into main to match profiling context with (cost=always): always inline attribute at callsite _Z3foov:6:19 @ main:0:21;
|
||||
; CHECK: remark: remarks.cc:13:21: '_Z3foov' inlined into 'main' to match profiling context with (cost=130, threshold=2147483647) at callsite main:0:21;
|
||||
; CHECK: remark: remarks.cc:9:19: 'rand' inlined into 'main' to match profiling context with (cost=always): always inline attribute at callsite _Z3foov:6:19 @ main:0:21;
|
||||
|
||||
; The back edge for the loop is the hottest edge in the loop subgraph.
|
||||
; CHECK: remark: remarks.cc:6:9: most popular destination for conditional branches at remarks.cc:5:3
|
||||
@ -37,11 +37,13 @@
|
||||
;YAML-NEXT: DebugLoc: { File: remarks.cc, Line: 13, Column: 21 }
|
||||
;YAML-NEXT: Function: main
|
||||
;YAML-NEXT: Args:
|
||||
;YAML-NEXT: - String: ''''
|
||||
;YAML-NEXT: - Callee: _Z3foov
|
||||
;YAML-NEXT: DebugLoc: { File: remarks.cc, Line: 3, Column: 0 }
|
||||
;YAML-NEXT: - String: ' inlined into '
|
||||
;YAML-NEXT: - String: ''' inlined into '
|
||||
;YAML-NEXT: - Caller: main
|
||||
;YAML-NEXT: DebugLoc: { File: remarks.cc, Line: 13, Column: 0 }
|
||||
;YAML-NEXT: - String: ''''
|
||||
;YAML-NEXT: - String: ' to match profiling context'
|
||||
;YAML-NEXT: - String: ' with '
|
||||
;YAML-NEXT: - String: '(cost='
|
||||
@ -63,11 +65,13 @@
|
||||
;YAML-NEXT: DebugLoc: { File: remarks.cc, Line: 9, Column: 19 }
|
||||
;YAML-NEXT: Function: main
|
||||
;YAML-NEXT: Args:
|
||||
;YAML-NEXT: - String: ''''
|
||||
;YAML-NEXT: - Callee: rand
|
||||
;YAML-NEXT: DebugLoc: { File: remarks.cc, Line: 90, Column: 0 }
|
||||
;YAML-NEXT: - String: ' inlined into '
|
||||
;YAML-NEXT: - String: ''' inlined into '''
|
||||
;YAML-NEXT: - Caller: main
|
||||
;YAML-NEXT: DebugLoc: { File: remarks.cc, Line: 13, Column: 0 }
|
||||
;YAML-NEXT: - String: ''''
|
||||
;YAML-NEXT: - String: ' to match profiling context'
|
||||
;YAML-NEXT: - String: ' with '
|
||||
;YAML-NEXT: - String: '(cost=always)'
|
||||
|
@ -49,9 +49,11 @@
|
||||
; YAML-NEXT: Name: Inlined
|
||||
; YAML-NEXT: Function: _start
|
||||
; YAML-NEXT: Args:
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - Callee: f
|
||||
; YAML-NEXT: - String: ' inlined into '
|
||||
; YAML-NEXT: - String: ''' inlined into '''
|
||||
; YAML-NEXT: - Caller: _start
|
||||
; YAML-NEXT: - String: ''''
|
||||
; YAML-NEXT: - String: ' with '
|
||||
; YAML-NEXT: - String: '(cost='
|
||||
; YAML-NEXT: - Cost: '0'
|
||||
@ -66,9 +68,11 @@
|
||||
; YAML-HOT-NEXT: Function: _start
|
||||
; YAML-HOT-NEXT: Hotness: 300
|
||||
; YAML-HOT-NEXT: Args:
|
||||
; YAML-HOT-NEXT: - String: ''''
|
||||
; YAML-HOT-NEXT: - Callee: f
|
||||
; YAML-HOT-NEXT: - String: ' inlined into '
|
||||
; YAML-HOT-NEXT: - String: ''' inlined into '''
|
||||
; YAML-HOT-NEXT: - Caller: _start
|
||||
; YAML-HOT-NEXT: - String: ''''
|
||||
; YAML-HOT-NEXT: - String: ' with '
|
||||
; YAML-HOT-NEXT: - String: '(cost='
|
||||
; YAML-HOT-NEXT: - Cost: '0'
|
||||
|
@ -7,7 +7,7 @@
|
||||
; RUN: %t.o -o %t2.o 2>&1 | FileCheck -allow-empty --check-prefix=NO-REMARK %s
|
||||
|
||||
|
||||
; CHECK: f inlined into _start
|
||||
; CHECK: 'f' inlined into '_start'
|
||||
; NO-REMARK-NOT: inlined
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
Loading…
x
Reference in New Issue
Block a user