This revision was automatically updated to reflect the committed changes.
Closed by commit rL264342: Attach profile summary information to Module.
(authored by eraman).
Changed prior to commit:
http://reviews.llvm.org/D18289?vs=51342&id=51604#toc
Repository:
rL LLVM
http://reviews.llvm.org/
davidxl accepted this revision.
davidxl added a reviewer: davidxl.
davidxl added a comment.
lgtm
http://reviews.llvm.org/D18289
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vsk accepted this revision.
vsk added a comment.
This revision is now accepted and ready to land.
This lgtm.
IMO we'd get the same coverage if the C file contained `void foo() {}`, but
that's just a nit :). It'd be good to follow up with David about what he thinks
is lacking in `general.proftex
eraman added a comment.
Since test case tests this change - that profile summary is attached to the
module - I think it is sufficient. David and Vedant, does this sound reasonable?
http://reviews.llvm.org/D18289
___
cfe-commits mailing list
cfe-com
eraman marked 2 inline comments as done.
Comment at: lib/CodeGen/CodeGenModule.cpp:398-399
@@ -397,3 +397,4 @@
if (PGOReader) {
getModule().setMaximumFunctionCount(PGOReader->getMaximumFunctionCount());
+getModule().setProfileSummary(PGOReader->getSummary().getMD(VMCon
eraman updated this revision to Diff 51342.
eraman added a comment.
Address Vedant's comments
http://reviews.llvm.org/D18289
Files:
lib/CodeGen/CodeGenModule.cpp
test/Profile/Inputs/profile-summary.proftext
test/Profile/profile-summary.c
Index: test/Profile/profile-summary.c
vsk added inline comments.
Comment at: test/Profile/profile-summary.c:5
@@ +4,3 @@
+// RUN: %clang %s -o - -mllvm -disable-llvm-optzns -emit-llvm -S
-fprofile-instr-use=%t.profdata | FileCheck %s
+//
+int begin(int i) {
davidxl wrote:
> vsk wrote:
> > ISTM that a
davidxl added inline comments.
Comment at: lib/CodeGen/CodeGenModule.cpp:398
@@ -397,2 +397,3 @@
if (PGOReader) {
getModule().setMaximumFunctionCount(PGOReader->getMaximumFunctionCount());
+auto *SummaryMD = PGOReader->getSummary().getMD(getModule().getContext());
eraman created this revision.
eraman added a reviewer: vsk.
eraman added subscribers: cfe-commits, davidxl.
This allows optimization passes to make use of detailed profile summary. Once
this is in and the optimization passes are made to use this, the
"MaxFunctionCount" flag will be removed as th
vsk added a comment.
Thanks! Some inline comments --
Comment at: lib/CodeGen/CodeGenModule.cpp:399
@@ -398,1 +398,3 @@
getModule().setMaximumFunctionCount(PGOReader->getMaximumFunctionCount());
+auto *SummaryMD = PGOReader->getSummary().getMD(getModule().getContext());
10 matches
Mail list logo