Page MenuHomePhabricator

Carrot (Guozhi Wei)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 15 2015, 3:50 PM (309 w, 3 d)

Recent Activity

Fri, Jun 18

Carrot committed rG575ba6f42560: [InstCombine] Don't transform code if DoTransform is false (authored by Carrot).
[InstCombine] Don't transform code if DoTransform is false
Fri, Jun 18, 6:03 PM
Carrot closed D104567: [InstCombine] Don't transform code if DoTransform is false.
Fri, Jun 18, 6:03 PM · Restricted Project
Carrot updated the diff for D104567: [InstCombine] Don't transform code if DoTransform is false.

Thanks for the quick review!
Will commit this version.

Fri, Jun 18, 1:56 PM · Restricted Project
Carrot requested review of D104567: [InstCombine] Don't transform code if DoTransform is false.
Fri, Jun 18, 12:53 PM · Restricted Project

Mon, Jun 14

Carrot added a comment to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

Thanks for the test case!
The problem is:

Mon, Jun 14, 2:40 PM · Restricted Project

Fri, Jun 11

Carrot added a comment to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

The fix has been committed as f35bcea1d4748889b8240defdf00cb7a71cbe070.

Fri, Jun 11, 9:50 AM · Restricted Project
Carrot committed rGf35bcea1d474: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization (authored by Carrot).
[X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization
Fri, Jun 11, 9:46 AM
Carrot closed D103922: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization.
Fri, Jun 11, 9:46 AM · Restricted Project

Tue, Jun 8

Carrot updated the diff for D103922: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization.
Tue, Jun 8, 1:36 PM · Restricted Project
Carrot requested review of D103922: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization.
Tue, Jun 8, 12:11 PM · Restricted Project
Carrot added a comment to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

Thanks for the report!
I guess function searchALUInst should also check overlapped register usage of DestReg.

Tue, Jun 8, 8:47 AM · Restricted Project

Tue, Jun 1

Carrot committed rG1b748faf2bae: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB (authored by Carrot).
[X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB
Tue, Jun 1, 10:33 AM
Carrot closed D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
Tue, Jun 1, 10:33 AM · Restricted Project

Thu, May 27

Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
Thu, May 27, 12:24 PM · Restricted Project

Wed, May 26

Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
Wed, May 26, 10:06 PM · Restricted Project
Carrot added inline comments to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
Wed, May 26, 1:59 PM · Restricted Project
Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

Check the dead EFLAGS def directly instead of calling computeRegisterLiveness.
Add implicit dead def EFLAGS to new alu instructions.

Wed, May 26, 1:59 PM · Restricted Project

Tue, May 25

Carrot added a comment to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

Actually, it is more complicated, and you're right that it also can involve overflow. I'm not sure if this is a trivial optimization when dependent comparisons are involved.

Tue, May 25, 8:54 AM · Restricted Project

Mon, May 24

Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

Thanks for the report!

Mon, May 24, 1:23 PM · Restricted Project

May 18 2021

Carrot committed rG528bc10e95d5: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB (authored by Carrot).
[X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB
May 18 2021, 6:05 PM
Carrot closed D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 18 2021, 6:05 PM · Restricted Project
Carrot added a comment to rGabd7529625a7: [InstCombine] relax masking requirement for truncated funnel/rotate match.

Thank you, Sanjay.
It really fixed our problem in a larger application.

May 18 2021, 4:42 PM

May 17 2021

Carrot added a comment to rGabd7529625a7: [InstCombine] relax masking requirement for truncated funnel/rotate match.

This patch generates wrong code for the function

void foo(char *p, int l, int t) {
  *p = static_cast<char>(static_cast<char>(t << (8u - l)) |
                         static_cast<char>(0xffu >> l));
}
May 17 2021, 6:47 PM

May 14 2021

Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 14 2021, 4:21 PM · Restricted Project

May 12 2021

Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 12 2021, 1:06 PM · Restricted Project

May 11 2021

Carrot added a comment to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

Can you try this patch with http://llvm-compile-time-tracker.com/ ?

May 11 2021, 10:11 AM · Restricted Project

May 10 2021

Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 10 2021, 11:13 PM · Restricted Project
Carrot committed rGa0fed635fe17: Pre-commit test case for D101970 (authored by Carrot).
Pre-commit test case for D101970
May 10 2021, 2:52 PM
Carrot closed D102010: Pre-commit test case for D101970.
May 10 2021, 2:52 PM · Restricted Project

May 7 2021

Carrot added a comment to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.

I think it is good when the patch's description not just what the patch does, but also why it does that.

May 7 2021, 9:27 AM · Restricted Project

May 6 2021

Carrot requested review of D102010: Pre-commit test case for D101970.
May 6 2021, 10:58 AM · Restricted Project
Carrot added inline comments to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 6 2021, 9:59 AM · Restricted Project

May 5 2021

Carrot requested review of D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 5 2021, 7:43 PM · Restricted Project

Apr 30 2021

Carrot committed rGb817ea7b17b8: [MachineFunction] Make comment for TracksLiveness more clearer (authored by Carrot).
[MachineFunction] Make comment for TracksLiveness more clearer
Apr 30 2021, 12:13 PM
Carrot closed D101500: [MachineFunction] Make comment for TracksLiveness more clearer.
Apr 30 2021, 12:12 PM · Restricted Project

Apr 28 2021

Carrot requested review of D101500: [MachineFunction] Make comment for TracksLiveness more clearer.
Apr 28 2021, 5:08 PM · Restricted Project

Mar 25 2021

Carrot committed rG3240910f0006: [DAE] Adjust param/arg attributes when changing parameter to undef (authored by Carrot).
[DAE] Adjust param/arg attributes when changing parameter to undef
Mar 25 2021, 2:54 PM
Carrot closed D98899: [DAE] Adjust param/arg attributes when changing parameter to undef.
Mar 25 2021, 2:54 PM · Restricted Project

Mar 24 2021

Carrot updated the diff for D98899: [DAE] Adjust param/arg attributes when changing parameter to undef.

Thanks for the improvement.
Will commit this version.

Mar 24 2021, 11:33 AM · Restricted Project

Mar 23 2021

Carrot updated the diff for D98899: [DAE] Adjust param/arg attributes when changing parameter to undef.

Reformat the patch.

Mar 23 2021, 3:20 PM · Restricted Project

Mar 22 2021

Carrot updated the diff for D98899: [DAE] Adjust param/arg attributes when changing parameter to undef.
Mar 22 2021, 6:40 PM · Restricted Project
Carrot added a comment to D98899: [DAE] Adjust param/arg attributes when changing parameter to undef.

This looks reasonable to me. Dropping nonnull is not strictly necessary (because it has no immediate UB), but doesn't hurt either.

I was going to suggest using AttrBuilder to drop all attributes at once, but I'm not sure that works with dereferenceable attributes.

Mar 22 2021, 6:39 PM · Restricted Project

Mar 19 2021

Carrot added a reviewer for D98899: [DAE] Adjust param/arg attributes when changing parameter to undef: petarj.
Mar 19 2021, 5:19 PM · Restricted Project

Mar 18 2021

Carrot requested review of D98899: [DAE] Adjust param/arg attributes when changing parameter to undef.
Mar 18 2021, 2:29 PM · Restricted Project

Mar 16 2021

Carrot added inline comments to D97244: [SimplifyCFG] Update passingValueIsAlwaysUndefined to check more attributes.
Mar 16 2021, 6:04 PM · Restricted Project
Carrot added inline comments to D97244: [SimplifyCFG] Update passingValueIsAlwaysUndefined to check more attributes.
Mar 16 2021, 5:17 PM · Restricted Project

Feb 18 2021

Carrot committed rG66f2d09ebf8d: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1… (authored by Carrot).
[DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1…
Feb 18 2021, 1:16 PM
Carrot closed D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).
Feb 18 2021, 1:16 PM · Restricted Project
Carrot committed rG2cc76b17be47: Pre-commit test case (authored by Carrot).
Pre-commit test case
Feb 18 2021, 11:08 AM

Feb 11 2021

Carrot added a comment to rG69bc0990a918: [DAGCombiner] Enable SimplifyDemandedBits vector support for TRUNCATE….

Compile the following cpp code

Feb 11 2021, 3:42 PM

Feb 10 2021

Carrot added inline comments to D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).
Feb 10 2021, 3:53 PM · Restricted Project
Carrot updated the diff for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).

ANY_EXTEND of SEXTLOAD/ZEXTLOAD should not be allowed.
In theory if both loads have same SEXTLOAD/ZEXTLOAD, we can change ExpOpcode to corresponding SIGN_EXTEND/ZERO_EXTEND, but it will make the code more complex, and this case should be extremely rare.

Feb 10 2021, 3:52 PM · Restricted Project

Feb 5 2021

Carrot added a comment to D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).

ping

Feb 5 2021, 8:12 PM · Restricted Project

Jan 29 2021

Carrot updated the diff for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).

Check conflicting extload.

Jan 29 2021, 1:51 PM · Restricted Project

Jan 28 2021

Carrot updated the diff for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).
Jan 28 2021, 6:38 PM · Restricted Project
Carrot updated the diff for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).

Add support for ISD::VSELECT.

Jan 28 2021, 5:21 PM · Restricted Project
Carrot updated the diff for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).

Rebase the test case.

Jan 28 2021, 10:20 AM · Restricted Project

Jan 27 2021

Carrot added inline comments to D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).
Jan 27 2021, 5:33 PM · Restricted Project
Carrot updated the diff for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).

Add more test cases.

Jan 27 2021, 5:33 PM · Restricted Project

Jan 26 2021

Carrot added inline comments to D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).
Jan 26 2021, 6:15 PM · Restricted Project
Carrot added a reviewer for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2): craig.topper.
Jan 26 2021, 11:16 AM · Restricted Project

Jan 21 2021

Carrot updated the diff for D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).

Rebase the code.

Jan 21 2021, 1:38 PM · Restricted Project

Jan 20 2021

Carrot committed rG96296d9220ee: [DAGCombiner] Precommit test case for D95086 (authored by Carrot).
[DAGCombiner] Precommit test case for D95086
Jan 20 2021, 5:17 PM
Carrot closed D95103: [DAGCombiner] Precommit test case for D95086.
Jan 20 2021, 5:17 PM · Restricted Project
Carrot requested review of D95103: [DAGCombiner] Precommit test case for D95086.
Jan 20 2021, 3:41 PM · Restricted Project
Carrot requested review of D95086: [DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2).
Jan 20 2021, 1:14 PM · Restricted Project

Jan 19 2021

Carrot added a comment to D94851: [InstCombine] Don't transform (select c, ext(TI), ext(FI)) if ext is free.

Thanks for the info.

I will discard this patch and reverse the pattern at function CodeGenPrepare::optimizeExt.

Not really sure why that would go into CodeGenPrepare, which is a temporary hack,
DAGCombine is the usual counterpart.

Jan 19 2021, 2:02 PM · Restricted Project
Carrot abandoned D94851: [InstCombine] Don't transform (select c, ext(TI), ext(FI)) if ext is free.
Jan 19 2021, 1:04 PM · Restricted Project
Carrot added a comment to D94851: [InstCombine] Don't transform (select c, ext(TI), ext(FI)) if ext is free.

Thanks for the info.

Jan 19 2021, 1:04 PM · Restricted Project

Jan 15 2021

Carrot requested review of D94851: [InstCombine] Don't transform (select c, ext(TI), ext(FI)) if ext is free.
Jan 15 2021, 6:04 PM · Restricted Project

Jan 13 2021

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

Is this a general problem with MBP then? I haven't noticed it before this optimization, but maybe it was just luck or not investigating the right examples. I'm trying to understand where is the best place to fix it, and if it's even feasible.

Jan 13 2021, 12:35 PM · Restricted Project

Jan 12 2021

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

@GalZohar, thanks for the example, now I understand your problem. The new layout does increase the number of executed branches for the path BB2->BB3->BB4->BB2. Unfortunately most of the current MBP algorithms don't consider this factor. When considering the number of fall through only, the new layout has more fall through and less taken branch.

Jan 12 2021, 6:22 PM · Restricted Project

Jan 8 2021

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

@GalZohar, without a testcase I can't say what's the problem.

Jan 8 2021, 10:24 AM · Restricted Project

Jan 5 2021

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

@GalZohar, the various layout algorithms in MachineBlockPlacement mainly consider the number of fall-throughs and dynamic number of branch instructions (usually they are consistent) according to branch probabilities. So you can try to build your application with profiling. Or you can compile this file with -Os since the improvement in this patch is disabled with -Os.

Jan 5 2021, 2:59 PM · Restricted Project

Dec 16 2020

Carrot committed rG687e80be7fcf: [MBP] Add whole chain to BlockFilterSet instead of individual BB (authored by Carrot).
[MBP] Add whole chain to BlockFilterSet instead of individual BB
Dec 16 2020, 3:46 PM

Dec 15 2020

Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

The real root cause of crash in building chrome and firefox has been committed https://reviews.llvm.org/D92882.

Dec 15 2020, 3:32 PM · Restricted Project

Dec 14 2020

Carrot committed rGd50d7c37a159: [MBP] Prevent rotating a chain contains entry block (authored by Carrot).
[MBP] Prevent rotating a chain contains entry block
Dec 14 2020, 12:50 PM
Carrot closed D92882: [MBP] Prevent rotating a chain contains entry block.
Dec 14 2020, 12:49 PM · Restricted Project

Dec 11 2020

Carrot updated the diff for D92882: [MBP] Prevent rotating a chain contains entry block.

Will commit this version.

Dec 11 2020, 1:41 PM · Restricted Project

Dec 10 2020

Carrot added a comment to D92882: [MBP] Prevent rotating a chain contains entry block.

It is possible to synthesize a test case that rotates the entry without the fix, no? The expected output is that the entry is not rotated (no need to reproduce crash).

Dec 10 2020, 5:57 PM · Restricted Project

Dec 9 2020

Carrot added a comment to D92882: [MBP] Prevent rotating a chain contains entry block.

yes, a test case please :) Any performance numbers?

Dec 9 2020, 4:24 PM · Restricted Project
Carrot added a comment to D92882: [MBP] Prevent rotating a chain contains entry block.

Can we add a test for this?

Dec 9 2020, 4:18 PM · Restricted Project

Dec 8 2020

Carrot requested review of D92882: [MBP] Prevent rotating a chain contains entry block.
Dec 8 2020, 1:32 PM · Restricted Project

Dec 7 2020

Carrot added a comment to D92701: [SLPVectorize] Call isLegalMaskedGather before creating a gather TreeEntry.

@RKSimon, thank you for your help. I do have another test case that has bad vectorization with scatters, https://bugs.llvm.org/show_bug.cgi?id=48429.

Dec 7 2020, 10:23 AM · Restricted Project
Carrot added a comment to D92701: [SLPVectorize] Call isLegalMaskedGather before creating a gather TreeEntry.

@fhahn, thank you for the clarification of the isLegalMaskedGather and getGatherScatterOpCost usage.

Dec 7 2020, 9:22 AM · Restricted Project

Dec 4 2020

Carrot added a reviewer for D92701: [SLPVectorize] Call isLegalMaskedGather before creating a gather TreeEntry: fhahn.
Dec 4 2020, 3:33 PM · Restricted Project
Carrot added a reviewer for D92701: [SLPVectorize] Call isLegalMaskedGather before creating a gather TreeEntry: anton-afanasyev.
Dec 4 2020, 3:31 PM · Restricted Project
Carrot requested review of D92701: [SLPVectorize] Call isLegalMaskedGather before creating a gather TreeEntry.
Dec 4 2020, 3:27 PM · Restricted Project

Nov 13 2020

Carrot committed rGa20220d25b01: [AlwaysInliner] Call mergeAttributesForInlining after inlining (authored by Carrot).
[AlwaysInliner] Call mergeAttributesForInlining after inlining
Nov 13 2020, 12:02 PM
Carrot closed D91446: [AlwaysInliner] Call mergeAttributesForInlining after inlining.
Nov 13 2020, 12:02 PM · Restricted Project
Carrot requested review of D91446: [AlwaysInliner] Call mergeAttributesForInlining after inlining.
Nov 13 2020, 10:51 AM · Restricted Project

Oct 29 2020

Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

In case it helps, I turned on debug logging for this pass on our repro: https://paste.mozilla.org/HBDkeGXO (starts at line 60)

Oct 29 2020, 2:51 PM · Restricted Project

Oct 22 2020

Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

It has been reverted.

Oct 22 2020, 5:39 PM · Restricted Project
Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

@aeubanks, can you extract a test case from your failure?
It will be very helpful for me to debug the problem.

Oct 22 2020, 8:41 AM · Restricted Project

Oct 21 2020

Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

Then it should be an unknown bug in MBP.

Oct 21 2020, 5:21 PM · Restricted Project

Oct 20 2020

Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

As jmorse has pointed out, the function layout is incorrect at the assertion time.

Oct 20 2020, 5:54 PM · Restricted Project

Oct 16 2020

Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

@dmajor, without a test case it is difficult to point out what's wrong since there is no obvious relation between this patch and VarLocBasedImpl.cpp. I will try my best to do some simple analysis/guess:

Oct 16 2020, 1:19 PM · Restricted Project

Oct 14 2020

Carrot committed rGadfb5415010f: [MBP] Add whole chain to BlockFilterSet instead of individual BB (authored by Carrot).
[MBP] Add whole chain to BlockFilterSet instead of individual BB
Oct 14 2020, 11:55 AM
Carrot closed D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.
Oct 14 2020, 11:55 AM · Restricted Project

Oct 13 2020

Carrot added a comment to D89088: [MBP] Add whole chain to BlockFilterSet instead of individual BB.

For the attached test case, it can cause bad layout, block .problem is placed under .cold. With this patch .problem is optimally placed after .pred.

Oct 13 2020, 4:34 PM · Restricted Project