[clang] 6cee539 - [Clang] Change AnonStructIds in MangleContext to per-function based

2022-10-23 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2022-10-23T22:33:52-07:00 New Revision: 6cee5393371fdde798605c88bad0ebceb3626257 URL: https://github.com/llvm/llvm-project/commit/6cee5393371fdde798605c88bad0ebceb3626257 DIFF: https://github.com/llvm/llvm-project/commit/6cee5393371fdde798605c88bad0ebceb3626257.diff LOG:

[clang] db18f26 - [llvm-profdata] Handle internal linkage functions in profile supplementation

2022-08-29 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2022-08-29T16:15:12-07:00 New Revision: db18f26567be47ec1da7fba48179a3001f0d34ab URL: https://github.com/llvm/llvm-project/commit/db18f26567be47ec1da7fba48179a3001f0d34ab DIFF: https://github.com/llvm/llvm-project/commit/db18f26567be47ec1da7fba48179a3001f0d34ab.diff LOG:

[clang] 5fdaaf7 - [SampleFDO] Flow Sensitive Sample FDO (FSAFDO) profile loader

2021-08-18 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2021-08-18T18:37:35-07:00 New Revision: 5fdaaf7fd8f35ac9c9de50a45b09e29c7b0d48c4 URL: https://github.com/llvm/llvm-project/commit/5fdaaf7fd8f35ac9c9de50a45b09e29c7b0d48c4 DIFF: https://github.com/llvm/llvm-project/commit/5fdaaf7fd8f35ac9c9de50a45b09e29c7b0d48c4.diff LOG:

[clang] b7425e9 - [NFC] Fix typos

2021-08-16 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2021-08-16T10:15:30-07:00 New Revision: b7425e956be60a73004d7ae5bb37da85872c29fb URL: https://github.com/llvm/llvm-project/commit/b7425e956be60a73004d7ae5bb37da85872c29fb DIFF: https://github.com/llvm/llvm-project/commit/b7425e956be60a73004d7ae5bb37da85872c29fb.diff LOG:

[clang] 3733463 - [IR][PGO] Add hot func attribute and use hot/cold attribute in func section

2020-12-17 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2020-12-17T18:41:12-08:00 New Revision: 3733463dbb58a29892be3872bd32f93cb9af492c URL: https://github.com/llvm/llvm-project/commit/3733463dbb58a29892be3872bd32f93cb9af492c DIFF: https://github.com/llvm/llvm-project/commit/3733463dbb58a29892be3872bd32f93cb9af492c.diff LOG:

Re: [PATCH] D90275: [clang][IR] Add support for leaf attribute

2020-12-16 Thread Rong Xu via cfe-commits
yes. Also #43 should be #42 I fixed it in https://reviews.llvm.org/D92493 But that was just to make my test pass. On Wed, Dec 16, 2020 at 11:35 AM Gulfem Savrun Yeniceri via Phabricator < revi...@reviews.llvm.org> wrote: > gulfem added a comment. > > > The problem in `llvm/test/Bitcode/attributes

Re: [PATCH] D91813: [PGO] verify BFI counts after loading profile data

2020-12-14 Thread Rong Xu via cfe-commits
Thanks for catching that. I messed up the commit from another patch. Fixed in commit c36f31c. -Rong On Mon, Dec 14, 2020 at 4:50 PM dmajor via Phabricator < revi...@reviews.llvm.org> wrote: > dmajor added inline comments. > > > > Comment at: clang/lib/CodeGen/CGCall.cpp:1948 > +

[clang] c36f31c - [PGO] remove unintentional code in early commit

2020-12-14 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2020-12-14T18:41:49-08:00 New Revision: c36f31c4db065e987160a776749f5da81efc24c5 URL: https://github.com/llvm/llvm-project/commit/c36f31c4db065e987160a776749f5da81efc24c5 DIFF: https://github.com/llvm/llvm-project/commit/c36f31c4db065e987160a776749f5da81efc24c5.diff LOG:

[clang] 54e03d0 - [PGO] Verify BFI counts after loading profile data

2020-12-14 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2020-12-14T15:56:10-08:00 New Revision: 54e03d03a7a4d47f09d40bcbcfe484066a52a077 URL: https://github.com/llvm/llvm-project/commit/54e03d03a7a4d47f09d40bcbcfe484066a52a077 DIFF: https://github.com/llvm/llvm-project/commit/54e03d03a7a4d47f09d40bcbcfe484066a52a077.diff LOG:

[clang] 50da55a - [PGO] Supporting code for always instrumenting entry block

2020-07-22 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2020-07-22T15:01:53-07:00 New Revision: 50da55a58534e9207d8d5e31c8b4b5cf0c624175 URL: https://github.com/llvm/llvm-project/commit/50da55a58534e9207d8d5e31c8b4b5cf0c624175 DIFF: https://github.com/llvm/llvm-project/commit/50da55a58534e9207d8d5e31c8b4b5cf0c624175.diff LOG:

[clang] 11857d4 - [remark][diagnostics] [codegen] Fix PR44896

2020-02-25 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2020-02-25T08:15:17-08:00 New Revision: 11857d49948b845dcfd7c7f78595095e3add012d URL: https://github.com/llvm/llvm-project/commit/11857d49948b845dcfd7c7f78595095e3add012d DIFF: https://github.com/llvm/llvm-project/commit/11857d49948b845dcfd7c7f78595095e3add012d.diff LOG:

Re: [PATCH] D74878: [remark][diagnostics] [codegen] Fix PR44896

2020-02-21 Thread Rong Xu via cfe-commits
OK. I will add a warning but not turn it off at the CodeGenOpt (but it will not pass to LLVMContext). I will update the patch shortly. On Fri, Feb 21, 2020 at 1:53 AM serge via Phabricator < revi...@reviews.llvm.org> wrote: > serge-sans-paille added a comment. > > Let's go that way then. @xur I

[clang] c9ee5e9 - Fix windows bot failures in c410adb092c9cb51ddb0b55862b70f2aa8c5b16f

2020-01-14 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2020-01-14T16:32:17-08:00 New Revision: c9ee5e996e3c89a751a35e8b771870e0ec24f3c0 URL: https://github.com/llvm/llvm-project/commit/c9ee5e996e3c89a751a35e8b771870e0ec24f3c0 DIFF: https://github.com/llvm/llvm-project/commit/c9ee5e996e3c89a751a35e8b771870e0ec24f3c0.diff LOG:

[clang] 60d3947 - [remark][diagnostics] Using clang diagnostic handler for IR input files

2020-01-14 Thread Rong Xu via cfe-commits
Author: Rong Xu Date: 2020-01-14T15:44:57-08:00 New Revision: 60d39479221d6bc09060f7816bcd7c54eb286603 URL: https://github.com/llvm/llvm-project/commit/60d39479221d6bc09060f7816bcd7c54eb286603 DIFF: https://github.com/llvm/llvm-project/commit/60d39479221d6bc09060f7816bcd7c54eb286603.diff LOG:

Re: [PATCH] D72523: [remark][diagnostics] Using clang diagnostic handler for IR input files

2020-01-14 Thread Rong Xu via cfe-commits
Thanks for reviewing this. The new constructor is to avoid initializing the "OS" field (which is not used by the empty BackendConsumer. Setting this field will affect the output). I will add a comment there. -Rong On Mon, Jan 13, 2020 at 4:50 PM Teresa Johnson via Phabricator < revi...@reviews.l

Re: [PATCH] D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager

2019-08-02 Thread Rong Xu via cfe-commits
r367657 should fix this. On Fri, Aug 2, 2019 at 12:20 AM Rong Xu wrote: > yes. I already know this issue as this also breaks windows bolt. > The fix should be simple. > > -Rong > > On Thu, Aug 1, 2019 at 11:52 PM Petr Hosek via Phabricator < > revi...@reviews.llvm.org> wrote: > >> phosek added a

r367657 - [PGO] Fix bolt failures from r367628

2019-08-02 Thread Rong Xu via cfe-commits
Author: xur Date: Fri Aug 2 00:21:50 2019 New Revision: 367657 URL: http://llvm.org/viewvc/llvm-project?rev=367657&view=rev Log: [PGO] Fix bolt failures from r367628 Relaxed the check in a test because the windows bolt generates different profile variables. Modified: cfe/trunk/test/Profile/

Re: [PATCH] D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager

2019-08-02 Thread Rong Xu via cfe-commits
yes. I already know this issue as this also breaks windows bolt. The fix should be simple. -Rong On Thu, Aug 1, 2019 at 11:52 PM Petr Hosek via Phabricator < revi...@reviews.llvm.org> wrote: > phosek added a comment. > > Looks like this change broke `Profile/gcc-flag-compatibility.c` test on > m

r367628 - [PGO] Add PGO support at -O0 in the experimental new pass manager

2019-08-01 Thread Rong Xu via cfe-commits
Author: xur Date: Thu Aug 1 15:36:34 2019 New Revision: 367628 URL: http://llvm.org/viewvc/llvm-project?rev=367628&view=rev Log: [PGO] Add PGO support at -O0 in the experimental new pass manager Add PGO support at -O0 in the experimental new pass manager to sync the behavior of the legacy pass m

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

2019-07-01 Thread Rong Xu via cfe-commits
On Fri, Jun 28, 2019 at 5:28 PM Xinliang David Li wrote: > I agree that the test coverage needs to be improved eg better check etc. > PGO is rarely run under -O0. But I agree that we should improve the test. I sent out https://reviews.llvm.org/D64029. Chanlder: could you take a look? Thanks,

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

2019-06-28 Thread Rong Xu via cfe-commits
they are not doing the exacly the same thing for old pass manager and new pass manger: old pass manger is doing instrumentation, while the new pass manager with this change is NOT. the test is not check instrumentation, (it only check the variables that generates by InstroProfiling pass). In this s

r359241 - [PGO] Fix buildbot failure in 359215

2019-04-25 Thread Rong Xu via cfe-commits
Author: xur Date: Thu Apr 25 14:16:41 2019 New Revision: 359241 URL: http://llvm.org/viewvc/llvm-project?rev=359241&view=rev Log: [PGO] Fix buildbot failure in 359215 Revert the part of changes in r359215 that failing in some platforms. I will re-enable them later. Modified: cfe/trunk/test/P

r359215 - [PGO] Enable InstrProf lowering for Clang PGO instrumentation in the new pass manager

2019-04-25 Thread Rong Xu via cfe-commits
Author: xur Date: Thu Apr 25 10:52:43 2019 New Revision: 359215 URL: http://llvm.org/viewvc/llvm-project?rev=359215&view=rev Log: [PGO] Enable InstrProf lowering for Clang PGO instrumentation in the new pass manager Currently InstrProf lowering is not enabled for Clang PGO instrumentation in the

r355563 - [PGO] Re-submit: Clang part of change for context-sensitive PGO (part2)

2019-03-06 Thread Rong Xu via cfe-commits
Author: xur Date: Wed Mar 6 15:00:38 2019 New Revision: 355563 URL: http://llvm.org/viewvc/llvm-project?rev=355563&view=rev Log: [PGO] Re-submit: Clang part of change for context-sensitive PGO (part2) Part 2 of CSPGO change in Clang: Add test cases. Differential Revision: https://reviews.llvm.o

r355454 - Revert r355432 for buildbot failures in ppc64be-linux and s390x-linux

2019-03-05 Thread Rong Xu via cfe-commits
Author: xur Date: Tue Mar 5 15:02:06 2019 New Revision: 355454 URL: http://llvm.org/viewvc/llvm-project?rev=355454&view=rev Log: Revert r355432 for buildbot failures in ppc64be-linux and s390x-linux Removed: cfe/trunk/test/CodeGen/Inputs/pgotestir.proftext cfe/trunk/test/CodeGen/Inputs/p

r355432 - [PGO] Clang part of change for context-sensitive PGO (part2)

2019-03-05 Thread Rong Xu via cfe-commits
Author: xur Date: Tue Mar 5 11:09:56 2019 New Revision: 355432 URL: http://llvm.org/viewvc/llvm-project?rev=355432&view=rev Log: [PGO] Clang part of change for context-sensitive PGO (part2) Part 2 of CSPGO change in Clang: Add test cases. Differential Revision: https://reviews.llvm.org/D54176

r355331 - [PGO] Clang part of change for context-sensitive PGO (part1)

2019-03-04 Thread Rong Xu via cfe-commits
Author: xur Date: Mon Mar 4 12:21:31 2019 New Revision: 355331 URL: http://llvm.org/viewvc/llvm-project?rev=355331&view=rev Log: [PGO] Clang part of change for context-sensitive PGO (part1) Part 1 of CSPGO change in Clang. This includes changes in clang options and calls to llvm PassManager. Tes

r355209 - [PGO] Use the explicit parameter in ProfileSummary API. NFC

2019-03-01 Thread Rong Xu via cfe-commits
Author: xur Date: Fri Mar 1 09:50:20 2019 New Revision: 355209 URL: http://llvm.org/viewvc/llvm-project?rev=355209&view=rev Log: [PGO] Use the explicit parameter in ProfileSummary API. NFC Use the explicit parameter in setProfileSummary() and getSummary(). This is a follow-up of r355131. Modifi

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

2016-06-29 Thread Rong Xu via cfe-commits
xur added a comment. Thanks for doing this. I like the patch in general. Hers are my minor feedbacks: (1) It seems the original options of -fprofile-instr-generate and -fprofile-instr-use will be kept. Is so, what is the guideline to use these two sets of options. Also, we need some documentat

r267224 - PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name

2016-04-22 Thread Rong Xu via cfe-commits
Author: xur Date: Fri Apr 22 16:19:05 2016 New Revision: 267224 URL: http://llvm.org/viewvc/llvm-project?rev=267224&view=rev Log: PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name Write out the PGOFuncName meta data if PGOFuncName is different from function's raw nam

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

2016-04-22 Thread Rong Xu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL267224: PGO] PGOFuncName meta data if PGOFuncName is different from function's raw name (authored by xur). Changed prior to commit: http://reviews.llvm.org/D18624?vs=54717&id=54725#toc Repository: rL

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

2016-04-22 Thread Rong Xu via cfe-commits
xur added a comment. tested with povray with full path names in the command line and it works fine. http://reviews.llvm.org/D18624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-04-22 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 54717. xur added a comment. Handling the path-stripped prefix in PGOFuncName. This new patch depends on http://reviews.llvm.org/D19433 http://reviews.llvm.org/D18624 Files: CodeGenPGO.cpp Index: CodeGenPGO.cpp ===

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

2016-04-21 Thread Rong Xu via cfe-commits
I was using spec-run where the command line has the pathless filename. The source in Atam's command-line has the absolute path. In meta-data creation, we used Module's getSourceFileName() which has the source name appeared in the command line (in this case, a full patch name). While in Clang's se

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

2016-04-21 Thread Rong Xu via cfe-commits
xur added a comment. I was using spec-run where the command line has the pathless filename. The source in Atam's command-line has the absolute path. In meta-data creation, we used Module's getSourceFileName() which has the source name appeared in the command line (in this case, a full patch name)

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

2016-04-21 Thread Rong Xu via cfe-commits
xur added a comment. I tried http://reviews.llvm.org/D17864 and http://reviews.llvm.org/D18624 with the latest trunk of r267006 on a clean client. The built compiler works fine with povray. the meta data only has the files name. How did you build povray? can you show me your command line in bui

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

2016-04-21 Thread Rong Xu via cfe-commits
I tried D17864 and D18624 with the latest trunk of r267006 on a clean client. The built compiler works fine with povray. the meta data only has the files name. How did you build povray? can you show me your command line in building (for example, csg.cpp) for both--fprofile-instr-use and -fprofile

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

2016-04-20 Thread Rong Xu via cfe-commits
xur added a comment. these two patches work fine in my build. My llvm was on top ov r265491. The opt remarks in the last email were emitted by the compiler. I'll try to reproduce with r266465. http://reviews.llvm.org/D18624 ___ cfe-commits mailing

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

2016-04-20 Thread Rong Xu via cfe-commits
these two patches work fine in my build. My llvm was on top ov r265491. The opt remarks in the last email were emitted by the compiler. I'll try to reproduce with r266465. On Apr 20, 2016 4:00 PM, "Adam Nemet" wrote: > anemet added a comment. > > Still does not to work. The metadata has the f

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

2016-04-20 Thread Rong Xu via cfe-commits
xur added a comment. the reason for splitting the check is we don't need this check at all in llvm instrument,-- as it's done per function. but I guess it does not matter much to move it in to create -- it's only called once per function. http://reviews.llvm.org/D18624 ___

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

2016-04-20 Thread Rong Xu via cfe-commits
the reason for splitting the check is we don't need this check at all in llvm instrument,-- as it's done per function. but I guess it does not matter much to move it in to create -- it's only called once per function. On Wed, Apr 20, 2016 at 3:04 PM, David Li wrote: > davidxl added inline co

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

2016-04-19 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 54275. xur added a comment. Previous patch was bad (as David noticed) -- we might not annotate all the functions that we interested. This updated patch should work. BTW, I got the following promotions for 453.provay: LLVM gold plugin: csg.cpp:157:15: Promote i

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

2016-04-19 Thread Rong Xu via cfe-commits
I did not test Clang based instrumentation with SPEC. I will try it with povray today. 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 call promoted that calls

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

2016-04-19 Thread Rong Xu via cfe-commits
xur added a comment. I did not test Clang based instrumentation with SPEC. I will try it with povray today. http://reviews.llvm.org/D18624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2016-03-30 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 52134. xur added a comment. sync the change in http://reviews.llvm.org/D18623. http://reviews.llvm.org/D18624 Files: lib/CodeGen/CodeGenPGO.cpp Index: lib/CodeGen/CodeGenPGO.cpp === --- lib/Code

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

2016-03-30 Thread Rong Xu via cfe-commits
xur created this revision. xur added reviewers: davidxl, bogner, joker.eph. xur added subscribers: cfe-commits, vsk, xur. Write out the PGOFuncName meta data if PGOFuncName is different from function's raw name. This should only apply to internal linkage functions. This is to be consumed by indi

Re: [PATCH] D17737: [PGO] change profile use cc1 option

2016-03-02 Thread Rong Xu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262515: [PGO] Change profile use cc1 option to handle IR level profiles (authored by xur). Changed prior to commit: http://reviews.llvm.org/D17737?vs=49655&id=49664#toc Repository: rL LLVM http://re

r262515 - [PGO] Change profile use cc1 option to handle IR level profiles

2016-03-02 Thread Rong Xu via cfe-commits
Author: xur Date: Wed Mar 2 14:59:36 2016 New Revision: 262515 URL: http://llvm.org/viewvc/llvm-project?rev=262515&view=rev Log: [PGO] Change profile use cc1 option to handle IR level profiles This patch changes cc1 option for PGO profile use from -fprofile-instr-use= to -fprofile-instrument-use

Re: [PATCH] D17737: [PGO] change profile use cc1 option

2016-03-02 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 49655. xur added a comment. Integrated with Sean's review comments. -Rong http://reviews.llvm.org/D17737 Files: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def include/clang/Frontend/CodeGenO

Re: [PATCH] D17737: [PGO] change profile use cc1 option

2016-03-02 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 49647. xur marked an inline comment as done. xur added a comment. I think David's suggestion to use one cc1 option -fprofile-instrument-use-path is a very good idea. I update the patch to get rid of -fprofille-instrument-use. The profile kind is now set by check

Re: [PATCH] D17737: [PGO] change profile use cc1 option

2016-03-01 Thread Rong Xu via cfe-commits
xur marked an inline comment as done. Comment at: lib/CodeGen/CodeGenModule.cpp:154 @@ +153,3 @@ +assert(!CodeGenOpts.ProfileInstrumentUsePath.empty() && + "Need to explicitly specify the profile name."); +auto ReaderOrErr = llvm::IndexedInstrProfReader::create(

Re: [PATCH] D17737: [PGO] change profile use cc1 option

2016-02-29 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 49444. xur marked 2 inline comments as done. xur added a comment. Integrated Sean's review suggestions. -Rong http://reviews.llvm.org/D17737 Files: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.d

Re: [PATCH] D17737: [PGO] change profile use cc1 option

2016-02-29 Thread Rong Xu via cfe-commits
xur marked 4 inline comments as done. Comment at: lib/Frontend/CompilerInvocation.cpp:378 @@ -377,1 +377,3 @@ +enum PGOInstrumentor { ProfileUnknown, ProfileNone, ProfileClang, ProfileLLVM }; +static PGOInstrumentor getPGOInstrumentor(StringRef S) { silvas wrot

[PATCH] D17737: [PGO] change profile use cc1 option

2016-02-29 Thread Rong Xu via cfe-commits
xur created this revision. xur added reviewers: davidxl, silvas, bogner. xur added subscribers: davidxl, xur, cfe-commits. This patch takes the suggestion by Sean Silva in https://reviews.llvm.org/D17622 to decouple cc1 option from driver level option. -fprofile-instr-use={} is now a driver only

r262239 - [PGO] clang cc1 option change to enable IR level instrumentation

2016-02-29 Thread Rong Xu via cfe-commits
Author: xur Date: Mon Feb 29 12:54:59 2016 New Revision: 262239 URL: http://llvm.org/viewvc/llvm-project?rev=262239&view=rev Log: [PGO] clang cc1 option change to enable IR level instrumentation This patch expands cc1 option -fprofile-instrument= with a new value: -fprofile-instrument=llvm which

Re: [PATCH] D17622: [PGO] clang cc1 option change to enable IR level instrumenation

2016-02-29 Thread Rong Xu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262239: [PGO] clang cc1 option change to enable IR level instrumentation (authored by xur). Changed prior to commit: http://reviews.llvm.org/D17622?vs=49243&id=49394#toc Repository: rL LLVM http://r

Re: [PATCH] D17622: [PGO] clang cc1 option change to enable IR level instrumenation

2016-02-26 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 49243. xur added a comment. Sean, Thanks for the review and suggestions. Here is the patch that only adds -fprofile-instrument=llvm. I'll have another patch using your suggestion on cc1 options for profile use compilation. http://reviews.llvm.org/D17622 File

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

2016-02-25 Thread Rong Xu via cfe-commits
Create a new review here: http://reviews.llvm.org/D17622 Thanks, -Rong On Wed, Feb 24, 2016 at 9:22 PM, Sean Silva wrote: > silvas added a comment. > > In http://reviews.llvm.org/D15829#360006, @xur wrote: > >> Here is the new patch that removes the auto detection of profile kind. >> >> In this

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

2016-02-25 Thread Rong Xu via cfe-commits
xur added a comment. Create a new review here: http://reviews.llvm.org/D17622 Thanks, -Rong http://reviews.llvm.org/D15829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D17622: [PGO] clang cc1 option change to enable IR level instrumenation

2016-02-25 Thread Rong Xu via cfe-commits
xur created this revision. xur added reviewers: davidxl, silvas, justinruggles. xur added subscribers: cfe-commits, xur, mcrosier, davidxl, slingn. This patch expands cc1 option -fprofile-instrument= with three new values: (1) -fprofile-instrument=llvm This enables IR PGO instrumentation. (2) -fpr

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

2016-02-23 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 48859. xur marked 2 inline comments as done. xur added a comment. Integrated with David's comments. Thanks, -Rong http://reviews.llvm.org/D15829 Files: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td include/clang/Frontend/CodeGenOpti

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

2016-02-23 Thread Rong Xu via cfe-commits
xur marked 4 inline comments as done. Comment at: lib/CodeGen/CodeGenModule.cpp:151 @@ -151,1 +150,3 @@ + if (CodeGenOpts.hasProfileClangUse() && + !CodeGenOpts.InstrProfileInput.empty()) { auto ReaderOrErr = davidxl wrote: > Is the second condition sti

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

2016-02-23 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 48846. xur marked an inline comment as done. xur added a comment. Here is the new patch that removes the auto detection of profile kind. In this patch, I replace the CC1 option of -fprofile-instr-use=<> with -fprofile-instrument={llvm-use|clang-use}. For the use

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

2016-02-22 Thread Rong Xu via cfe-commits
xur marked an inline comment as done. xur added a comment. I'll send a revised patch soon. Comment at: lib/CodeGen/CodeGenModule.cpp:150 @@ -149,2 +149,3 @@ - if (!CodeGenOpts.InstrProfileInput.empty()) { + if (!CodeGenOpts.hasProfileIRInstr() && + !CodeGenOpts.InstrPro

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

2016-02-09 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 47331. xur added a comment. Ping (also added the test that missed from last upload). Thanks, -Rong http://reviews.llvm.org/D15829 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/BackendUtil.cpp lib/CodeGe

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

2016-02-08 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 47251. xur marked an inline comment as done. xur added a comment. fixed the typo in comments http://reviews.llvm.org/D15829 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/BackendUtil.cpp lib/CodeGen/CodeGen

r260116 - Fix missing space (NFC)

2016-02-08 Thread Rong Xu via cfe-commits
Author: xur Date: Mon Feb 8 12:12:41 2016 New Revision: 260116 URL: http://llvm.org/viewvc/llvm-project?rev=260116&view=rev Log: Fix missing space (NFC) Fixed the inconsistently placed : (missing space) introduced in in r259811. Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKin

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

2016-02-04 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 46960. xur added a comment. Now http://reviews.llvm.org/D16730 has been committed (as r259811) Here is the patch that adds cc1 option -fprofile-instrument=llvm to enable IR level PGO generate and use. The pgo use part of the patch depends http://reviews.llvm.or

r259811 - [PGO] cc1 option name change for profile instrumentation

2016-02-04 Thread Rong Xu via cfe-commits
Author: xur Date: Thu Feb 4 12:39:09 2016 New Revision: 259811 URL: http://llvm.org/viewvc/llvm-project?rev=259811&view=rev Log: [PGO] cc1 option name change for profile instrumentation This patch changes cc1 option -fprofile-instr-generate to an enum option -fprofile-instrument={clang|none}. It

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

2016-01-29 Thread Rong Xu via cfe-commits
xur added a comment. To make the review easier, I split the cc1 names change part into a new NFC patch here. http://reviews.llvm.org/D16730 http://reviews.llvm.org/D15829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

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

2016-01-29 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 46389. xur added a comment. This new patch adds the change the clang test cases (cc1 option -fprofile-instr-generate to -fprofile-instrument=Clang). It also replaces cc1 option -fprofile-instr-generate= to -fprofile-instrument-path=, as suggested by David. Tha

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

2016-01-28 Thread Rong Xu via cfe-commits
xur added a comment. 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. (2) Fall back to my previous patch: keep -fprofile-instr-gene

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

2016-01-28 Thread Rong Xu via cfe-commits
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. (2) Fall back to my previous patch: keep -fprofile-instr-generate as the CC1 option

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

2016-01-28 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 46303. xur added a comment. Integrated most recently comments/suggestions from David and Sean. Thanks, -Rong http://reviews.llvm.org/D15829 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/CC1Options.td include/clang/Driver/Optio

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

2016-01-28 Thread Rong Xu via cfe-commits
xur added a comment. I'll send an updated patch shortly. Comment at: include/clang/Frontend/CodeGenOptions.def:106 @@ -105,3 +105,3 @@ -CODEGENOPT(ProfileInstrGenerate , 1, 0) ///< Instrument code to generate -///< execution counts to us

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

2016-01-27 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 46199. xur added a comment. This new version implemented the usage model David proposed. We now have a cc1 option -fprofile-instrumentor={llvm | clang} to choose which instrumentation to use. The slight difference from David's proposal is that we can use this op

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

2016-01-27 Thread Rong Xu via cfe-commits
On Wed, Jan 27, 2016 at 11:31 AM, David Li wrote: > davidxl added inline comments. > > > Comment at: lib/Driver/Tools.cpp:5520 > @@ +5519,3 @@ > +A->claim(); > +if ((StringRef(A->getValue(0)) == "-fprofile-ir-instr") && > +(Args.hasArg(options::OPT_fprofile_instr_g

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

2016-01-27 Thread Rong Xu via cfe-commits
xur added a comment. Sean: Adding a new CC1 option ProfileClangInstr will make things cleaner. But this won't solve the problem. The root of all the mess is there is no driver level option for IR instrumentation. I need to either "hijack" the -Xclang option, or move the logic to CompilerInvocation

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

2016-01-27 Thread Rong Xu via cfe-commits
Sean: Adding a new CC1 option ProfileClangInstr will make things cleaner. But this won't solve the problem. The root of all the mess is there is no driver level option for IR instrumentation. I need to either "hijack" the -Xclang option, or move the logic to CompilerInvocation.cpp, which both you d

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

2016-01-25 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 45929. xur marked an inline comment as done. xur added a comment. Here is the new patch. Changes from previous patch are: (1) rename codegen option ProfileInstrGenerate to ClangProfInstrGen to avoid the name confusion (Davidxl). This option is for clang instrumen

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

2016-01-25 Thread Rong Xu via cfe-commits
xur added a subscriber: xur. xur added a comment. OK. Now I understand what you meant. I was trying to avoid driver changes. It seems you are saying I can change the driver to support cc1 options more cleanly. This can be done. Thanks, Rong http://reviews.llvm.org/D15829 ___

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

2016-01-25 Thread Rong Xu via cfe-commits
OK. Now I understand what you meant. I was trying to avoid driver changes. It seems you are saying I can change the driver to support cc1 options more cleanly. This can be done. Thanks, Rong On Jan 25, 2016 12:43, "Sean Silva" wrote: > silvas added inline comments. > > > Commen

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

2016-01-22 Thread Rong Xu via cfe-commits
xur added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:440 @@ +439,3 @@ + if (CodeGenOpts.ProfileIRInstr) { +// Should not have ProfileInstrGenerate set -- it is for clang +// instrumentation only. silvas wrote: > Then change the existing refe

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

2016-01-22 Thread Rong Xu via cfe-commits
xur added inline comments. Comment at: lib/Driver/Tools.cpp:3279 @@ -3278,1 +3278,3 @@ + + Args.AddAllArgs(CmdArgs, options::OPT_fprofile_ir_instr); } mcrosier wrote: > I don't think AddAllArgs is what you really want. What if the user specifies > the option t

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

2016-01-22 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 45708. xur added a comment. This new patches integrates Sean review comments: (1) make -fprofile-ir-instr a cc1 option instead of driver option. (2) add one cc1 option test, and test the pass is indeed invoked. (3) remove the driver test (runtime library). (4) fix

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

2016-01-22 Thread Rong Xu via cfe-commits
On Thu, Jan 21, 2016 at 7:32 PM, Sean Silva wrote: > silvas added a comment. > > @slingn and I had a discussion offline about the potential names and came up > with some ideas, but none is a clear winner. > > Overall, my feeling is that from a user's perspective, the frontend stuff is > probably

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

2016-01-21 Thread Rong Xu via cfe-commits
xur added a comment. Ping. Passmanagerbuilder change has been committed. Could you take a look at this command line option patch? Thanks, -Rong http://reviews.llvm.org/D15829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

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

2016-01-13 Thread Rong Xu via cfe-commits
xur updated this revision to Diff 44776. xur added a comment. added new tests and comments based on the review comments. http://reviews.llvm.org/D15829 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/BackendUtil.cpp lib/CodeGen/CodeGenModule.

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

2016-01-13 Thread Rong Xu via cfe-commits
xur marked an inline comment as done. xur added a comment. I'll sent the revised patch based on the comments shortly. Comment at: lib/CodeGen/BackendUtil.cpp:435 @@ +434,3 @@ + if (CodeGenOpts.ProfileIRInstr) { +assert (!CodeGenOpts.ProfileInstrGenerate); +if (!CodeGenO

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

2015-12-30 Thread Rong Xu via cfe-commits
xur created this revision. xur added reviewers: davidxl, silvas, bogner. xur added a subscriber: cfe-commits. This patch introduce a new toggle option -fprofile-ir-instr that enables IR level instrumentation. It needs to be used in combination with current PGO options. Without an existing PGO op