Page MenuHomePhabricator

davidxl (David Li)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 13 2015, 9:48 AM (235 w, 2 d)

Recent Activity

Today

davidxl added inline comments to D69070: [PGO][PGSO] SizeOpts changes..
Wed, Oct 16, 2:33 PM · Restricted Project

Yesterday

davidxl added inline comments to D68901: [SampleFDO] Add profile remapping support for profile on-demand loading used by ExtBinary format profile.
Tue, Oct 15, 10:39 AM · Restricted Project

Sun, Oct 13

davidxl added a comment to D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.

Handling what Wei's case will be a nice thing to have, but it may require more significant change in JT. Currently the JT candidate BB selection is based on checking the conditional value used by branch or return value of ret instr (with this patch).

Sun, Oct 13, 2:17 PM

Sat, Oct 12

davidxl added a comment to D52845: Update entry count for cold calls.

Wenlei, this sounds like a good idea. Patches are welcome!

Sat, Oct 12, 12:27 PM · Restricted Project

Fri, Oct 11

davidxl added a comment to D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.

JumpThreading is basically basic block cloning followed by control flow simplification. This is just a special case where the second part is missing.

Fri, Oct 11, 7:36 PM
davidxl created D68898: JumpThreading: enhance JT to handle BB with no successor and address comparison.
Fri, Oct 11, 4:33 PM
davidxl added a comment to D67120: [PGO] Profile guided code size optimization (continued)..

The code can be broken down and contributed in the following order:

Fri, Oct 11, 10:51 AM · Restricted Project
davidxl added a comment to D67120: [PGO] Profile guided code size optimization (continued)..

SizeOpts and MachineSizeOpts changes can also be extracted into its own patch.

Fri, Oct 11, 10:23 AM · Restricted Project

Wed, Oct 9

davidxl accepted D68601: [SampleFDO] Add indexing for function profiles so they can be loaded on demand in ExtBinary format.

lgtm

Wed, Oct 9, 11:36 AM · Restricted Project
davidxl added inline comments to D68601: [SampleFDO] Add indexing for function profiles so they can be loaded on demand in ExtBinary format.
Wed, Oct 9, 11:08 AM · Restricted Project

Tue, Oct 8

davidxl added inline comments to D68601: [SampleFDO] Add indexing for function profiles so they can be loaded on demand in ExtBinary format.
Tue, Oct 8, 3:58 PM · Restricted Project
davidxl accepted D68616: [CodeExtractor] Factor out and reuse shrinkwrap analysis.

lgtm

Tue, Oct 8, 9:47 AM · Restricted Project

Fri, Oct 4

davidxl accepted D68253: [SampleFDO] Add compression support for any section in ExtBinary profile format.

lgtm

Fri, Oct 4, 7:51 PM · Restricted Project
davidxl added a comment to D68253: [SampleFDO] Add compression support for any section in ExtBinary profile format.

llvmprof command documentation also needs to be updated.

Fri, Oct 4, 4:40 PM · Restricted Project

Thu, Oct 3

davidxl added a comment to D68351: [profile] Add a mode to continuously sync counter updates to a file.

+petr who has similar needs for Fuchia platform

Thu, Oct 3, 11:16 AM · Restricted Project
davidxl added a reviewer for D68351: [profile] Add a mode to continuously sync counter updates to a file: phosek.
Thu, Oct 3, 11:16 AM · Restricted Project
davidxl added inline comments to D68253: [SampleFDO] Add compression support for any section in ExtBinary profile format.
Thu, Oct 3, 11:14 AM · Restricted Project

Tue, Oct 1

davidxl added a comment to D67120: [PGO] Profile guided code size optimization (continued)..

This patch should add test cases for each affected codegen passes.

Tue, Oct 1, 11:46 AM · Restricted Project

Sun, Sep 29

davidxl added a comment to D67989: [ValueTracking] Improve pointer offset computation for cases of same base.

looks fine to me, but please wait for evghenii@'s comment.

Sun, Sep 29, 11:02 AM · Restricted Project
davidxl accepted D67920: [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins..

lgtm, but please wait to see if xur@ has more comments.

Sun, Sep 29, 11:01 AM · Restricted Project

Fri, Sep 27

davidxl accepted D68047: [SampleFDO] Create a separate flag ProfileAccurateForProfSymList for handling profile symbol list.

lgtm

Fri, Sep 27, 1:58 PM · Restricted Project
davidxl added inline comments to D68047: [SampleFDO] Create a separate flag ProfileAccurateForProfSymList for handling profile symbol list.
Fri, Sep 27, 11:31 AM · Restricted Project
davidxl added a comment to D67920: [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins..

This generally looks good, but I suggest changing the name of ValueProfileOracle to ValueProfileCollector to make it explicit.

Fri, Sep 27, 10:11 AM · Restricted Project
davidxl added inline comments to D68047: [SampleFDO] Create a separate flag ProfileAccurateForProfSymList for handling profile symbol list.
Fri, Sep 27, 9:50 AM · Restricted Project

Wed, Sep 25

davidxl added inline comments to D68047: [SampleFDO] Create a separate flag ProfileAccurateForProfSymList for handling profile symbol list.
Wed, Sep 25, 3:57 PM · Restricted Project
davidxl added inline comments to D68047: [SampleFDO] Create a separate flag ProfileAccurateForProfSymList for handling profile symbol list.
Wed, Sep 25, 3:55 PM · Restricted Project

Tue, Sep 24

davidxl accepted D67377: [PGO][PGSO] ProfileSummary changes..

lgtm

Tue, Sep 24, 9:55 AM · Restricted Project

Mon, Sep 23

davidxl accepted D67931: [SampleFDO] Treat names in profile as not cold only when profile symbol list is available.

lgtm

Mon, Sep 23, 2:29 PM · Restricted Project
davidxl added a reviewer for D67920: [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins.: davidxl.
Mon, Sep 23, 1:28 PM · Restricted Project
davidxl added inline comments to D67561: [SampleFDO] minimize performance impact when profile-sample-accurate is enabled.
Mon, Sep 23, 9:52 AM · Restricted Project

Fri, Sep 20

davidxl accepted D67716: [Inliner] Remove incorrect early exit during switch cost computation.

lgtm

Fri, Sep 20, 2:12 PM · Restricted Project
davidxl added a comment to D67377: [PGO][PGSO] ProfileSummary changes..

Some unit tests can be added to llvm/unittests/ProfileData/InstrProfTest.cpp -- there are existing profile summary tests that can be extended.

Fri, Sep 20, 10:21 AM · Restricted Project

Thu, Sep 19

davidxl accepted D67726: [SampleFDO] Expose an interface to return the size of a section or the size of the profile for profile in ExtBinary format.

lgtm

Thu, Sep 19, 4:20 PM · Restricted Project
davidxl added inline comments to D67377: [PGO][PGSO] ProfileSummary changes..
Thu, Sep 19, 2:28 PM · Restricted Project
davidxl added inline comments to D67726: [SampleFDO] Expose an interface to return the size of a section or the size of the profile for profile in ExtBinary format.
Thu, Sep 19, 2:02 PM · Restricted Project
davidxl added a comment to D67716: [Inliner] Remove incorrect early exit during switch cost computation.

Is any compile time impact witnessed?

Thu, Sep 19, 11:47 AM · Restricted Project
davidxl added a comment to D67726: [SampleFDO] Expose an interface to return the size of a section or the size of the profile for profile in ExtBinary format.

Sounds a tricky situation to handle. Suppose the profile size increases some limit, what criterial should be used to trim the size? Trim the symbol list or drop more samples?

Thu, Sep 19, 11:45 AM · Restricted Project
davidxl added a comment to D67726: [SampleFDO] Expose an interface to return the size of a section or the size of the profile for profile in ExtBinary format.

Is the intended workflow to create a profile with full symbol list and then have an option to trim symbol list according to size impact? Why not do the trimming at the time of the profile creation?

Thu, Sep 19, 10:47 AM · Restricted Project

Wed, Sep 18

davidxl added a comment to D67726: [SampleFDO] Expose an interface to return the size of a section or the size of the profile for profile in ExtBinary format.

Missing tests.

Wed, Sep 18, 1:32 PM · Restricted Project

Tue, Sep 17

davidxl accepted D67673: [PGO] Change hardcoded thresholds for cold/inlinehint to use summary.

you are right. lgtm

Tue, Sep 17, 2:21 PM · Restricted Project
davidxl added inline comments to D67673: [PGO] Change hardcoded thresholds for cold/inlinehint to use summary.
Tue, Sep 17, 2:03 PM · Restricted Project
davidxl accepted D67561: [SampleFDO] minimize performance impact when profile-sample-accurate is enabled.

lgtm

Tue, Sep 17, 11:58 AM · Restricted Project
davidxl added inline comments to D67561: [SampleFDO] minimize performance impact when profile-sample-accurate is enabled.
Tue, Sep 17, 9:33 AM · Restricted Project

Sep 15 2019

davidxl added a comment to D67561: [SampleFDO] minimize performance impact when profile-sample-accurate is enabled.

If we use NameTable, is ProfileSymbolList still needed? I assume NameTable is a superset ?

Sep 15 2019, 11:18 AM · Restricted Project

Sep 11 2019

davidxl added a comment to D67377: [PGO][PGSO] ProfileSummary changes..

It is useful to have generic interface like isHotCountNthPercentile(..) to check if a count is hot relative to a given percentile cutoff. In theory, PGSO does not have a fixed hotness threshold as it depends on workingset size. If we partition working set size into ranges like small, medium, large, huge, then PGSO can use different hotness thresholds based on that.

Sep 11 2019, 11:52 AM · Restricted Project
davidxl added inline comments to D64376: [MBP] Avoid tail duplication if it can't bring benefit.
Sep 11 2019, 8:50 AM · Restricted Project
davidxl accepted D67435: Make SwitchInstProfUpdateWrapper strict permanently.

lgtm

Sep 11 2019, 8:44 AM · Restricted Project

Sep 10 2019

davidxl added a comment to D67377: [PGO][PGSO] ProfileSummary changes..

I don't think we should use 'PGSO' in the profile summary class. Instead, we should differentiate it from 'hot' with other categories like VeryHot, LukeWarm etc ...

Sep 10 2019, 10:55 AM · Restricted Project

Sep 6 2019

davidxl added a comment to D65303: [BPI] Adjust the probability for floating point unordered comparison.

some benchmark numbers?

Sep 6 2019, 11:11 AM · Restricted Project

Sep 4 2019

davidxl accepted D67198: [PGO][CHR] Speed up following long, interlinked use-def chains..

you can probably speed up it a little by using the insert interface, but it may make code less readable. LGTM

Sep 4 2019, 7:03 PM · Restricted Project

Sep 3 2019

davidxl accepted D66985: [llvm-profdata] Add mode to recover from profile read failures.

lgtm

Sep 3 2019, 2:18 PM · Restricted Project
davidxl added a comment to D67120: [PGO] Profile guided code size optimization (continued)..

Can you split the patches into smaller ones -- at least 3 : ProfileSummary API changes, TTI API changes, and the rest (may need to be split too, but we will see).

Sep 3 2019, 2:18 PM · Restricted Project
davidxl added inline comments to D66985: [llvm-profdata] Add mode to recover from profile read failures.
Sep 3 2019, 12:41 PM · Restricted Project
davidxl added a comment to D66985: [llvm-profdata] Add mode to recover from profile read failures.

A separate mode is fine. Buffering the errors and reporting them later is also useful (allowing more context info to be emitted).

Sep 3 2019, 10:08 AM · Restricted Project
davidxl accepted D66979: [InstrProf] Tighten a check for malformed data records in raw profiles.

lgtm

Sep 3 2019, 9:36 AM · Restricted Project
davidxl added a comment to D66985: [llvm-profdata] Add mode to recover from profile read failures.

yes, the old behavior should be the default. It raises the awareness of the problem (and merge errors are usually rare in reality).

Sep 3 2019, 9:35 AM · Restricted Project

Aug 30 2019

davidxl accepted D66766: [SampleFDO] Add symbol whitelist section to discriminate function being cold versus function being newly added.

lgtm (please consolidate two test cases by factoring the common source code out and have two wrapper tests referencing it).

Aug 30 2019, 2:25 PM · Restricted Project

Aug 29 2019

davidxl added a comment to D66985: [llvm-profdata] Add mode to recover from profile read failures.

This is a behavior change and I think it should be guarded with an option. The default of the option should be set to 'FailOnAnyWhenMerge' instead of 'FailOnAllWhenMerge'.

Aug 29 2019, 9:51 PM · Restricted Project
davidxl added inline comments to D66979: [InstrProf] Tighten a check for malformed data records in raw profiles.
Aug 29 2019, 9:49 PM · Restricted Project
davidxl added inline comments to D66979: [InstrProf] Tighten a check for malformed data records in raw profiles.
Aug 29 2019, 7:31 PM · Restricted Project
davidxl added a comment to D66766: [SampleFDO] Add symbol whitelist section to discriminate function being cold versus function being newly added.

Suggesting on the naming: instead of using SymbolWhiteList, use 'ProfileSymbolList', or just 'SymbolList'. Otherwise the patch looks ok

Aug 29 2019, 10:43 AM · Restricted Project

Aug 27 2019

davidxl added inline comments to D66766: [SampleFDO] Add symbol whitelist section to discriminate function being cold versus function being newly added.
Aug 27 2019, 11:33 AM · Restricted Project

Aug 24 2019

davidxl accepted D66693: [SampleFDO] Extract the code calling each section reader to addOneSection.

lgtm

Aug 24 2019, 9:21 AM · Restricted Project

Aug 22 2019

davidxl accepted D66513: [SampleFDO] Add ExtBinary format to support extension of binary profile.

lgtm

Aug 22 2019, 4:47 PM · Restricted Project
davidxl added inline comments to D66374: [SampleFDO] Add symbol whitelist in the profile and use it when profile-sample-accurate is enabled.
Aug 22 2019, 3:33 PM · Restricted Project
davidxl added a comment to D66513: [SampleFDO] Add ExtBinary format to support extension of binary profile.

LLC miss info should be very sparse, so mixing it with LBR may not bring a lot of benefit. Having mixure of different types of profile data can lead to combinatorial growth of the number of readers. As the number of profile types increases, it can cause the reader to be unmaintaintable. That is why I suggest making it clean -- one type per section.

Aug 22 2019, 2:24 PM · Restricted Project

Aug 21 2019

davidxl added a comment to D66513: [SampleFDO] Add ExtBinary format to support extension of binary profile.

llvm-profdata should also have a round trip test:

Aug 21 2019, 9:53 AM · Restricted Project

Aug 19 2019

davidxl added a comment to D66374: [SampleFDO] Add symbol whitelist in the profile and use it when profile-sample-accurate is enabled.

Can you split the format extension change into a separate patch?

Aug 19 2019, 8:38 AM · Restricted Project

Aug 9 2019

davidxl added a comment to D65303: [BPI] Adjust the probability for floating point unordered comparison.

static prediction is intended to help common use cases, so for corner cases when NaNs are used frequently, user will need to resort to source annotation (such as builtin_expect).

Aug 9 2019, 12:02 PM · Restricted Project

Aug 8 2019

davidxl accepted D65673: [MBP] Disable aggressive loop rotate in plain mode.

lgtm

Aug 8 2019, 10:33 AM · Restricted Project

Aug 7 2019

davidxl requested changes to D65673: [MBP] Disable aggressive loop rotate in plain mode.

See Some minor name suggestions, also

Aug 7 2019, 8:53 PM · Restricted Project
davidxl added inline comments to D65673: [MBP] Disable aggressive loop rotate in plain mode.
Aug 7 2019, 3:55 AM · Restricted Project

Jul 29 2019

davidxl added a comment to D65060: [LICM] Make Loop ICM profile aware.

This version looks fine to me, but please let other reviewers to weigh in as well.

Jul 29 2019, 10:01 AM · Restricted Project

Jul 25 2019

davidxl accepted D65245: [profile] In Android, do not mkdir() dirs in GCOV_PREFIX.

lgtm

Jul 25 2019, 2:52 PM · Restricted Project, Restricted Project
davidxl added inline comments to D65245: [profile] In Android, do not mkdir() dirs in GCOV_PREFIX.
Jul 25 2019, 2:21 PM · Restricted Project, Restricted Project
davidxl added a comment to D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.

I suspect other affected cases are due to bad static profile data too.

Jul 25 2019, 8:22 AM · Restricted Project

Jul 24 2019

davidxl added inline comments to D65245: [profile] In Android, do not mkdir() dirs in GCOV_PREFIX.
Jul 24 2019, 8:45 PM · Restricted Project, Restricted Project
davidxl added inline comments to D65060: [LICM] Make Loop ICM profile aware.
Jul 24 2019, 11:51 AM · Restricted Project
davidxl accepted D64061: Force check prof branch_weights consistency in SwitchInstProfUpdateWrapper.

I did some test with the patch with samplePGO and it works fine. LGTM

Jul 24 2019, 10:18 AM · Restricted Project
davidxl added a comment to D65060: [LICM] Make Loop ICM profile aware.

It is also better to introduce a coldness factor parameter 'F', i.e, if the source block's count is less than 1/F of the header count, suppress the hoisting.

Jul 24 2019, 9:39 AM · Restricted Project

Jul 22 2019

davidxl added a comment to D65060: [LICM] Make Loop ICM profile aware.

Hal probably remembered more details. IIRC, the argument was that LICM provides IR canonicalization which can simplify analysis -- there were some examples about exposed vectorization opportunities etc.

Jul 22 2019, 12:14 PM · Restricted Project
davidxl added a comment to D65060: [LICM] Make Loop ICM profile aware.

This was tried before. IIRC, the conclusion was to implement look sinking pass to undo non-profitable LICM. The loop sinking pass was in D22778. Can the loop sinking pass be enhanced to handle the case here ( I have not looked in details) ?

Jul 22 2019, 11:48 AM · Restricted Project

Jul 19 2019

davidxl added a comment to D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.

carrot, can you help looking into this? The cost model should look into extra direct jumps introduced as well.

Jul 19 2019, 8:02 AM · Restricted Project

Jul 18 2019

davidxl added a comment to D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.

Is the test case slow down with PGO or not? Also do you have branch misprediction perf data? (large slowdowns like this is usually triggered by side effect like this). Is there a trimmed down version to demonstrate the issue?

Jul 18 2019, 8:33 AM · Restricted Project

Jul 16 2019

davidxl added inline comments to D64376: [MBP] Avoid tail duplication if it can't bring benefit.
Jul 16 2019, 3:40 PM · Restricted Project

Jul 12 2019

davidxl added inline comments to D64376: [MBP] Avoid tail duplication if it can't bring benefit.
Jul 12 2019, 9:59 AM · Restricted Project

Jul 11 2019

davidxl added a comment to D64376: [MBP] Avoid tail duplication if it can't bring benefit.

Can you put an example (text CFG) showing cases where tailDup is bad -- possibly as a source comment?

Jul 11 2019, 9:12 AM · Restricted Project
davidxl accepted D64547: [Driver] -noprofilelib flag.

lgtm

Jul 11 2019, 7:56 AM · Restricted Project, Restricted Project

Jul 10 2019

davidxl accepted D64463: [CodeExtractor] Fix sinking of allocas with multiple bitcast uses (PR42451).

lgtm

Jul 10 2019, 8:42 AM · Restricted Project

Jul 9 2019

davidxl added a comment to D64045: [InstrProfiling] Put instrumentation into comdat group with function.

Some end-to-end tests as in compiler-rt are probably helpful here.

Jul 9 2019, 9:18 PM · Restricted Project
davidxl accepted D64467: [CodeExtractor] Simplify findAllocas, NFC.

lgtm

Jul 9 2019, 9:17 PM · Restricted Project
davidxl added a comment to D64463: [CodeExtractor] Fix sinking of allocas with multiple bitcast uses (PR42451).

Is it possible to split the patch into a NFC refactoring and one functional change?

Jul 9 2019, 7:05 PM · Restricted Project

Jul 8 2019

davidxl accepted D64360: [llvm-profdata] Handle the cases of overlapping input file and output file.

lgtm

Jul 8 2019, 1:05 PM · Restricted Project
davidxl added inline comments to D64360: [llvm-profdata] Handle the cases of overlapping input file and output file.
Jul 8 2019, 12:15 PM · Restricted Project

Jul 5 2019

davidxl accepted D64233: Prepare for making SwitchInstProfUpdateWrapper strict.

lgtm

Jul 5 2019, 8:57 AM · Restricted Project

Jul 4 2019

davidxl added a comment to D64061: Force check prof branch_weights consistency in SwitchInstProfUpdateWrapper.

please flip the flag to false by default and check in the rest first.

Jul 4 2019, 4:57 PM · Restricted Project

Jul 3 2019

davidxl added a comment to D64061: Force check prof branch_weights consistency in SwitchInstProfUpdateWrapper.

my test hit some other unrelated debug assert. Can you first change the debug assert into error message so that there is no need to use assert enabled build to test the option?

Jul 3 2019, 2:39 PM · Restricted Project
davidxl added a comment to D63949: [PGO] Add profile instrumentation sampling support.

Does the bursty style sampling provide additional benefit? A non-bursty style sampling can be cheaper:

Jul 3 2019, 1:43 PM · Restricted Project
davidxl added a comment to D64045: [InstrProfiling] Put instrumentation into comdat group with function.

Do you have a functional test case to show what this patch is trying to accomplish/fix?

Jul 3 2019, 1:34 PM · Restricted Project

Jul 2 2019

davidxl added a comment to D64061: Force check prof branch_weights consistency in SwitchInstProfUpdateWrapper.

let me do some internal PGO build tomorrow with the option on and get back.

Jul 2 2019, 9:59 PM · Restricted Project