Page MenuHomePhabricator

huangjd (William Junda Huang)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 19 2022, 12:06 AM (52 w, 2 d)

Recent Activity

Wed, Mar 15

huangjd committed rGd8690bc1eae0: [llvm-profdata] Add more unit tests to check --output-size-limit feature when… (authored by huangjd).
[llvm-profdata] Add more unit tests to check --output-size-limit feature when…
Wed, Mar 15, 5:34 PM · Restricted Project, Restricted Project
huangjd closed D144524: [llvm-profdata] Add more unit tests to check --output-size-limit feature when compression is enabled.
Wed, Mar 15, 5:34 PM · Restricted Project, Restricted Project
huangjd added reviewers for D146182: [llvm-profdata] Fixed various issue with Sample Profile Reader: davidxl, xur, kazu, ellis, snehasish.
Wed, Mar 15, 5:28 PM · Restricted Project, Restricted Project
huangjd requested review of D146182: [llvm-profdata] Fixed various issue with Sample Profile Reader.
Wed, Mar 15, 5:25 PM · Restricted Project, Restricted Project

Tue, Feb 21

huangjd requested review of D144524: [llvm-profdata] Add more unit tests to check --output-size-limit feature when compression is enabled.
Tue, Feb 21, 3:14 PM · Restricted Project, Restricted Project

Feb 8 2023

huangjd abandoned D143547: Update test because API change from main.
Feb 8 2023, 2:22 PM · Restricted Project, Restricted Project
huangjd committed rG79971d0d771a: [llvm-profdata] Add option to cap profile output size (authored by huangjd).
[llvm-profdata] Add option to cap profile output size
Feb 8 2023, 2:22 PM · Restricted Project, Restricted Project
huangjd closed D141446: [llvm-profdata] Add option to cap profile output size.
Feb 8 2023, 2:22 PM · Restricted Project, Restricted Project

Feb 7 2023

huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

update tests because API change from main

Feb 7 2023, 7:01 PM · Restricted Project, Restricted Project
huangjd reopened D141446: [llvm-profdata] Add option to cap profile output size.
Feb 7 2023, 7:01 PM · Restricted Project, Restricted Project
huangjd requested review of D143547: Update test because API change from main.
Feb 7 2023, 7:01 PM · Restricted Project, Restricted Project
huangjd added a reverting change for rG48f163b889a8: [llvm-profdata] Add option to cap profile output size: rG981218e0f88c: Revert "[llvm-profdata] Add option to cap profile output size".
Feb 7 2023, 6:31 PM · Restricted Project, Restricted Project
huangjd committed rG981218e0f88c: Revert "[llvm-profdata] Add option to cap profile output size" (authored by huangjd).
Revert "[llvm-profdata] Add option to cap profile output size"
Feb 7 2023, 6:31 PM · Restricted Project, Restricted Project
huangjd added a reverting change for D141446: [llvm-profdata] Add option to cap profile output size: rG981218e0f88c: Revert "[llvm-profdata] Add option to cap profile output size".
Feb 7 2023, 6:30 PM · Restricted Project, Restricted Project
huangjd committed rG48f163b889a8: [llvm-profdata] Add option to cap profile output size (authored by huangjd).
[llvm-profdata] Add option to cap profile output size
Feb 7 2023, 6:19 PM · Restricted Project, Restricted Project
huangjd closed D141446: [llvm-profdata] Add option to cap profile output size.
Feb 7 2023, 6:19 PM · Restricted Project, Restricted Project
huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

Cleanup unit test

Feb 7 2023, 4:25 PM · Restricted Project, Restricted Project
huangjd added inline comments to D141446: [llvm-profdata] Add option to cap profile output size.
Feb 7 2023, 1:42 PM · Restricted Project, Restricted Project

Feb 6 2023

huangjd added inline comments to D141446: [llvm-profdata] Add option to cap profile output size.
Feb 6 2023, 5:07 PM · Restricted Project, Restricted Project
huangjd committed rG84719e2f0387: [llvm-profdata] Fix bug llvm-profdata crashes when reading a text sample… (authored by huangjd).
[llvm-profdata] Fix bug llvm-profdata crashes when reading a text sample…
Feb 6 2023, 2:31 PM · Restricted Project, Restricted Project
huangjd closed D143369: [llvm-profdata] Fix bug llvm-profdata crashes when reading a text sample profile with an empty line with spaces..
Feb 6 2023, 2:30 PM · Restricted Project, Restricted Project

Feb 5 2023

huangjd added a comment to D141446: [llvm-profdata] Add option to cap profile output size.

@snehasish Please re-review since I introduced a major change to the code.

Feb 5 2023, 11:14 PM · Restricted Project, Restricted Project
huangjd retitled D141446: [llvm-profdata] Add option to cap profile output size from Fix to D139603(reverted) - moved size check to unit test so that it is cross-platform to [llvm-profdata] Add option to cap profile output size.
Feb 5 2023, 11:13 PM · Restricted Project, Restricted Project
huangjd requested review of D143369: [llvm-profdata] Fix bug llvm-profdata crashes when reading a text sample profile with an empty line with spaces..
Feb 5 2023, 11:13 PM · Restricted Project, Restricted Project

Jan 31 2023

huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

use llvm::unittest::TempFile instead

Jan 31 2023, 4:57 PM · Restricted Project, Restricted Project
huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

cleanup

Jan 31 2023, 3:47 PM · Restricted Project, Restricted Project
huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

Refactored to fix bugs on non linux platforms

Jan 31 2023, 1:07 PM · Restricted Project, Restricted Project

Jan 25 2023

huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

Update unit test, previously may crash on mac OS

Jan 25 2023, 1:13 PM · Restricted Project, Restricted Project

Jan 17 2023

huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

Updated unit test

Jan 17 2023, 5:26 PM · Restricted Project, Restricted Project
huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

Updated unit test

Jan 17 2023, 5:11 PM · Restricted Project, Restricted Project

Jan 11 2023

huangjd committed rGc268f850a299: Fix to D139603(reverted) - moved size check to unit test so that it is cross… (authored by huangjd).
Fix to D139603(reverted) - moved size check to unit test so that it is cross…
Jan 11 2023, 4:42 PM · Restricted Project, Restricted Project
huangjd closed D141446: [llvm-profdata] Add option to cap profile output size.
Jan 11 2023, 4:42 PM · Restricted Project, Restricted Project
huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

Updating D141446: Fix to D139603(reverted) - moved size check to unit test so that it is cross-platform

Jan 11 2023, 3:59 PM · Restricted Project, Restricted Project
huangjd updated the diff for D141446: [llvm-profdata] Add option to cap profile output size.

Updating D141446: Fix to D139603(reverted) - moved size check to unit test so that it is cross-platform

Jan 11 2023, 3:58 PM · Restricted Project, Restricted Project

Jan 10 2023

huangjd requested review of D141446: [llvm-profdata] Add option to cap profile output size.
Jan 10 2023, 4:45 PM · Restricted Project, Restricted Project
huangjd added a comment to D139603: [llvm-profdata] Add option to cap profile output size.

@huangjd the test you added seems to be failing on Windows. Can you take a look and revert if you need time to investigate?

https://lab.llvm.org/buildbot/#/builders/216/builds/15534

Jan 10 2023, 11:17 AM · Restricted Project, Restricted Project

Jan 9 2023

huangjd committed rG5b72d0e4f5ee: [llvm-profdata] Add option to cap profile output size (authored by huangjd).
[llvm-profdata] Add option to cap profile output size
Jan 9 2023, 2:01 PM · Restricted Project, Restricted Project
huangjd closed D139603: [llvm-profdata] Add option to cap profile output size.
Jan 9 2023, 2:01 PM · Restricted Project, Restricted Project
huangjd updated the diff for D139603: [llvm-profdata] Add option to cap profile output size.

Clarified comments

Jan 9 2023, 1:57 PM · Restricted Project, Restricted Project

Jan 4 2023

huangjd updated the diff for D139603: [llvm-profdata] Add option to cap profile output size.

Refactor: moved implementation to llvm lib so that it can be used by other tools

Jan 4 2023, 6:39 PM · Restricted Project, Restricted Project

Jan 3 2023

huangjd committed rG07107f339058: [llvm-profdata] Remove unnecessary file size check (authored by huangjd).
[llvm-profdata] Remove unnecessary file size check
Jan 3 2023, 11:25 AM · Restricted Project, Restricted Project
huangjd closed D140741: [llvm-profdata] Remove unnecessary file size check.
Jan 3 2023, 11:25 AM · Restricted Project, Restricted Project

Dec 29 2022

huangjd updated the diff for D139603: [llvm-profdata] Add option to cap profile output size.

Add comment clarifying reset() usage

Dec 29 2022, 5:33 PM · Restricted Project, Restricted Project

Dec 28 2022

huangjd added a comment to D140741: [llvm-profdata] Remove unnecessary file size check.

The check also looks suspicious by casting size_t to uint64_t. If size_t is 64 bit the cast has no effect, and if size_t is 32 bit then the condition is always false, so I don't understand what's the purpose of this check

Dec 28 2022, 4:42 PM · Restricted Project, Restricted Project
huangjd added inline comments to D139603: [llvm-profdata] Add option to cap profile output size.
Dec 28 2022, 4:37 PM · Restricted Project, Restricted Project
huangjd updated the diff for D139603: [llvm-profdata] Add option to cap profile output size.

Updating D139603: [llvm-profdata] Add option to cap profile output size

Dec 28 2022, 4:35 PM · Restricted Project, Restricted Project
huangjd added a comment to D140741: [llvm-profdata] Remove unnecessary file size check.

Some filesystems have a 4GB limit on file size (notably FAT32). Given that llvm-profdata as a tool is built for multiple platforms, I don't think we should remove this check.

Dec 28 2022, 2:39 PM · Restricted Project, Restricted Project
huangjd added reviewers for D140741: [llvm-profdata] Remove unnecessary file size check: dnovillo, davidxl, kazu, xur, ellis, snehasish.
Dec 28 2022, 1:28 PM · Restricted Project, Restricted Project
huangjd requested review of D140741: [llvm-profdata] Remove unnecessary file size check.
Dec 28 2022, 1:26 PM · Restricted Project, Restricted Project

Dec 15 2022

huangjd added a comment to D139603: [llvm-profdata] Add option to cap profile output size.

As for down sampling, having a sample count of 0 vs not having a sample means differently to the compiler, so that may change the branch basic block placement on hot functions, not sure if good idea.

Dec 15 2022, 5:55 PM · Restricted Project, Restricted Project
huangjd added a comment to D139603: [llvm-profdata] Add option to cap profile output size.

The biggest challenge to compute the number of functions accurately is the compression in extbinary, because the compressed size is non-linear to the original size. Since profile samples and function names are written to different sections (and in CS profile the names are split into two sections and samples can also be split into two sections), there is no way to predict ahead the offset between them. Based on use cases, the current heuristic is under estimating how many functions to prune (and the last iteration typically converges to pruning 1 function) so it's unlikely to remove too many functions. (Note: Also tried using cubic equation for heuristic but that will remove too many functions, so the optimal heuristic is between O(n^2) and O(n^3))

Dec 15 2022, 5:53 PM · Restricted Project, Restricted Project
huangjd added a reviewer for D139603: [llvm-profdata] Add option to cap profile output size: snehasish.
Dec 15 2022, 1:29 PM · Restricted Project, Restricted Project
huangjd added reviewers for D139603: [llvm-profdata] Add option to cap profile output size: xur, kazu, ellis, gulfem.
Dec 15 2022, 11:51 AM · Restricted Project, Restricted Project
huangjd updated the diff for D139603: [llvm-profdata] Add option to cap profile output size.

Added output size check

Dec 15 2022, 11:45 AM · Restricted Project, Restricted Project

Dec 14 2022

huangjd added inline comments to D139603: [llvm-profdata] Add option to cap profile output size.
Dec 14 2022, 4:51 PM · Restricted Project, Restricted Project
huangjd updated the diff for D139603: [llvm-profdata] Add option to cap profile output size.

Refactored code structure
Use a string buffer to rewrite files
Added API for potential new strategy to reduce profile size

Dec 14 2022, 4:48 PM · Restricted Project, Restricted Project
huangjd added inline comments to D139603: [llvm-profdata] Add option to cap profile output size.
Dec 14 2022, 4:47 PM · Restricted Project, Restricted Project

Dec 7 2022

huangjd added a comment to D139603: [llvm-profdata] Add option to cap profile output size.

https://discourse.llvm.org/t/rfc-add-option-to-limit-llvm-profdata-profile-output-size/67036 for RFC

Dec 7 2022, 8:24 PM · Restricted Project, Restricted Project
huangjd requested review of D139603: [llvm-profdata] Add option to cap profile output size.
Dec 7 2022, 8:23 PM · Restricted Project, Restricted Project

Dec 1 2022

huangjd added a comment to D125845: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the back.

I would need some clarification on inbounds keyword. When an inbounds GEP of GEP is being transformed, what kind of transformation and conditions keep the new GEP inbounds? For example GEP inbounds (GEP inbounds P a) b is equivalent to GEP inbounds (GEP inbounds P b) a if and only if a and b have the same sign. Are there other algebraically valid transformations? This actually does affect D137212 since it is swapping constant indexed GEP. Maybe I misunderstood what inbounds implies? I noticed arbitrary pointer arithmetic expression in C generates inbounds GEP even the pointer is clearly not pointing to any allocated object

Dec 1 2022, 12:04 PM · Restricted Project, Restricted Project

Nov 29 2022

huangjd committed rGbe4b1dd35bd1: [InstCombine] Revert D125845 (authored by huangjd).
[InstCombine] Revert D125845
Nov 29 2022, 2:04 PM · Restricted Project, Restricted Project
huangjd added a reverting change for D125845: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the back: rGbe4b1dd35bd1: [InstCombine] Revert D125845.
Nov 29 2022, 2:04 PM · Restricted Project, Restricted Project
huangjd closed D138950: [InstCombine] Revert D125845.
Nov 29 2022, 2:03 PM · Restricted Project, Restricted Project
huangjd added a comment to D125845: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the back.

D138950 to revert this patch. Looks like reverting it will not interfere with D137212

Nov 29 2022, 1:52 PM · Restricted Project, Restricted Project
huangjd requested review of D138950: [InstCombine] Revert D125845.
Nov 29 2022, 1:50 PM · Restricted Project, Restricted Project

Nov 22 2022

huangjd added a comment to D125845: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the back.

Could someone reproduce the test case (and benchmarking results) showing regression?

Nov 22 2022, 11:29 AM · Restricted Project, Restricted Project

Nov 10 2022

huangjd added inline comments to D137664: [InstCombine][NFC] Baseline tests for D137212 Simplify chain of GEP with constant indices.
Nov 10 2022, 4:00 PM · Restricted Project, Restricted Project
huangjd committed rGbd2b5ec8038e: [InstCombine] PR58901 - fix bug with swapping GEP of different types (authored by huangjd).
[InstCombine] PR58901 - fix bug with swapping GEP of different types
Nov 10 2022, 12:25 PM · Restricted Project, Restricted Project
huangjd closed D137752: [InstCombine] PR58901 - fix bug with swapping GEP of different types.
Nov 10 2022, 12:24 PM · Restricted Project, Restricted Project

Nov 9 2022

huangjd added a reviewer for D137752: [InstCombine] PR58901 - fix bug with swapping GEP of different types: clin1.
Nov 9 2022, 4:43 PM · Restricted Project, Restricted Project
huangjd requested review of D137752: [InstCombine] PR58901 - fix bug with swapping GEP of different types.
Nov 9 2022, 4:39 PM · Restricted Project, Restricted Project

Nov 8 2022

huangjd updated the diff for D137212: [InstCombine] Simplify chain of GEP with constant indices.

Merged after adding baseline

Nov 8 2022, 4:43 PM · Restricted Project, Restricted Project
huangjd added a comment to D137212: [InstCombine] Simplify chain of GEP with constant indices.

See D137664 for baseline

Nov 8 2022, 12:30 PM · Restricted Project, Restricted Project
huangjd requested review of D137664: [InstCombine][NFC] Baseline tests for D137212 Simplify chain of GEP with constant indices.
Nov 8 2022, 12:29 PM · Restricted Project, Restricted Project

Nov 1 2022

huangjd updated the summary of D137212: [InstCombine] Simplify chain of GEP with constant indices.
Nov 1 2022, 5:04 PM · Restricted Project, Restricted Project
huangjd requested review of D137212: [InstCombine] Simplify chain of GEP with constant indices.
Nov 1 2022, 5:03 PM · Restricted Project, Restricted Project

Oct 20 2022

huangjd abandoned D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.
Oct 20 2022, 11:04 AM · Restricted Project, Restricted Project
huangjd committed rG6c767cef5a1d: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the… (authored by huangjd).
[InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the…
Oct 20 2022, 10:42 AM · Restricted Project, Restricted Project
huangjd closed D125845: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the back.
Oct 20 2022, 10:41 AM · Restricted Project, Restricted Project
huangjd updated the diff for D125845: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the back.

merge with main

Oct 20 2022, 10:38 AM · Restricted Project, Restricted Project

Oct 12 2022

huangjd added a comment to D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.

follow up @davidxl
For the original issue where a chain of 3 or more gep with the first and last being constant indexed cannot be simplified, this patch can handle such case while D125845 can't
Consider the following code

01   b = gep a, const_index
02   use(b)
03   c = gep b, var_index
04   d = gep c, const_index
05   ret d
Oct 12 2022, 11:29 AM · Restricted Project, Restricted Project

Aug 31 2022

huangjd added a comment to D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.

Consider the following practical example

struct Vec {
    float  x, y, z;
};
Aug 31 2022, 6:22 PM · Restricted Project, Restricted Project

Aug 23 2022

huangjd committed rGb10565620714: [Sample Profile Reader] Fix potential integer overflow/infinite loop bug in… (authored by huangjd).
[Sample Profile Reader] Fix potential integer overflow/infinite loop bug in…
Aug 23 2022, 1:37 PM · Restricted Project, Restricted Project
huangjd closed D132493: [Sample Profile Reader] Fix potential integer overflow/infinite loop bug in sample profile reader.
Aug 23 2022, 1:36 PM · Restricted Project, Restricted Project
huangjd added a comment to D132493: [Sample Profile Reader] Fix potential integer overflow/infinite loop bug in sample profile reader.

It is more of a precaution, but I did come across very large afdo profiles.

Aug 23 2022, 1:19 PM · Restricted Project, Restricted Project
huangjd requested review of D132493: [Sample Profile Reader] Fix potential integer overflow/infinite loop bug in sample profile reader.
Aug 23 2022, 12:08 PM · Restricted Project, Restricted Project

Aug 9 2022

huangjd added a comment to D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.

@efriedma This is a limitation of the current patch that it could only handle the case with arguments in matching order. After some investigation I found that the current function call lowering pass cannot handle in-place stack argument shuffling at all, as it doesn't take read/write dependency into account. It would require an extensive refactoring to completely fix it.

Aug 9 2022, 12:38 PM · Restricted Project, Restricted Project

Aug 4 2022

huangjd added inline comments to D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.
Aug 4 2022, 12:57 PM · Restricted Project, Restricted Project
huangjd updated the diff for D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.

Added comments

Aug 4 2022, 12:57 PM · Restricted Project, Restricted Project
huangjd updated the diff for D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.

Restructured logic to determine isSibcall

Aug 4 2022, 12:55 PM · Restricted Project, Restricted Project

Aug 3 2022

huangjd added inline comments to D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.
Aug 3 2022, 5:41 PM · Restricted Project, Restricted Project
huangjd updated the diff for D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.

Updated comments

Aug 3 2022, 5:33 PM · Restricted Project, Restricted Project
huangjd added inline comments to D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.
Aug 3 2022, 11:26 AM · Restricted Project, Restricted Project

Aug 2 2022

huangjd added reviewers for D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail: Carrot, nikic, spatel, reames, aeubanks.
Aug 2 2022, 5:16 PM · Restricted Project, Restricted Project
huangjd requested review of D131034: [Backend][X86] Improved tail call optimization for functions marked as musttail.
Aug 2 2022, 5:12 PM · Restricted Project, Restricted Project

Jul 14 2022

huangjd added a comment to D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.

I think this will do worse in practice, because it breaks GVN. Imagine you have accesses like ary[i].x, ary[i].y, ary[i].z represented with two GEPs. If constants are canonicalized to the end, then the ary[i] GEP is the same all three times and can be CSEd/GVNd. If the constants are canonicalized to the start, then these all become distinct GEPs on different bases.

Jul 14 2022, 5:15 PM · Restricted Project, Restricted Project
huangjd updated the diff for D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.
  • Remove now irrelevant test
Jul 14 2022, 12:15 AM · Restricted Project, Restricted Project
huangjd added inline comments to D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.
Jul 14 2022, 12:15 AM · Restricted Project, Restricted Project
huangjd added a comment to D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.

Note: this is a NEW patch and the implementation is different from D125845.

Jul 14 2022, 12:07 AM · Restricted Project, Restricted Project
huangjd requested review of D129734: [InstCombine] Canonicalize GEP of GEP by swapping constant-indexed GEP to the front.
Jul 14 2022, 12:07 AM · Restricted Project, Restricted Project