danielcdh created this revision.
Herald added a subscriber: sanjoy.
With accurate sample profile, we can do more aggressive size optimization. For
some size-critical application, this can reduce the text size by 20%
https://reviews.llvm.org/D37091
Files:
include/clang/Driver/Options.td
lib
danielcdh updated this revision to Diff 112496.
danielcdh added a comment.
add document and test
https://reviews.llvm.org/D37091
Files:
docs/ClangCommandLineReference.rst
include/clang/Driver/Options.td
lib/Driver/ToolChains/Clang.cpp
test/Driver/clang_f_opts.c
Index: test/Driver/clan
danielcdh updated this revision to Diff 112574.
danielcdh marked 2 inline comments as done.
danielcdh added a comment.
updated the patch to put it into function attribute so that it works with
ThinLTO
https://reviews.llvm.org/D37091
Files:
docs/ClangCommandLineReference.rst
include/clang/D
danielcdh updated this revision to Diff 112597.
danielcdh marked 3 inline comments as done.
danielcdh added a comment.
update
https://reviews.llvm.org/D37091
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CodeGenFunction.cpp
lib/Driver/ToolC
danielcdh updated this revision to Diff 112601.
danielcdh added a comment.
Herald added subscribers: eraman, mehdi_amini.
Add an end-to-end test.
https://reviews.llvm.org/D37091
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CodeGenFunction.cp
danielcdh updated this revision to Diff 112604.
danielcdh marked an inline comment as done.
danielcdh added a comment.
update
https://reviews.llvm.org/D37091
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/CodeGenFunction.cpp
lib/Driver/ToolC
danielcdh accepted this revision.
danielcdh added a comment.
This revision is now accepted and ready to land.
Thanks for the fix.
https://reviews.llvm.org/D39923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/m
danielcdh reopened this revision.
danielcdh added a comment.
This revision is now accepted and ready to land.
was reverted due to bot breaking
https://reviews.llvm.org/D27744
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.
danielcdh updated this revision to Diff 81609.
danielcdh added a comment.
update option name
https://reviews.llvm.org/D25435
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/Driver/Tools.cpp
danielcdh created this revision.
danielcdh added reviewers: tejohnson, mehdi_amini, davidxl.
danielcdh added a subscriber: cfe-commits.
ThinLTO needs to pass down the sample profile file path to linker.
https://reviews.llvm.org/D27832
Files:
lib/Driver/Tools.cpp
Index: lib/Driver/Tools.cpp
danielcdh updated this revision to Diff 81759.
danielcdh added a comment.
add a test.
https://reviews.llvm.org/D27832
Files:
lib/Driver/Tools.cpp
test/Driver/gold-lto-samplepgo.c
Index: test/Driver/gold-lto-samplepgo.c
===
--
danielcdh added a comment.
ping...
Thanks,
Dehao
https://reviews.llvm.org/D25435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielcdh updated this revision to Diff 82975.
danielcdh added a comment.
fix function name
https://reviews.llvm.org/D27832
Files:
lib/Driver/Tools.cpp
test/Driver/gold-lto-samplepgo.c
Index: test/Driver/gold-lto-samplepgo.c
danielcdh added a comment.
Thanks David for the reivew.
Could you also help take a look at https://reviews.llvm.org/D25434, as it
depends on the TargetOptions.h change in that patch.
Thanks,
Dehao
https://reviews.llvm.org/D25435
___
cfe-commits m
danielcdh created this revision.
danielcdh added reviewers: tejohnson, mehdi_amini.
danielcdh added a subscriber: cfe-commits.
LTO backend will not invoke SampleProfileLoader pass even if
-fprofile-sample-use is specified. This patch passes the flag down so that pass
manager can add the SamplePr
danielcdh created this revision.
Herald added subscribers: Prazek, mehdi_amini.
Because SamplePGO passes will be invoked twice in ThinLTO build: once at
compile phase, the other at backend. We want to make sure the IR at the 2nd
phase matches the hot part in pro
file, thus we do not want to inli
danielcdh created this revision.
We need to be able to disable samplepgo for specific files by supporting
-fno-auto-profile and -fno-profile-sample-use
https://reviews.llvm.org/D31213
Files:
include/clang/Driver/Options.td
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/CommonArgs.
danielcdh updated this revision to Diff 92554.
danielcdh added a comment.
add more test
https://reviews.llvm.org/D31213
Files:
include/clang/Driver/Options.td
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/CommonArgs.cpp
lib/Driver/ToolChains/CommonArgs.h
test/Driver/clang_f_op
danielcdh created this revision.
Herald added a subscriber: Prazek.
This is the test added for https://reviews.llvm.org/D31217
https://reviews.llvm.org/D31219
Files:
test/CodeGen/Inputs/pgo-sample-thinlto-summary.prof
test/CodeGen/pgo-sample-thinlto-summary.c
Index: test/CodeGen/pgo-sampl
danielcdh reopened this revision.
danielcdh added a comment.
This revision is now accepted and ready to land.
The breaks some buildbots thus I reverted the patch:
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/1889
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incr
danielcdh added a comment.
Thanks for the prompt response.
But looks like several other tests also has "-mllvm -debug-pass=Structure" in
their tests:
tools/clang/test/CodeGen/pgo-instrumentation.c
test/CodeGen/Generic/llc-start-stop.ll
I just verified that if I cmake with -DCMAKE_BUILD_TYPE=Re
danielcdh updated this revision to Diff 84193.
danielcdh added a comment.
Updates the unittests to clang_cc1 to see if it fixes the buildbot failure.
https://reviews.llvm.org/D28588
Files:
lib/CodeGen/BackendUtil.cpp
test/CodeGen/thinlto_backend.ll
Index: test/CodeGen/thinlto_backend.ll
=
danielcdh added a comment.
Looks like this is still breaking these buildbots:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3216/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Athinlto_backend.ll
I reverted the test change for now, and am thinking of how to reproduce/fix the
pr
danielcdh created this revision.
Herald added a subscriber: mehdi_amini.
cfe change for https://reviews.llvm.org/D29203
https://reviews.llvm.org/D29205
Files:
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CodeGenFunction.cpp
Index: lib/CodeGen/CodeGenFunction.cpp
===
danielcdh updated this revision to Diff 86058.
danielcdh added a comment.
change to use module flag.
https://reviews.llvm.org/D29205
Files:
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CodeGenModule.cpp
Index: lib/CodeGen/CodeGenModule.cpp
==
danielcdh added inline comments.
Comment at: lib/CodeGen/CodeGenModule.cpp:452
+ if (CodeGenOpts.DebugInfoForProfiling)
+getModule().addModuleFlag(llvm::Module::Warning, "DebugInfoForProfiling",
1);
mehdi_amini wrote:
> Why should we warn on mismatch?
In
danielcdh updated this revision to Diff 86292.
danielcdh added a comment.
update
https://reviews.llvm.org/D29205
Files:
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGDebugInfo.cpp
Index: lib/CodeGen/CGDebugInfo.cpp
===
--- lib/Co
danielcdh updated this revision to Diff 104199.
danielcdh added a comment.
update comments
https://reviews.llvm.org/D34663
Files:
test/CodeGen/pgo-sample-thinlto-summary.c
Index: test/CodeGen/pgo-sample-thinlto-summary.c
===
--
danielcdh added inline comments.
Comment at: test/CodeGen/pgo-sample-thinlto-summary.c:39
+// O2: if.true.direct_targ
// ThinLTO-NOT: if.true.direct_targ
void icp(void (*p)()) {
davidxl wrote:
> Is the thinLTO behavior here expected?
Yes, it's expected, icp is
danielcdh created this revision.
Herald added subscribers: eraman, mehdi_amini, sanjoy.
This implements the clang bits of https://reviews.llvm.org/D34720, and add
corresponding test to verify if it worked.
https://reviews.llvm.org/D34721
Files:
lib/CodeGen/BackendUtil.cpp
test/CodeGen/pgo-
danielcdh added inline comments.
Comment at: test/CodeGen/pgo-sample-thinlto-summary.c:4
+// RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager
-fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o
- 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO
+// RUN
danielcdh created this revision.
Herald added a subscriber: sanjoy.
The patch makes the integration test cover major sample PGO components.
https://reviews.llvm.org/D34725
Files:
test/CodeGen/Inputs/pgo-sample.prof
test/CodeGen/pgo-sample.c
Index: test/CodeGen/pgo-sample.c
===
danielcdh created this revision.
Herald added subscribers: eraman, inglorion, mehdi_amini, sanjoy.
This patch should be enabled after https://reviews.llvm.org/D34895
https://reviews.llvm.org/D34896
Files:
test/CodeGen/pgo-sample-thinlto-summary.c
Index: test/CodeGen/pgo-sample-thinlto-summa
danielcdh added inline comments.
Comment at: test/CodeGen/pgo-sample.c:28
+// of foo:bar.
+// CHECK-NOT: call void @callee
+void foo(int x) {
davidxl wrote:
> SHould this be 'CHECK-NOT: call' as bar is also inlined?
There is still call to baz. Explicitly added
danielcdh updated this revision to Diff 105705.
danielcdh marked an inline comment as done.
danielcdh added a comment.
Integrate David's comment and add new PM test.
https://reviews.llvm.org/D34725
Files:
test/CodeGen/Inputs/pgo-sample.prof
test/CodeGen/pgo-sample.c
Index: test/CodeGen/pg
danielcdh created this revision.
Herald added a subscriber: sanjoy.
Frontend change for https://reviews.llvm.org/D35148
https://reviews.llvm.org/D35153
Files:
lib/CodeGen/BackendUtil.cpp
Index: lib/CodeGen/BackendUtil.cpp
===
-
danielcdh reopened this revision.
danielcdh added a comment.
This revision is now accepted and ready to land.
the patch was reverted as it breaks on certain platforms (e.g.
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/10088/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Apgo-sampl
danielcdh created this revision.
Herald added a subscriber: sanjoy.
The new PM needs to invoke add-discriminator pass when building with
-fdebug-info-for-profiling.
https://reviews.llvm.org/D35746
Files:
lib/CodeGen/BackendUtil.cpp
Index: lib/CodeGen/BackendUtil.cpp
===
danielcdh updated this revision to Diff 108174.
danielcdh added a comment.
update
https://reviews.llvm.org/D35746
Files:
lib/CodeGen/BackendUtil.cpp
Index: lib/CodeGen/BackendUtil.cpp
===
--- lib/CodeGen/BackendUtil.cpp
+++ lib
danielcdh updated this revision to Diff 108316.
danielcdh marked an inline comment as done.
danielcdh added a comment.
update
https://reviews.llvm.org/D35746
Files:
lib/CodeGen/BackendUtil.cpp
Index: lib/CodeGen/BackendUtil.cpp
===
danielcdh marked 2 inline comments as done.
danielcdh added inline comments.
Comment at: lib/CodeGen/BackendUtil.cpp:847-859
if (PGOOpt.RunProfileGen)
PGOOpt.ProfileGenFile = CodeGenOpts.InstrProfileOutput.empty() ?
DefaultProfileGenName : CodeGenOpts.InstrProfileO
danielcdh marked an inline comment as done.
danielcdh added a comment.
Thanks for the review!
In https://reviews.llvm.org/D35746#822498, @chandlerc wrote:
> LGTM with a tiny tweak below.
>
> Would be good to add a test that this flag is being honored, either in this
> patch or in a follow-up.
danielcdh created this revision.
AddDiscriminator pass is only useful for sample pgo. This patch restricts
AddDiscriminator to -fdebug-info-for-profiling so that it does not introduce
unecessary debug size increases for non-sample-pgo builds.
https://reviews.llvm.org/D30220
Files:
lib/CodeG
danielcdh updated this revision to Diff 89258.
danielcdh added a comment.
update
https://reviews.llvm.org/D30220
Files:
lib/CodeGen/BackendUtil.cpp
test/CodeGenObjC/arc-linetable-autorelease.m
Index: test/CodeGenObjC/arc-linetable-autorelease.m
danielcdh added a comment.
You are right, only discriminator is needed, the encoding and emission part
should be orthogonal. Patch updated.
https://reviews.llvm.org/D30220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.or
danielcdh updated this revision to Diff 79629.
danielcdh marked an inline comment as done.
danielcdh added a comment.
Change the flag to -fprof-debug, which is more concise. The flag name is still
open for discussion.
https://reviews.llvm.org/D25435
Files:
include/clang/Driver/Options.td
i
danielcdh updated this revision to Diff 79770.
danielcdh added a comment.
change the flag name to -fprofile-debug
https://reviews.llvm.org/D25435
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGDebugInfo.cpp
li
danielcdh added a comment.
ping
https://reviews.llvm.org/D25435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
danielcdh added inline comments.
Comment at: lib/CodeGen/CGDebugInfo.cpp:2743-2745
if (LinkageName == Name || (!CGM.getCodeGenOpts().EmitGcovArcs &&
!CGM.getCodeGenOpts().EmitGcovNotes &&
+ !CGM.getCodeGenOpts().Profi
danielcdh added inline comments.
Comment at: lib/CodeGen/CGDebugInfo.cpp:2743-2745
if (LinkageName == Name || (!CGM.getCodeGenOpts().EmitGcovArcs &&
!CGM.getCodeGenOpts().EmitGcovNotes &&
+ !CGM.getCodeGenOpts().Profi
danielcdh added a comment.
In https://reviews.llvm.org/D25435#619169, @hfinkel wrote:
> In https://reviews.llvm.org/D25435#609320, @danielcdh wrote:
>
> > change the flag name to -fprofile-debug
>
>
> I don't really like this name because it sounds like it might be enabling
> some kind of debugg
danielcdh created this revision.
danielcdh added reviewers: dnovillo, tejohnson, davidxl.
danielcdh added a subscriber: cfe-commits.
Herald added a subscriber: mehdi_amini.
We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO
unable to add this pass in the linker plugin. Th
52 matches
Mail list logo