[PATCH] D57591: fix weights for promoted indirect calls
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 09:29:20 PDT 2019
wmi added a comment.
That is a good improvement. Thanks! I will evaluate how much impact it will have in our benchmarks.
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:850-851
Sum -= C;
+ BlockWeights[DI->getParent()] = C;
+ BlockWeights[I->getParent()] = Sum;
PromotedInsns.insert(I);
----------------
It is better to understand it with a comment.
================
Comment at: test/Transforms/SampleProfile/Inputs/indirect-call2.prof:12-31
+test_direct:3000:0
+ 1: foo_direct:3000
+ 21: 3000
+test_inline_strip:3000:0
+ 1: foo_inline_strip:3000
+ 1: 3000
+test_inline_strip_conflict:3000:0
----------------
Looks like a large part of the profile has not been used. Can we remove them?
================
Comment at: test/Transforms/SampleProfile/indirect-call2.ll:4
+; is sensible (numbers are consistent with flow graph)
+; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/indirect-call2.prof -S | FileCheck %s
+
----------------
Could you add a check for new pass manager?
================
Comment at: test/Transforms/SampleProfile/indirect-call2.ll:72
+!7 = !DILocation(line: 7, scope: !6)
+!8 = distinct !DISubprogram(name: "test_inline_strip", scope: !1, file: !1, line: 8, unit: !0)
+!9 = !DILocation(line: 9, scope: !8)
----------------
Looks like a large part of the metadata are unused. Can we remove them?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57591/new/
https://reviews.llvm.org/D57591
More information about the llvm-commits
mailing list