Re: [PATCH] D104099: [NewPM] Remove SpeculateAroundPHIs pass from pipeline

2021-06-14 Thread Xinliang David Li via cfe-commits
On Mon, Jun 14, 2021 at 3:59 PM Roman Lebedev via Phabricator < revi...@reviews.llvm.org> wrote: > lebedev.ri added a subscriber: MaskRay. > lebedev.ri added a comment. > > In D104099#2815531 , @wenlei > wrote: > > > In D104099#2814167

Re: [PATCH] D84261: [PGO] Supporting code for always instrumenting entry block

2020-08-17 Thread Xinliang David Li via cfe-commits
I think you are right -- the two files need to be in sync. On Mon, Aug 17, 2020 at 1:17 PM Pavel Kosov via Phabricator via llvm-commits wrote: > kpdev42 added inline comments. > > > > Comment at: llvm/include/llvm/ProfileData/InstrProfData.inc:676 > #define VARIANT_MASK_CSIR_PR

Re: [PATCH] D84782: [PGO] Include the mem ops into the function hash.

2020-07-29 Thread Xinliang David Li via cfe-commits
right. It occurred to me during review, but did not think of the hard coded values in proftext depends on LE. On Wed, Jul 29, 2020 at 3:04 PM Hiroshi Yamauchi via Phabricator < revi...@reviews.llvm.org> wrote: > yamauchi added a comment. > > Builtbot failure: > http://lab.llvm.org:8011/builders/c

Re: [PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-28 Thread Xinliang David Li via cfe-commits
I agree that the test coverage needs to be improved eg better check etc. David On Fri, Jun 28, 2019 at 5:21 PM Chandler Carruth via Phabricator via llvm-commits wrote: > chandlerc added a comment. > > In D63155#1563275 , @xur wrote: > > > In D63155#156

Re: [PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-06-25 Thread Xinliang David Li via cfe-commits
I don't have an objection having another interface which is just a simple wrapper to __gcov_flush but with default visibility. Also clearly document its usage and behavior. David On Mon, Jun 25, 2018 at 10:12 AM, Chih-Hung Hsieh via Phabricator via llvm-commits wrote: > chh added a comment. > >

Re: [PATCH] D45454: Make __gcov_flush visible outside a shared library

2018-04-11 Thread Xinliang David Li via cfe-commits
On Wed, Apr 11, 2018 at 11:31 AM, Chih-Hung Hsieh via Phabricator via llvm-commits wrote: > chh added a comment. > > Yes, calling `__gcov_flush` within .so files are different, > but it's a revert of https://reviews.llvm.org/D38124. > I think https://bugs.llvm.org/show_bug.cgi?id=27224 > can be

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-09-04 Thread Xinliang David Li via cfe-commits
On Mon, Sep 4, 2017 at 1:57 AM, Chandler Carruth wrote: > On Sun, Sep 3, 2017 at 10:41 PM Hal Finkel via llvm-commits < > llvm-comm...@lists.llvm.org> wrote: > >> Nevertheless, I think that you've convinced me that this is a least-bad >> solution. I'll want a flag preserving the old behavior. Som

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-09-04 Thread Xinliang David Li via cfe-commits
On Mon, Sep 4, 2017 at 9:17 AM, Hal Finkel wrote: > > On 09/04/2017 03:57 AM, Chandler Carruth wrote: > > On Sun, Sep 3, 2017 at 10:41 PM Hal Finkel via llvm-commits < > llvm-comm...@lists.llvm.org> wrote: > >> Nevertheless, I think that you've convinced me that this is a least-bad >> solution. I

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-09-03 Thread Xinliang David Li via cfe-commits
On Sun, Sep 3, 2017 at 9:23 PM, Hal Finkel wrote: > > On 09/03/2017 11:06 PM, Xinliang David Li wrote: > > I think we can think this in another way. > > For modern CPU architectures which supports store forwarding with store > queues, it is generally not "safe" to blindly do local optimizations t

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-09-03 Thread Xinliang David Li via cfe-commits
I think we can think this in another way. For modern CPU architectures which supports store forwarding with store queues, it is generally not "safe" to blindly do local optimizations to widen the load/stores without sophisticated inter-procedural analysis. Doing so will run the risk of greatly red

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-09-03 Thread Xinliang David Li via cfe-commits
Store forwarding stall cost is usually much higher compared with a load hitting L1 cache. For instance, on Haswell, the latter is ~4 cycles, while the store forwarding stalls cost about 10 cycles more than a successful store forwarding, which is roughly 15 cycles. In some scenarios, the store forw

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-08-22 Thread Xinliang David Li via cfe-commits
lists.llvm.org> wrote: >> >>> On Tue, Aug 22, 2017 at 7:03 PM Xinliang David Li via cfe-commits < >>> cfe-commits@lists.llvm.org> wrote: >>> >>>> On Tue, Aug 22, 2017 at 6:37 PM, Chandler Carruth via Phabricator < >>>> revi...@revi

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-08-22 Thread Xinliang David Li via cfe-commits
On Tue, Aug 22, 2017 at 7:10 PM, Chandler Carruth via llvm-commits < llvm-comm...@lists.llvm.org> wrote: > On Tue, Aug 22, 2017 at 7:03 PM Xinliang David Li via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Tue, Aug 22, 2017 at 6:37 PM, Chandler Carrut

Re: [PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2017-08-22 Thread Xinliang David Li via cfe-commits
On Tue, Aug 22, 2017 at 6:37 PM, Chandler Carruth via Phabricator < revi...@reviews.llvm.org> wrote: > chandlerc added a comment. > > I'm really not a fan of the degree of complexity and subtlety that this > introduces into the frontend, all to allow particular backend optimizations. > > I feel li

r305325 - Preserve cold attribute for function decls

2017-06-13 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Tue Jun 13 16:14:07 2017 New Revision: 305325 URL: http://llvm.org/viewvc/llvm-project?rev=305325&view=rev Log: Preserve cold attribute for function decls Differential Revision: http://reviews.llvm.org/D34133 Modified: cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trunk/te

r300304 - Fix use after free error

2017-04-13 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Apr 13 23:14:29 2017 New Revision: 300304 URL: http://llvm.org/viewvc/llvm-project?rev=300304&view=rev Log: Fix use after free error Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp URL: http://llvm.org/v

r300301 - Remove unused function /nfc

2017-04-13 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Apr 13 22:01:25 2017 New Revision: 300301 URL: http://llvm.org/viewvc/llvm-project?rev=300301&view=rev Log: Remove unused function /nfc Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp URL: http://llvm.or

r300279 - [Profile] PE binary coverage bug fix

2017-04-13 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Apr 13 18:37:21 2017 New Revision: 300279 URL: http://llvm.org/viewvc/llvm-project?rev=300279&view=rev Log: [Profile] PE binary coverage bug fix PR/32584 Differential Revision: https://reviews.llvm.org/D32023 Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp

r276517 - [Profile] Use a flag to enable PGO rather than the profraw filename

2016-07-22 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Fri Jul 22 23:28:59 2016 New Revision: 276517 URL: http://llvm.org/viewvc/llvm-project?rev=276517&view=rev Log: [Profile] Use a flag to enable PGO rather than the profraw filename Patch by Jake VanAdrighem Differential Revision: http://reviews.llvm.org/D22608 Modified:

r276484 - [Profile] Enable profile merging with -fprofile-generat[=]

2016-07-22 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Fri Jul 22 17:25:01 2016 New Revision: 276484 URL: http://llvm.org/viewvc/llvm-project?rev=276484&view=rev Log: [Profile] Enable profile merging with -fprofile-generat[=] This patch enables raw profile merging for this option which is the new intended behavior. Modified:

r276356 - [profile] update test case with interface change.

2016-07-21 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Jul 21 18:19:39 2016 New Revision: 276356 URL: http://llvm.org/viewvc/llvm-project?rev=276356&view=rev Log: [profile] update test case with interface change. See http://reviews.llvm.org/D22613, http://reviews.llvm.org/D22614 Modified: cfe/trunk/test/Profile/c-genera

Re: [PATCH] D22593: [Profile] document %h and %m

2016-07-20 Thread Xinliang David Li via cfe-commits
ok David On Wed, Jul 20, 2016 at 4:32 PM, Sean Silva wrote: > silvas accepted this revision. > silvas added a comment. > This revision is now accepted and ready to land. > > LGTM (also, another small suggestion). > > > > Comment at: docs/UsersManual.rst:1502 > @@ +1501,3 @@ > +

r276207 - [Profile] Document new profile file name modifiers

2016-07-20 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Wed Jul 20 18:32:50 2016 New Revision: 276207 URL: http://llvm.org/viewvc/llvm-project?rev=276207&view=rev Log: [Profile] Document new profile file name modifiers Differential Revision: http://reviews.llvm.org/D22593 Modified: cfe/trunk/docs/UsersManual.rst Modified:

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-19 Thread Xinliang David Li via cfe-commits
On Tue, Jul 19, 2016 at 5:06 PM, Vedant Kumar wrote: > > > On Jul 19, 2016, at 5:01 PM, Xinliang David Li > wrote: > > > > The new behavior works really well. There is one follow up change I > would like to discuss. > > > > The EQ form of the option -fprofile-generate= takes a directory name as

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-19 Thread Xinliang David Li via cfe-commits
The new behavior works really well. There is one follow up change I would like to discuss. The EQ form of the option -fprofile-generate= takes a directory name as the argument instead of the filename. Currently the compiler will create a default 'default.profraw' name for it, but this means, onlin

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-08 Thread Xinliang David Li via cfe-commits
On Sun, Jul 3, 2016 at 1:50 PM, Sean Silva wrote: > > > On Sat, Jul 2, 2016 at 7:38 PM, Xinliang David Li > wrote: > >> Sanitizers are different IMO. Different santizers are rather independent, >> and there is no such thing as -fsantize to mean -fsantize=all >> >> For PGO, in most of the cases,

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-02 Thread Xinliang David Li via cfe-commits
Sanitizers are different IMO. Different santizers are rather independent, and there is no such thing as -fsantize to mean -fsantize=all For PGO, in most of the cases, users do not need to care about the sub-options implied -- by default they should just get the best profiling (whatever that is). F

Re: [PATCH] D21823: [Driver] Add flags for enabling both types of PGO Instrumentation

2016-07-02 Thread Xinliang David Li via cfe-commits
On Fri, Jul 1, 2016 at 4:32 PM, Sean Silva wrote: > silvas added inline comments. > > > Comment at: lib/Driver/Tools.cpp:3560 > @@ +3559,3 @@ > +if (PGOTrainArg->getOption().matches(options::OPT_fpgo_train_EQ)) { > + if (StringRef(PGOTrainArg->getValue()) == "source-cfg"

r270728 - Use new triple API to check comdat /NFC

2016-05-25 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Wed May 25 12:25:57 2016 New Revision: 270728 URL: http://llvm.org/viewvc/llvm-project?rev=270728&view=rev Log: Use new triple API to check comdat /NFC Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp URL: http://llvm.org/vi

Re: [PATCH] D18624: [PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name.

2016-04-19 Thread Xinliang David Li via cfe-commits
Can you also try IR based instrumentation? -fprofile-instr-generate -Xclang=-fprofile-instrument=llvm David On Tue, Apr 19, 2016 at 9:40 AM, Adam Nemet wrote: > anemet added a comment. > > As discussed under http://reviews.llvm.org/D17864, I did a run with this > and I don't get the indirect c

r266638 - Update InstrProf pass creator API reference

2016-04-18 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Mon Apr 18 12:48:12 2016 New Revision: 266638 URL: http://llvm.org/viewvc/llvm-project?rev=266638&view=rev Log: Update InstrProf pass creator API reference Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp URL: http://llvm.

Re: [PATCH] D18489: [PGO, clang] Comment how function pointers for indirect calls are mapped to function names

2016-03-28 Thread Xinliang David Li via cfe-commits
Sure. thanks, David On Mon, Mar 28, 2016 at 12:41 PM, Adam Nemet wrote: > anemet added a comment. > > In http://reviews.llvm.org/D18489#384851, @davidxl wrote: > > > What I meant is that putting the comments in InstrProfData.inc file, and > > update the one in CodeGenPGO.cpp to reference that

Re: [PATCH] D18489: [PGO, clang] Comment how function pointers for indirect calls are mapped to function names

2016-03-28 Thread Xinliang David Li via cfe-commits
What I meant is that putting the comments in InstrProfData.inc file, and update the one in CodeGenPGO.cpp to reference that. David On Mon, Mar 28, 2016 at 12:35 PM, Xinliang David Li wrote: > > > On Mon, Mar 28, 2016 at 12:31 PM, Adam Nemet wrote: > >> anemet added inline comments. >> >> =

Re: [PATCH] D18489: [PGO, clang] Comment how function pointers for indirect calls are mapped to function names

2016-03-28 Thread Xinliang David Li via cfe-commits
On Mon, Mar 28, 2016 at 12:31 PM, Adam Nemet wrote: > anemet added inline comments. > > > Comment at: lib/CodeGen/CodeGenPGO.cpp:758 > @@ -757,1 +757,3 @@ > > + // During instrumentation, function pointers are collected for the > different > + // indirect call targets. Then as

Re: [PATCH] D18489: [PGO, clang] Comment how function pointers for indirect calls are mapped to function names

2016-03-28 Thread Xinliang David Li via cfe-commits
On Mon, Mar 28, 2016 at 10:40 AM, Adam Nemet wrote: > anemet added inline comments. > > > Comment at: lib/CodeGen/CodeGenPGO.cpp:758 > @@ -757,1 +757,3 @@ > > + // During instrumentation, function pointers are collected for the > different > + // indirect call targets. Then as

r261047 - Test simplification

2016-02-16 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Tue Feb 16 18:59:01 2016 New Revision: 261047 URL: http://llvm.org/viewvc/llvm-project?rev=261047&view=rev Log: Test simplification Modified: cfe/trunk/test/Profile/def-assignop.cpp Modified: cfe/trunk/test/Profile/def-assignop.cpp URL: http://llvm.org/viewvc/llvm-proj

r261046 - Restrengthen tests relaxed in r259955

2016-02-16 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Tue Feb 16 18:58:13 2016 New Revision: 261046 URL: http://llvm.org/viewvc/llvm-project?rev=261046&view=rev Log: Restrengthen tests relaxed in r259955 Modified: cfe/trunk/test/CoverageMapping/ir.c cfe/trunk/test/CoverageMapping/unused_names.c Modified: cfe/trunk/test

r260270 - [PGO] Fix issue: explicitly defaulted assignop is not profiled

2016-02-09 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Tue Feb 9 14:02:59 2016 New Revision: 260270 URL: http://llvm.org/viewvc/llvm-project?rev=260270&view=rev Log: [PGO] Fix issue: explicitly defaulted assignop is not profiled Differential Revision: http://reviews.llvm.org/D16947 Added: cfe/trunk/test/Profile/def-as

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-09 Thread Xinliang David Li via cfe-commits
On Tue, Feb 9, 2016 at 11:44 AM, David Blaikie wrote: > > > On Tue, Feb 9, 2016 at 11:41 AM, Xinliang David Li > wrote: >> >> On Tue, Feb 9, 2016 at 11:30 AM, David Blaikie wrote: >> > >> > >> > On Tue, Feb 9, 2016 at 11:26 AM, Xinliang David Li >> > wrote: >> >> >> >> On Tue, Feb 9, 2016 at 11

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-09 Thread Xinliang David Li via cfe-commits
On Tue, Feb 9, 2016 at 11:30 AM, David Blaikie wrote: > > > On Tue, Feb 9, 2016 at 11:26 AM, Xinliang David Li > wrote: >> >> On Tue, Feb 9, 2016 at 11:14 AM, David Blaikie wrote: >> > >> > >> > On Mon, Feb 8, 2016 at 9:23 PM, Xinliang David Li >> > wrote: >> >> >> >> Wrong in the sense the the

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-09 Thread Xinliang David Li via cfe-commits
On Tue, Feb 9, 2016 at 11:14 AM, David Blaikie wrote: > > > On Mon, Feb 8, 2016 at 9:23 PM, Xinliang David Li > wrote: >> >> Wrong in the sense the the coverage result for the default operators >> (the line where they are declared) is marked as if they are not called >> which can be confusing to

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
Wrong in the sense the the coverage result for the default operators (the line where they are declared) is marked as if they are not called which can be confusing to the user. David On Mon, Feb 8, 2016 at 9:09 PM, David Blaikie wrote: > > > On Mon, Feb 8, 2016 at 9:00 PM, Xinliang David Li > wr

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
On Mon, Feb 8, 2016 at 8:46 PM, David Blaikie wrote: > > On Mon, Feb 8, 2016 at 7:39 PM, Xinliang David Li > wrote: >> >> I took a look at the problem. The implicitly defaulted operators >> should not be instrumented as specified -- I actually I just added the >> new test case for that (checking

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
I took a look at the problem. The implicitly defaulted operators should not be instrumented as specified -- I actually I just added the new test case for that (checking profile counter not generated) right after my previous reply and it still passes with this patch. The reason is that those operato

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
ha! somehow I kept thinking you are referring to implicit declared ctors. From your test case, it is seems that the implicit copy/move op is also broken and is fixed by this patch too. That means a missing test case to me. Will update the case when verified. thanks, David On Mon, Feb 8, 2016

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
On Mon, Feb 8, 2016 at 4:05 PM, David Blaikie wrote: > > > On Mon, Feb 8, 2016 at 3:58 PM, Xinliang David Li > wrote: >> >> To be clear, you are suggesting breaking the test into two (one for >> copy, and one for move) ? I am totally fine with that. > > > Nah, no need to split the test case - we

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
To be clear, you are suggesting breaking the test into two (one for copy, and one for move) ? I am totally fine with that. I thought you suggested removing the testing of move/op case because they might share the same code path (clang's implementation) as the copy/op. thanks, David On Mon, Feb

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
On Mon, Feb 8, 2016 at 3:35 PM, David Blaikie wrote: > > > On Mon, Feb 8, 2016 at 3:21 PM, Xinliang David Li > wrote: >> >> On Mon, Feb 8, 2016 at 3:17 PM, David Blaikie wrote: >> > >> > >> > On Mon, Feb 8, 2016 at 12:07 PM, Xinliang David Li >> > wrote: >> >> >> >> On Mon, Feb 8, 2016 at 11:39

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
On Mon, Feb 8, 2016 at 3:17 PM, David Blaikie wrote: > > > On Mon, Feb 8, 2016 at 12:07 PM, Xinliang David Li > wrote: >> >> On Mon, Feb 8, 2016 at 11:39 AM, David Blaikie wrote: >> > >> > >> > On Mon, Feb 8, 2016 at 9:25 AM, David Li via llvm-commits >> > wrote: >> >> >> >> davidxl updated thi

r260161 - [PGO] Cover more cases of implicitly generated C++ methods

2016-02-08 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Mon Feb 8 16:41:37 2016 New Revision: 260161 URL: http://llvm.org/viewvc/llvm-project?rev=260161&view=rev Log: [PGO] Cover more cases of implicitly generated C++ methods Modified: cfe/trunk/test/Profile/cxx-implicit.cpp Modified: cfe/trunk/test/Profile/cxx-implicit.cpp

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
On Mon, Feb 8, 2016 at 11:39 AM, David Blaikie wrote: > > > On Mon, Feb 8, 2016 at 9:25 AM, David Li via llvm-commits > wrote: >> >> davidxl updated this revision to Diff 47217. >> davidxl added a comment. >> >> Simplified test case suggested by Vedant. >> >> >> http://reviews.llvm.org/D16947 >>

Re: [PATCH] D16947: [PGO] assignment operator does not get profile data

2016-02-08 Thread Xinliang David Li via cfe-commits
Both cfe-commits and llvm-commits are cc'ed. David On Mon, Feb 8, 2016 at 11:29 AM, David Blaikie wrote: > This looks like a change to clang - could you test it in clang (& review it > on cfe-commits instead of llvm-commits)? > > On Sat, Feb 6, 2016 at 11:57 AM, David Li via cfe-commits > wrote

r260126 - Simplify test cases

2016-02-08 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Mon Feb 8 13:14:14 2016 New Revision: 260126 URL: http://llvm.org/viewvc/llvm-project?rev=260126&view=rev Log: Simplify test cases Modified: cfe/trunk/test/Profile/def-ctors.cpp cfe/trunk/test/Profile/def-dtors.cpp Modified: cfe/trunk/test/Profile/def-ctors.cpp URL

r260022 - Fix test case problem(caused by clang-format

2016-02-06 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sun Feb 7 01:13:18 2016 New Revision: 260022 URL: http://llvm.org/viewvc/llvm-project?rev=260022&view=rev Log: Fix test case problem(caused by clang-format Modified: cfe/trunk/test/Profile/def-ctors.cpp cfe/trunk/test/Profile/def-dtors.cpp Modified: cfe/trunk/test/

r260021 - [PGO] add profile/coverage test cases for defaulted ctor/ctors

2016-02-06 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sun Feb 7 00:57:29 2016 New Revision: 260021 URL: http://llvm.org/viewvc/llvm-project?rev=260021&view=rev Log: [PGO] add profile/coverage test cases for defaulted ctor/ctors Added: cfe/trunk/test/Profile/def-ctors.cpp cfe/trunk/test/Profile/def-dtors.cpp Added: cfe

r259955 - [PGO] Test case update

2016-02-05 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Fri Feb 5 17:36:08 2016 New Revision: 259955 URL: http://llvm.org/viewvc/llvm-project?rev=259955&view=rev Log: [PGO] Test case update Temporarily relax check in test to avoid breakage for format change in LLVM side. Once that is done, the test case will be retighten

r259819 - [PGO] code simplification: use existing VP annotation API /NFC

2016-02-04 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Feb 4 13:54:17 2016 New Revision: 259819 URL: http://llvm.org/viewvc/llvm-project?rev=259819&view=rev Log: [PGO] code simplification: use existing VP annotation API /NFC Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp U

Re: [PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

2016-02-03 Thread Xinliang David Li via cfe-commits
On Wed, Feb 3, 2016 at 12:40 PM, Bob Wilson wrote: > > On Feb 3, 2016, at 12:23 PM, Xinliang David Li wrote: > > On Tue, Feb 2, 2016 at 1:31 PM, Bob Wilson wrote: > > > On Jan 22, 2016, at 1:43 PM, Sean Silva via cfe-commits > wrote: > > silvas added a comment. > > In http://reviews.llvm.org/D1

Re: [PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

2016-02-03 Thread Xinliang David Li via cfe-commits
On Tue, Feb 2, 2016 at 1:31 PM, Bob Wilson wrote: > >> On Jan 22, 2016, at 1:43 PM, Sean Silva via cfe-commits >> wrote: >> >> silvas added a comment. >> >> In http://reviews.llvm.org/D15829#333902, @davidxl wrote: >> >>> For the longer term, one possible solution is to make FE based >>> instrum

Re: [PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

2016-01-28 Thread Xinliang David Li via cfe-commits
On Thu, Jan 28, 2016 at 2:34 PM, Rong Xu wrote: > The previous patch was not good as it failed 58 tests that use > -fprofile-instr-generate as a cc1 option. > > I can see two methods to solve this: > (1) we change all the 58 tests to use -fprofile-instrument=Clang option. My vote is on (1) -- get

r259067 - [PGO] test case cleanups

2016-01-28 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Jan 28 12:25:53 2016 New Revision: 259067 URL: http://llvm.org/viewvc/llvm-project?rev=259067&view=rev Log: [PGO] test case cleanups 1. Make test case more focused and robust by focusing on what to be tested (linkage, icall) -- make it easier to validate 2. Testing link

Re: [PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

2016-01-27 Thread Xinliang David Li via cfe-commits
We first need to nail the use model of the option, and then talk about implementation. To clarify, I think the following should be the way: (assuming the current clang instrumetnation is the default): 1) To turn on clang based instrumentation: -fprofile-instr-generate[=] 2) To turn on clang bas

Re: [PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

2016-01-25 Thread Xinliang David Li via cfe-commits
On Fri, Jan 22, 2016 at 1:43 PM, Sean Silva wrote: > silvas added a comment. > > In http://reviews.llvm.org/D15829#333902, @davidxl wrote: > >> For the longer term, one possible solution is to make FE based >> instrumentation only used for coverage testing which can be turned on >> with -fcovera

Re: [PATCH] D15829: [PGO] Clang Option that enables IR level PGO instrumentation

2016-01-22 Thread Xinliang David Li via cfe-commits
For the longer term, one possible solution is to make FE based instrumentation only used for coverage testing which can be turned on with -fcoverage-mapping option (currently, -fcoverage-mapping can not be used alone and must be used together with -fprofile-instr-generate). To summarize: A. Curren

r258261 - Reference the updated function name /NFC

2016-01-19 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Tue Jan 19 18:24:52 2016 New Revision: 258261 URL: http://llvm.org/viewvc/llvm-project?rev=258261&view=rev Log: Reference the updated function name /NFC Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp URL: h

r258106 - Fix local variable name /NFC

2016-01-18 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Mon Jan 18 18:49:06 2016 New Revision: 258106 URL: http://llvm.org/viewvc/llvm-project?rev=258106&view=rev Log: Fix local variable name /NFC Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp cfe/trunk/lib/CodeGen/CoverageMappingGen.h Modified: cfe/trunk/lib/Cod

r256714 - [PGO] Cleanup: Use covmap header definition in the template file

2016-01-03 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sun Jan 3 13:25:54 2016 New Revision: 256714 URL: http://llvm.org/viewvc/llvm-project?rev=256714&view=rev Log: [PGO] Cleanup: Use covmap header definition in the template file This is one last remaining instrumentatation related structure that needs to be migrate to use the

r255587 - [PGO] make profile prefix even shorter and more readable

2015-12-14 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Mon Dec 14 18:33:12 2015 New Revision: 255587 URL: http://llvm.org/viewvc/llvm-project?rev=255587&view=rev Log: [PGO] make profile prefix even shorter and more readable Modified: cfe/trunk/test/CoverageMapping/ir.c cfe/trunk/test/CoverageMapping/unused_names.c cf

r255576 - [PGO] Shorten profile symbol prefixes

2015-12-14 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Mon Dec 14 17:26:46 2015 New Revision: 255576 URL: http://llvm.org/viewvc/llvm-project?rev=255576&view=rev Log: [PGO] Shorten profile symbol prefixes (test case update) Profile symbols have long prefixes which waste space and creating pressure for linker. This patch shorten

Re: [PATCH] D15163: Attach maximum function count to Module when using PGO mode.

2015-12-14 Thread Xinliang David Li via cfe-commits
On Fri, Dec 11, 2015 at 6:19 PM, Justin Bogner wrote: > Easwaran Raman writes: >> eraman updated this revision to Diff 42549. >> eraman added a comment. >> >> Added a test case. >> >> >> Repository: >> rL LLVM >> >> http://reviews.llvm.org/D15163 >> >> Files: >> lib/CodeGen/CodeGenModule.cpp

Re: [PATCH] D15163: Attach maximum function count to Module when using PGO mode.

2015-12-14 Thread Xinliang David Li via cfe-commits
On Fri, Dec 11, 2015 at 6:19 PM, Justin Bogner wrote: > Easwaran Raman writes: >> eraman updated this revision to Diff 42549. >> eraman added a comment. >> >> Added a test case. >> >> >> Repository: >> rL LLVM >> >> http://reviews.llvm.org/D15163 >> >> Files: >> lib/CodeGen/CodeGenModule.cpp

r255447 - Revert r255445: adding a new test case

2015-12-12 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sat Dec 12 22:45:49 2015 New Revision: 255447 URL: http://llvm.org/viewvc/llvm-project?rev=255447&view=rev Log: Revert r255445: adding a new test case Removed: cfe/trunk/test/Profile/cxx-static.cpp Removed: cfe/trunk/test/Profile/cxx-static.cpp URL: http://llvm.org/vie

r255445 - Resubmit new test case after adding more constraint

2015-12-12 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sat Dec 12 21:03:35 2015 New Revision: 255445 URL: http://llvm.org/viewvc/llvm-project?rev=255445&view=rev Log: Resubmit new test case after adding more constraint Added: cfe/trunk/test/Profile/cxx-static.cpp Added: cfe/trunk/test/Profile/cxx-static.cpp URL: http://llv

r255437 - Revert 255436 : remove test that needs to be refined

2015-12-12 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sat Dec 12 12:49:37 2015 New Revision: 255437 URL: http://llvm.org/viewvc/llvm-project?rev=255437&view=rev Log: Revert 255436 : remove test that needs to be refined Removed: cfe/trunk/test/Profile/cxx-static.cpp Removed: cfe/trunk/test/Profile/cxx-static.cpp URL: http:

r255436 - [PGO] add a test case with -no-integrated-as

2015-12-12 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sat Dec 12 11:39:38 2015 New Revision: 255436 URL: http://llvm.org/viewvc/llvm-project?rev=255436&view=rev Log: [PGO] add a test case with -no-integrated-as Added: cfe/trunk/test/Profile/cxx-static.cpp Added: cfe/trunk/test/Profile/cxx-static.cpp URL: http://llvm.org/v

r255435 - [PGO] Stop using invalid char in instr variable names.

2015-12-12 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sat Dec 12 11:28:37 2015 New Revision: 255435 URL: http://llvm.org/viewvc/llvm-project?rev=255435&view=rev Log: [PGO] Stop using invalid char in instr variable names. (This is part-2 of the patch of r255434 -- fixing test cases, second try) Modified: cfe/trunk/test/Co

r255368 - [PGO] Revert r255366: solution incomplete, not handling lambda yet

2015-12-11 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Fri Dec 11 14:23:12 2015 New Revision: 255368 URL: http://llvm.org/viewvc/llvm-project?rev=255368&view=rev Log: [PGO] Revert r255366: solution incomplete, not handling lambda yet Modified: cfe/trunk/test/CoverageMapping/unused_names.c cfe/trunk/test/Profile/Inputs/c-

r255366 - [PGO] Stop using invalid char in instr variable names.

2015-12-11 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Fri Dec 11 13:53:35 2015 New Revision: 255366 URL: http://llvm.org/viewvc/llvm-project?rev=255366&view=rev Log: [PGO] Stop using invalid char in instr variable names. (This is part-2 of the patch -- fixing test cases) Before the patch, -fprofile-instr-generate compile will

r255326 - [PGO] Add a test case to cover version-3 format

2015-12-10 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Dec 10 22:02:57 2015 New Revision: 255326 URL: http://llvm.org/viewvc/llvm-project?rev=255326&view=rev Log: [PGO] Add a test case to cover version-3 format Added: cfe/trunk/test/Profile/Inputs/c-general.profdata.v3 (with props) Modified: cfe/trunk/test/Profile/

r254839 - Pass profile version info to name API (NFC)

2015-12-04 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Fri Dec 4 23:37:15 2015 New Revision: 254839 URL: http://llvm.org/viewvc/llvm-project?rev=254839&view=rev Log: Pass profile version info to name API (NFC) Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp URL: http://llvm.or

r253886 - Disable frame pointer elimination when using -pg

2015-11-23 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Mon Nov 23 11:30:31 2015 New Revision: 253886 URL: http://llvm.org/viewvc/llvm-project?rev=253886&view=rev Log: Disable frame pointer elimination when using -pg (Re-apply patch after bug fixing) This diff makes sure that the driver does not pass -fomit-frame-pointer or -mo

r253851 - Revert r253846 (build bot failure))

2015-11-22 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sun Nov 22 23:41:05 2015 New Revision: 253851 URL: http://llvm.org/viewvc/llvm-project?rev=253851&view=rev Log: Revert r253846 (build bot failure)) Removed: cfe/trunk/test/CodeGen/x86_64-profiling-keep-fp.c Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/lib/F

r253846 - Disable frame pointer elimination when using -pg

2015-11-22 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sun Nov 22 23:09:10 2015 New Revision: 253846 URL: http://llvm.org/viewvc/llvm-project?rev=253846&view=rev Log: Disable frame pointer elimination when using -pg This diff makes sure that the driver does not pass -fomit-frame-pointer or -momit-leaf-frame-pointer to the fronte

r252434 - [PGO] Code cleanup [NFC]

2015-11-08 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Sun Nov 8 18:04:16 2015 New Revision: 252434 URL: http://llvm.org/viewvc/llvm-project?rev=252434&view=rev Log: [PGO] Code cleanup [NFC] Use interfaces defined in LLVM to create FuncName and FuncNameVar. Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Modified: cfe/trun

r252147 - Use profile data template file for covmap func record (NFC)

2015-11-04 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Wed Nov 4 23:46:39 2015 New Revision: 252147 URL: http://llvm.org/viewvc/llvm-project?rev=252147&view=rev Log: Use profile data template file for covmap func record (NFC) Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMap

r251611 - Fix a soon to be invalid test

2015-10-28 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Wed Oct 28 23:04:07 2015 New Revision: 251611 URL: http://llvm.org/viewvc/llvm-project?rev=251611&view=rev Log: Fix a soon to be invalid test Remove a check that won't be valid when LLVM stops emitting runtime hook user function. Modified: cfe/trunk/test/Profile/gcc-fla

r251385 - Create undef reference to profile hook symbol

2015-10-26 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Tue Oct 27 00:15:35 2015 New Revision: 251385 URL: http://llvm.org/viewvc/llvm-project?rev=251385&view=rev Log: Create undef reference to profile hook symbol Create undef reference to profile hook symbol when PGO instrumentation is turned on. This allows LLVM to omit emiss

Re: [PATCH] D14030: Use linker option to reference profile runtime hook (Linux)

2015-10-26 Thread Xinliang David Li via cfe-commits
On Mon, Oct 26, 2015 at 8:44 AM, Vedant Kumar wrote: > vsk added a comment. > > This looks good to me. Does this mean we will get rid of > `getInstrProfRuntimeHookVarUseFuncName`? > not yet -- note that this is only enabled for Linux toolchain only for now. If it works for all platforms, we can

r251072 - Use newly introduced interfaces in LLVM (NFC)

2015-10-22 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Oct 22 17:25:11 2015 New Revision: 251072 URL: http://llvm.org/viewvc/llvm-project?rev=251072&view=rev Log: Use newly introduced interfaces in LLVM (NFC) Replaced references to raw strings in instrumentation and coverage code. Modified: cfe/trunk/lib/CodeGen/CodeGen

r250994 - clang driver toolchain refactoring

2015-10-21 Thread Xinliang David Li via cfe-commits
Author: davidxl Date: Thu Oct 22 01:15:31 2015 New Revision: 250994 URL: http://llvm.org/viewvc/llvm-project?rev=250994&view=rev Log: clang driver toolchain refactoring In this patch, the file static method addProfileRT is moved to be a virtual member function of base ToolChain class. This allows

Re: [PATCH] D13326: [PGO]: Eliminate __llvm_profile_register calls for Linux (clang changes)

2015-10-06 Thread Xinliang David Li via cfe-commits
Clang FE refactoring change is not needed anymore. In commit 0d32e7d952bc80830183e0c2c6ec5027ca6b1450, Vasileios Kalintiris did the same thing for multi-lib support. David On Tue, Oct 6, 2015 at 12:13 AM, Justin Bogner wrote: > David Li writes: >> davidxl updated this revision to Diff 36316. >

Re: [PATCH] D13319: Eliminate __llvm_profile_register calls

2015-09-30 Thread Xinliang David Li via cfe-commits
On Wed, Sep 30, 2015 at 5:42 PM, Justin Bogner wrote: > David Li writes: >> davidxl created this revision. >> davidxl added reviewers: bogner, rsmith. >> davidxl added subscribers: cfe-commits, llvm-commits. >> Herald added subscribers: srhines, danalbert, tberghammer. >> >> With PGO, the instrum

Re: [PATCH] D12247: [libc++] remove possible trailing padding from aligned_storage

2015-08-27 Thread Xinliang David Li via cfe-commits
On Thu, Aug 27, 2015 at 2:57 PM, Yiran Wang wrote: > yiranwang added a comment. > > In http://reviews.llvm.org/D12247#234533, @EricWF wrote: > >> So this patch LGTM. Sorry for being slow to understand it. However I want to >> see two things before it lands. >> >> 1. I would like to see a test of

Re: [PATCH] D12247: [libc++] remove possible trailing padding from aligned_storage

2015-08-26 Thread Xinliang David Li via cfe-commits
On Wed, Aug 26, 2015 at 3:38 PM, Eric Fiselier wrote: > EricWF added a comment. > > In http://reviews.llvm.org/D12247#233717, @yiranwang wrote: > >> Hi Eric, >> >> Could you please explain a bit more what is broken specifically? As we can >> see, sizeof(), _Len, and _Align, and alignof() of "alig

Re: [PATCH] D12247: [libc++] remove possible trailing padding from aligned_storage

2015-08-26 Thread Xinliang David Li via cfe-commits
On Wed, Aug 26, 2015 at 11:11 AM, Eric Fiselier wrote: > EricWF added a comment. > > In http://reviews.llvm.org/D12247#233323, @davidxl wrote: > >> We certainly need a fix without breaking ABI. Is there a ABI conformance >> test for libcxx? > > > Well this patch definitely breaks the ABI. This wa