Skip to content

Commit 486fc81

Browse files
committed
Revert "[InlineCost] Enable the cost benefit analysis for Sample PGO (#66457)"
This reverts commit 2f2319c.
1 parent cbd4596 commit 486fc81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Analysis/InlineCost.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
787787
return false;
788788
} else {
789789
// Otherwise, require instrumentation profile.
790-
if (!(PSI->hasInstrumentationProfile() || PSI->hasSampleProfile()))
790+
if (!PSI->hasInstrumentationProfile())
791791
return false;
792792
}
793793

llvm/test/Transforms/SampleProfile/remarks-hotness.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
; YAML-PASS: --- !Passed
2626
; YAML-PASS-NEXT: Pass: inline
27-
; YAML-PASS-NEXT: Name: AlwaysInline
27+
; YAML-PASS-NEXT: Name: Inlined
2828
; YAML-PASS-NEXT: DebugLoc: { File: remarks-hotness.cpp, Line: 10, Column: 10 }
2929
; YAML-PASS-NEXT: Function: _Z7caller1v
3030
; YAML-PASS-NEXT: Hotness: 401
@@ -36,7 +36,7 @@
3636
; YAML-MISS-NEXT: Function: _Z7caller2v
3737
; YAML-MISS-NEXT: Hotness: 2
3838

39-
; CHECK-RPASS: '_Z7callee1v' inlined into '_Z7caller1v' with (cost=always): benefit over cost at callsite _Z7caller1v:1:10; (hotness: 401)
39+
; CHECK-RPASS: '_Z7callee1v' inlined into '_Z7caller1v' with (cost=-30, threshold=4500) at callsite _Z7caller1v:1:10; (hotness: 401)
4040
; CHECK-RPASS-NOT: '_Z7callee2v' not inlined into '_Z7caller2v' because it should never be inlined (cost=never): noinline function attribute (hotness: 2)
4141

4242
; ModuleID = 'remarks-hotness.cpp'

0 commit comments

Comments
 (0)