Page MenuHomePhabricator

davidxl (David Li)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 13 2015, 9:48 AM (227 w, 4 d)

Recent Activity

Yesterday

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

lgtm

Thu, Aug 22, 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.
Thu, Aug 22, 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.

Thu, Aug 22, 2:24 PM · Restricted Project

Wed, Aug 21

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:

Wed, Aug 21, 9:53 AM · Restricted Project

Mon, Aug 19

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?

Mon, Aug 19, 8:38 AM · Restricted Project

Fri, Aug 9

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

Fri, Aug 9, 12:02 PM · Restricted Project

Thu, Aug 8

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

lgtm

Thu, Aug 8, 10:33 AM · Restricted Project

Wed, Aug 7

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

See Some minor name suggestions, also

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

Mon, Jul 29

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.

Mon, Jul 29, 10:01 AM · Restricted Project

Thu, Jul 25

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

lgtm

Thu, Jul 25, 2:52 PM · Restricted Project, Restricted Project
davidxl added inline comments to D65245: [profile] In Android, do not mkdir() dirs in GCOV_PREFIX.
Thu, Jul 25, 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.

Thu, Jul 25, 8:22 AM · Restricted Project

Wed, Jul 24

davidxl added inline comments to D65245: [profile] In Android, do not mkdir() dirs in GCOV_PREFIX.
Wed, Jul 24, 8:45 PM · Restricted Project, Restricted Project

Jul 24 2019

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
davidxl added a comment to D64061: Force check prof branch_weights consistency in SwitchInstProfUpdateWrapper.

What types of testing has been done ? I assume the code base now is relatively clean so it is safe to turn this on by default?

Jul 2 2019, 11:28 AM · Restricted Project

Jul 1 2019

davidxl added inline comments to D64045: [InstrProfiling] Put instrumentation into comdat group with function.
Jul 1 2019, 4:28 PM · Restricted Project

Jun 28 2019

davidxl added a comment to D63155: [clang][NewPM] Fix broken profile test.

Rong, can you take a look at this patch?

Jun 28 2019, 4:01 PM · Restricted Project, Restricted Project
davidxl updated subscribers of D63155: [clang][NewPM] Fix broken profile test.
Jun 28 2019, 3:58 PM · Restricted Project, Restricted Project

Jun 24 2019

davidxl added a comment to D59225: [profile] Support for GCDA profiling in Fuchsia.

The refactoring part looks ok. +vsk to double check.

Jun 24 2019, 10:08 AM · Restricted Project, Restricted Project
davidxl added a reviewer for D59225: [profile] Support for GCDA profiling in Fuchsia: vsk.
Jun 24 2019, 10:07 AM · Restricted Project, Restricted Project

Jun 21 2019

davidxl added a reviewer for D63671: [llvm-profdata] Avoid keeping reference to every files: wmi.
Jun 21 2019, 2:14 PM · Restricted Project
davidxl added a comment to D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data.

Is there a bug reference somewhere?

Jun 21 2019, 7:33 AM · Restricted Project, Restricted Project

Jun 13 2019

davidxl accepted D63232: [Coverage] Load code coverage data from archives.

lgtm

Jun 13 2019, 1:18 PM · Restricted Project
davidxl added a comment to D63232: [Coverage] Load code coverage data from archives.

llvm-cov's user manual probably also needs some update.

Jun 13 2019, 11:32 AM · Restricted Project
davidxl added a comment to D63232: [Coverage] Load code coverage data from archives.

is thin archive supported?

Jun 13 2019, 11:26 AM · Restricted Project

Jun 11 2019

davidxl edited reviewers for D63161: Devirtualize destructor of final class., added: rsmith; removed: davidxl.
Jun 11 2019, 1:22 PM · Restricted Project, Restricted Project

Jun 10 2019

davidxl accepted D62700: [PGO] Handle cases of non-instrument BBs.

lgtm

Jun 10 2019, 2:58 PM · Restricted Project
davidxl added a comment to D62700: [PGO] Handle cases of non-instrument BBs.

This can be handled this way:

Jun 10 2019, 2:05 PM · Restricted Project
davidxl accepted D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.

Warning. With static profiling, the layout strategy based on the 'precise' cost model may be off. If for some reason this causes issues later, the change should be guarded with 'hasProfile' check.

Jun 10 2019, 11:06 AM · Restricted Project
davidxl added inline comments to D62700: [PGO] Handle cases of non-instrument BBs.
Jun 10 2019, 9:51 AM · Restricted Project
davidxl added inline comments to D62700: [PGO] Handle cases of non-instrument BBs.
Jun 10 2019, 9:33 AM · Restricted Project

Jun 7 2019

davidxl added inline comments to D62700: [PGO] Handle cases of non-instrument BBs.
Jun 7 2019, 10:25 AM · Restricted Project

Jun 6 2019

davidxl added inline comments to D62700: [PGO] Handle cases of non-instrument BBs.
Jun 6 2019, 11:14 AM · Restricted Project
davidxl committed rG758c08921da7: [Profile]: Add runtime interface to specify file handle for profile data (Part… (authored by davidxl).
[Profile]: Add runtime interface to specify file handle for profile data (Part…
Jun 6 2019, 9:27 AM
davidxl committed rL362716: [Profile]: Add runtime interface to specify file handle for profile data (Part….
[Profile]: Add runtime interface to specify file handle for profile data (Part…
Jun 6 2019, 9:26 AM

Jun 5 2019

davidxl committed rGc1867557d93d: [Profile]: Add runtime interface to specify file handle for profile data. (authored by davidxl).
[Profile]: Add runtime interface to specify file handle for profile data.
Jun 5 2019, 11:33 PM
davidxl committed rL362676: [Profile]: Add runtime interface to specify file handle for profile data..
[Profile]: Add runtime interface to specify file handle for profile data.
Jun 5 2019, 11:32 PM
davidxl closed D62541: Adding a function for setting coverage output file..
Jun 5 2019, 11:32 PM · Restricted Project, Restricted Project
davidxl added a comment to D62541: Adding a function for setting coverage output file..

It is just more convenient for you to contribute to LLVM in the future. I can help you commit this time.

Jun 5 2019, 4:27 PM · Restricted Project, Restricted Project
davidxl added a comment to D62541: Adding a function for setting coverage output file..

I suggest you apply for commit right first. There are likely fallouts that need to be dealt with.

Jun 5 2019, 2:21 PM · Restricted Project, Restricted Project
davidxl accepted D62541: Adding a function for setting coverage output file..

lgtm. Watch out for problems on other platforms.

Jun 5 2019, 9:49 AM · Restricted Project, Restricted Project

Jun 4 2019

davidxl added inline comments to D62541: Adding a function for setting coverage output file..
Jun 4 2019, 2:13 PM · Restricted Project, Restricted Project

Jun 3 2019

davidxl accepted D62656: Make SwitchInstProfUpdateWrapper safer.

lgtm assuming the state tracking code gets removed (or put under NDEBUG in some way) after the cleanup.

Jun 3 2019, 8:59 AM · Restricted Project

May 31 2019

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

For all the test cases update, please also validate if they make sense or not if possible.

May 31 2019, 2:08 PM · Restricted Project
davidxl added a comment to D62656: Make SwitchInstProfUpdateWrapper safer.

once the cleanup is done, the state tracking should be removed as well.

May 31 2019, 12:39 PM · Restricted Project

May 30 2019

davidxl added a comment to D62656: Make SwitchInstProfUpdateWrapper safer.

I suggest the following path:

  1. add an option to enforce internal error on inconsistency; by default the inconsistency is ignored.
  2. fix the exposed root cause one by one
  3. turn on the option by default
May 30 2019, 11:41 PM · Restricted Project
davidxl added a comment to D62541: Adding a function for setting coverage output file..

Sounds reasonable -- the intention is clear with this -- the interface tells runtime to do whatever needed to ensure merging. Please send a patch with merging test case.

May 30 2019, 3:36 PM · Restricted Project, Restricted Project
davidxl added inline comments to D62700: [PGO] Handle cases of non-instrument BBs.
May 30 2019, 2:02 PM · Restricted Project
davidxl added a comment to D62656: Make SwitchInstProfUpdateWrapper safer.

What I meant is that we should never see inconsistent state and instead of setting invalid state, we assert there. Ideally, the profile setting/update APIs should help user avoid creating the inconsistent state in the first place (i.e., catch the problem on the spot).

May 30 2019, 11:21 AM · Restricted Project
davidxl added inline comments to D62656: Make SwitchInstProfUpdateWrapper safer.
May 30 2019, 10:59 AM · Restricted Project

May 29 2019

davidxl added inline comments to D62541: Adding a function for setting coverage output file..
May 29 2019, 5:08 PM · Restricted Project, Restricted Project
davidxl added a comment to D62541: Adding a function for setting coverage output file..

I think it is cleaner for user to make the intention clear by passing the flag if the file handle is passed to the runtime. Otherwise the runtime will have to guess/assume user's intention (e.g, also reopen the file with "r+b" mode for merging).

May 29 2019, 4:43 PM · Restricted Project, Restricted Project
davidxl added a comment to D62541: Adding a function for setting coverage output file..

To support merging, the new interface needs to take more

May 29 2019, 3:31 PM · Restricted Project, Restricted Project

May 28 2019

davidxl added a comment to D62540: [SampleFDO] For functions without profiles, provide an option to put them in a special text section.

Why is symbol remapping an issue? old MD5 --> input symbol name -> output symbol name --> mapped MD5sum ?

May 28 2019, 3:46 PM · Restricted Project
davidxl added a comment to D62540: [SampleFDO] For functions without profiles, provide an option to put them in a special text section.

what is the main blocker for the longer term solution?

May 28 2019, 3:07 PM · Restricted Project
davidxl added a comment to D62540: [SampleFDO] For functions without profiles, provide an option to put them in a special text section.

Longer term, the plan is to put a white list of the symbols into the profile data so that the compiler can decide if a function is newly created or simply cold.

May 28 2019, 2:34 PM · Restricted Project
davidxl added a comment to D62541: Adding a function for setting coverage output file..

There should be a test case.

May 28 2019, 1:28 PM · Restricted Project, Restricted Project
davidxl accepted D62439: PGO] Handle cases of failing to split critical edges.

lgtm

May 28 2019, 11:07 AM · Restricted Project
davidxl added inline comments to D62439: PGO] Handle cases of failing to split critical edges.
May 28 2019, 10:09 AM · Restricted Project

May 27 2019

davidxl added inline comments to D62439: PGO] Handle cases of failing to split critical edges.
May 27 2019, 6:01 PM · Restricted Project

May 24 2019

davidxl added inline comments to D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.
May 24 2019, 4:21 PM · Restricted Project
davidxl added a comment to D62079: [MBP] Rotate should bring more fallthrough.

Does this patch handle the case in D62079? If yes, you can move the tests added in that patch here.

May 24 2019, 9:39 AM · Restricted Project

May 23 2019

davidxl accepted D62122: [NFC] Introduce SwitchInst wrapper for prof branch_weights handling.

lgtm

May 23 2019, 4:41 PM · Restricted Project

May 22 2019

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

Indeed. The original one is O(N^2). LGTM.

May 22 2019, 11:31 AM · Restricted Project
davidxl added a comment to D62262: [PGO][CHR] Speed up following long use-def chains..

was there a quadratic behavior before ? It seems linear before and after the patch -- but just cut the computation by a factor of 2 . Do you need an option to control the max chain length?

May 22 2019, 10:14 AM · Restricted Project

May 21 2019

davidxl added inline comments to D61540: [PGO] Use sum of count values to fix func entry count and add a check to verify BFI counts.
May 21 2019, 4:34 PM · Restricted Project
davidxl added a comment to D62079: [MBP] Rotate should bring more fallthrough.

Loop rotation not only affects fall through placement of incoming and exit edges, but internal fall through as well -- it converts the original backedge into a new fallthrough while converts an original internal fallthrough into the backedge. In other words, the overall cost/benefit needs to consider all changes. Doing pattern matching like this can lead to wrong decisions.

May 21 2019, 10:39 AM · Restricted Project
davidxl added inline comments to D62122: [NFC] Introduce SwitchInst wrapper for prof branch_weights handling.
May 21 2019, 9:27 AM · Restricted Project

May 20 2019

davidxl added a comment to D62079: [MBP] Rotate should bring more fallthrough.

I like the direction this patch is going, but I think it can do better.

May 20 2019, 3:58 PM · Restricted Project
davidxl added inline comments to D61540: [PGO] Use sum of count values to fix func entry count and add a check to verify BFI counts.
May 20 2019, 1:47 PM · Restricted Project
davidxl accepted D62078: This change adds an API to allow setting the flag to indicate that the profile data has been dumped to the file..

lgtm

May 20 2019, 12:15 PM · Restricted Project, Restricted Project
davidxl added inline comments to D62123: [NFC] SimplifyCFG prof branch_weighs handling is simplified.
May 20 2019, 12:05 PM · Restricted Project

May 15 2019

davidxl accepted D61932: Fix prof branch_weights in entry_counts_missing_dbginfo.ll test.

lgtm

May 15 2019, 8:41 AM · Restricted Project

May 14 2019

davidxl accepted D61920: [JumpThreading] A bug fix for stale loop info after unfold select.

lgtm

May 14 2019, 3:28 PM · Restricted Project

May 10 2019

davidxl accepted D61789: Skip over prefetches.

lgtm

May 10 2019, 1:43 PM · Restricted Project
davidxl added a comment to D61789: Skip over prefetches.

it is probably better to put the tests in the same file with different check prefixes.

May 10 2019, 1:15 PM · Restricted Project
davidxl added inline comments to D61789: Skip over prefetches.
May 10 2019, 8:46 AM · Restricted Project