r250994 - clang driver toolchain refactoring

2015-10-22 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=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

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=rev Log: Use newly introduced interfaces in LLVM (NFC) Replaced references to raw strings in instrumentation and coverage code. Modified:

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=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 emission

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=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:

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

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=rev Log: [PGO] Code cleanup [NFC] Use interfaces defined in LLVM to create FuncName and FuncNameVar. Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Modified:

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=rev Log: Use profile data template file for covmap func record (NFC) Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified:

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: >>

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 e...@efcs.ca 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

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=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:

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=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:

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=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

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=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 shortens

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=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:

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=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:

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=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:

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=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 fail

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=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:

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=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:

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 >> >>

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 >> >>

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=rev Log: [PGO] Revert r255366: solution incomplete, not handling lambda yet Modified: cfe/trunk/test/CoverageMapping/unused_names.c

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=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

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=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

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=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 frontend

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=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

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=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:

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

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

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=rev Log: [PGO] Fix issue: explicitly defaulted assignop is not profiled Differential Revision: http://reviews.llvm.org/D16947 Added:

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=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:

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=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:

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,

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

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

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

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=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:

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

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,

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=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 URL:

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=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

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=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 retightened.

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. > > >

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

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

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
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,

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

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 >

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,

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=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 linkages

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

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

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=rev Log: Reference the updated function name /NFC Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp URL:

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=rev Log: Restrengthen tests relaxed in r259955 Modified: cfe/trunk/test/CoverageMapping/ir.c cfe/trunk/test/CoverageMapping/unused_names.c Modified:

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=rev Log: Test simplification Modified: cfe/trunk/test/Profile/def-assignop.cpp Modified: cfe/trunk/test/Profile/def-assignop.cpp URL:

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: > >>

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

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

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

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

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=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=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-generate.c

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=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:

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=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] 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:

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

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,

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

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

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=rev Log: [Profile] PE binary coverage bug fix PR/32584 Differential Revision: https://reviews.llvm.org/D32023 Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp

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=rev Log: Remove unused function /nfc Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp URL:

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=rev Log: Fix use after free error Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp URL:

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

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
< >> 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 Carruth via Phabricator <

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=rev Log: Preserve cold attribute for function decls Differential Revision: http://reviews.llvm.org/D34133 Modified: cfe/trunk/lib/CodeGen/CGCall.cpp

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

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

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

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

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

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

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

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

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: >

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