Page MenuHomePhabricator

Carrot (Guozhi Wei)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Wed, Jun 19

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

Do you have any benchmark numbers to show that this is generally profitable? From our downstream testing, it is not clear that this change is beneficial.

Wed, Jun 19, 12:03 PM · Restricted Project

Fri, Jun 14

Carrot committed rGd2210af3322d: [MBP] Move a latch block with conditional exit and multi predecessors to top of… (authored by Carrot).
[MBP] Move a latch block with conditional exit and multi predecessors to top of…
Fri, Jun 14, 4:06 PM
Carrot committed rL363471: [MBP] Move a latch block with conditional exit and multi predecessors to top of….
[MBP] Move a latch block with conditional exit and multi predecessors to top of…
Fri, Jun 14, 4:06 PM
Carrot closed D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.
Fri, Jun 14, 4:05 PM · Restricted Project

Fri, Jun 7

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

Some analysis of the test case changes.

Fri, Jun 7, 3:31 PM · Restricted Project

Tue, Jun 4

Carrot added inline comments to D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.
Tue, Jun 4, 1:59 PM · Restricted Project
Carrot updated the diff for D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.
Tue, Jun 4, 1:54 PM · Restricted Project

Fri, May 31

Carrot committed rGc3a24e93d527: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals (authored by Carrot).
[PPC] Correctly adjust branch probability in PPCReduceCRLogicals
Fri, May 31, 9:10 AM
Carrot committed rL362237: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.
[PPC] Correctly adjust branch probability in PPCReduceCRLogicals
Fri, May 31, 9:08 AM
Carrot closed D62430: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.
Fri, May 31, 9:08 AM · Restricted Project

Thu, May 30

Carrot updated the diff for D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.
Thu, May 30, 2:05 PM · Restricted Project
Carrot added inline comments to D62430: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.
Thu, May 30, 11:41 AM · Restricted Project
Carrot added a comment to D62430: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.

Hi Carrot,
I agree with this change, conceptually. Have you done any performance measurements to see what the impact is?

Thu, May 30, 11:34 AM · Restricted Project

Wed, May 29

Carrot updated the diff for D62430: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.
Wed, May 29, 10:18 AM · Restricted Project

Tue, May 28

Carrot updated the diff for D62430: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.

Changed the edge frequency distribution, so I can avoid floating point square root computation.

Tue, May 28, 10:58 AM · Restricted Project
Carrot added inline comments to D62430: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.
Tue, May 28, 8:20 AM · Restricted Project

May 24 2019

Carrot created D62430: [PPC] Correctly adjust branch probability in PPCReduceCRLogicals.
May 24 2019, 3:20 PM · Restricted Project

May 23 2019

Carrot updated the diff for D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop.

Update the patch to the current code base, also make two improvements:

May 23 2019, 2:51 PM · Restricted Project

May 21 2019

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

Precisely compute the fallthrough frequency is very helpful in layout of loop header and exit BB. It is included in my next patch.

May 21 2019, 8:28 AM · Restricted Project

May 17 2019

Carrot created D62079: [MBP] Rotate should bring more fallthrough.
May 17 2019, 1:54 PM · Restricted Project

Apr 17 2019

Carrot added a comment to D59535: [SelectionDAG] Compute known bits of CopyFromReg.

Just FYI.

Apr 17 2019, 11:09 AM · Restricted Project

Apr 5 2019

Carrot committed rG36fc9c31072f: [LCG] Add aliased functions as LCG roots (authored by Carrot).
[LCG] Add aliased functions as LCG roots
Apr 5 2019, 11:51 AM
Carrot committed rL357795: [LCG] Add aliased functions as LCG roots.
[LCG] Add aliased functions as LCG roots
Apr 5 2019, 11:49 AM
Carrot closed D59898: [LCG] Add aliased functions as LCG roots.
Apr 5 2019, 11:49 AM · Restricted Project
Carrot updated the diff for D59898: [LCG] Add aliased functions as LCG roots.

Will check in this version.

Apr 5 2019, 11:47 AM · Restricted Project

Apr 4 2019

Carrot added a comment to D59898: [LCG] Add aliased functions as LCG roots.

ping

Apr 4 2019, 11:01 AM · Restricted Project

Mar 28 2019

Carrot updated the diff for D59898: [LCG] Add aliased functions as LCG roots.
Mar 28 2019, 1:00 PM · Restricted Project

Mar 27 2019

Carrot updated the diff for D59898: [LCG] Add aliased functions as LCG roots.
Mar 27 2019, 2:14 PM · Restricted Project
Carrot created D59898: [LCG] Add aliased functions as LCG roots.
Mar 27 2019, 1:25 PM · Restricted Project

Mar 26 2019

Carrot committed rG330dcd9dabd3: [PPC] Refactor PPCBranchSelector.cpp (authored by Carrot).
[PPC] Refactor PPCBranchSelector.cpp
Mar 26 2019, 2:28 PM
Carrot committed rL357033: [PPC] Refactor PPCBranchSelector.cpp.
[PPC] Refactor PPCBranchSelector.cpp
Mar 26 2019, 2:26 PM
Carrot closed D59623: [PPC] Refactor PPCBranchSelector.cpp.
Mar 26 2019, 2:26 PM · Restricted Project

Mar 20 2019

Carrot accepted D59602: [CodeGenPrepare] limit formation of overflow intrinsics (PR41129).

Thanks a lot!

Mar 20 2019, 6:34 PM · Restricted Project
Carrot created D59623: [PPC] Refactor PPCBranchSelector.cpp.
Mar 20 2019, 5:20 PM · Restricted Project

Mar 19 2019

Carrot added inline comments to D59153: [MBP] Make sure the exit BB is the most possible successor before rotating a loop.
Mar 19 2019, 1:20 PM · Restricted Project

Mar 18 2019

Carrot added a comment to D57789: [CGP] form usub with overflow from sub+icmp.

A bug https://bugs.llvm.org/show_bug.cgi?id=41129 is filed for the regression.
Thanks a lot for the investigation.
Please let me know if more information is required.

Mar 18 2019, 10:58 AM · Restricted Project

Mar 14 2019

Carrot added a comment to D57789: [CGP] form usub with overflow from sub+icmp.

This patch causes 5% regression of one of our eigen benchmarks on Haswell.

Mar 14 2019, 11:47 AM · Restricted Project

Mar 8 2019

Carrot created D59153: [MBP] Make sure the exit BB is the most possible successor before rotating a loop.
Mar 8 2019, 1:40 PM · Restricted Project

Mar 6 2019

Carrot committed rG11308bdb433e: [PPC] Adjust the computed branch offset for the possible shorter distance (authored by Carrot).
[PPC] Adjust the computed branch offset for the possible shorter distance
Mar 6 2019, 10:24 AM
Carrot committed rL355529: [PPC] Adjust the computed branch offset for the possible shorter distance.
[PPC] Adjust the computed branch offset for the possible shorter distance
Mar 6 2019, 10:24 AM
Carrot closed D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.
Mar 6 2019, 10:24 AM · Restricted Project

Mar 5 2019

Carrot committed rGf124e75656dd: [X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges (authored by Carrot).
[X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges
Mar 5 2019, 10:54 AM
Carrot committed rL355430: [X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges.
[X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges
Mar 5 2019, 10:54 AM
Carrot closed D58646: [X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges.
Mar 5 2019, 10:54 AM · Restricted Project

Mar 4 2019

Carrot added a comment to D58646: [X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges.

ping

Mar 4 2019, 9:37 AM · Restricted Project

Feb 27 2019

Carrot added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

Any other comments?

Feb 27 2019, 1:10 PM · Restricted Project

Feb 25 2019

Carrot created D58646: [X86] In X86DomainReassignment.cpp add enclosed registers to EnclosedEdges.
Feb 25 2019, 2:42 PM · Restricted Project

Feb 22 2019

Carrot committed rG4c8e480358c3: [MBP] Factor out function hasViableTopFallthrough and enhancement (authored by Carrot).
[MBP] Factor out function hasViableTopFallthrough and enhancement
Feb 22 2019, 10:05 AM
Carrot committed rL354682: [MBP] Factor out function hasViableTopFallthrough and enhancement.
[MBP] Factor out function hasViableTopFallthrough and enhancement
Feb 22 2019, 10:04 AM
Carrot closed D58393: [MBP] Factor out function hasViableTopFallthrough and enhancement.
Feb 22 2019, 10:04 AM · Restricted Project

Feb 21 2019

Carrot updated the diff for D58393: [MBP] Factor out function hasViableTopFallthrough and enhancement.
Feb 21 2019, 3:24 PM · Restricted Project
Carrot added inline comments to D58393: [MBP] Factor out function hasViableTopFallthrough and enhancement.
Feb 21 2019, 2:23 PM · Restricted Project

Feb 20 2019

Carrot updated the diff for D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

Add comment to explain the case when the inline asm occurs between branch block and dest block.

Feb 20 2019, 2:48 PM · Restricted Project
Carrot added inline comments to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.
Feb 20 2019, 2:48 PM · Restricted Project

Feb 19 2019

Carrot added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

I can't help but feel like this patch adds further complication to an already excessively complicated function. To put things in perspective - this file is currently 282 lines and 210 of those lines are in a single function. Frankly, I think refactoring this into a few conceptual sections implemented in separate functions would go a long way.

Seems to me that conceptually this pass does the following:

  • Renumber blocks
  • Compute the size of each block
  • Identify PC-relative branches and compute the branch distance
  • Convert PC-relative branches that branch too far into the "long branch sequence" (i.e. invert branch condition, convert to bc+8, b)

    I understand if you don't want to do this refactoring and want to proceed with this patch as-is to solve the immediate problem. However, I thought I would bring this up since it seems like refactoring this would go a long way to making this readable.
Feb 19 2019, 2:32 PM · Restricted Project
Carrot created D58393: [MBP] Factor out function hasViableTopFallthrough and enhancement.
Feb 19 2019, 10:55 AM · Restricted Project

Feb 15 2019

Carrot added inline comments to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.
Feb 15 2019, 7:10 PM · Restricted Project
Carrot added inline comments to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.
Feb 15 2019, 1:38 PM · Restricted Project
Carrot updated the diff for D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

Also handle the backward branch.

Feb 15 2019, 11:58 AM · Restricted Project

Feb 13 2019

Carrot updated the diff for D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

Add a test case.

Feb 13 2019, 4:11 PM · Restricted Project
Carrot added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

Any testcases that can show the problem and test the fix? Thanks.

It can only be triggered by a very large (>32KB) function body because the range of conditional branch is +/- 32KB.

In our case, the large function body is caused by aggressive thinlto guided inlining.

So no small test case can demonstrate the problem :(

You can use the assembly directive '.space' to create arbitrary sized basic blocks. See test/CodeGen/RISCV/branch-relaxation.ll for examples.

Feb 13 2019, 3:31 PM · Restricted Project

Feb 12 2019

Carrot added inline comments to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.
Feb 12 2019, 3:08 PM · Restricted Project
Carrot added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

I think we should be able to come up with a smaller test case that demonstrate the problem here?
No necessary causing run time problem due to wrong branch,
but causing smaller calculated branch offset, and we can check that by adding a few dbgs() to check calculated branch offset in code?

Because of the code at line 137

Feb 12 2019, 2:44 PM · Restricted Project

Feb 11 2019

Carrot added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

Any testcases that can show the problem and test the fix? Thanks.

Feb 11 2019, 1:22 PM · Restricted Project
Carrot added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

ping

Feb 11 2019, 11:35 AM · Restricted Project

Feb 8 2019

Carrot accepted D57053: Extra processing for BitCast + PHI in InstCombine.

Thanks for the explanation.
LGTM

Feb 8 2019, 8:12 AM · Restricted Project

Feb 6 2019

Herald added a project to D57053: Extra processing for BitCast + PHI in InstCombine: Restricted Project.

I couldn't understand the problem after reading the description.

Feb 6 2019, 2:53 PM · Restricted Project

Feb 4 2019

Carrot created D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.
Feb 4 2019, 3:30 PM · Restricted Project

Jan 31 2019

Carrot committed rL352792: [DAGCombine] Avoid CombineZExtLogicopShiftLoad if there is free ZEXT.
[DAGCombine] Avoid CombineZExtLogicopShiftLoad if there is free ZEXT
Jan 31 2019, 12:47 PM
Carrot closed D57491: [DAGCombine] Avoid CombineZExtLogicopShiftLoad if there is free ZEXT.
Jan 31 2019, 12:46 PM · Restricted Project
Carrot updated the diff for D57491: [DAGCombine] Avoid CombineZExtLogicopShiftLoad if there is free ZEXT.
Jan 31 2019, 9:07 AM · Restricted Project

Jan 30 2019

Carrot created D57491: [DAGCombine] Avoid CombineZExtLogicopShiftLoad if there is free ZEXT.
Jan 30 2019, 5:01 PM · Restricted Project

Jan 25 2019

Carrot committed rL352236: [MBP] Don't move bottom block before header if it can't reduce taken branches.
[MBP] Don't move bottom block before header if it can't reduce taken branches
Jan 25 2019, 11:47 AM
Carrot closed D57067: [MBP] Don't move bottom block before header if it can't reduce taken branches.
Jan 25 2019, 11:47 AM

Jan 24 2019

Carrot added a comment to D57067: [MBP] Don't move bottom block before header if it can't reduce taken branches.

lgtm.

Do you have any benchmarking numbers?

Jan 24 2019, 2:52 PM

Jan 23 2019

Carrot added inline comments to D57067: [MBP] Don't move bottom block before header if it can't reduce taken branches.
Jan 23 2019, 11:02 AM
Carrot added inline comments to D57067: [MBP] Don't move bottom block before header if it can't reduce taken branches.
Jan 23 2019, 10:52 AM

Jan 22 2019

Carrot created D57067: [MBP] Don't move bottom block before header if it can't reduce taken branches.
Jan 22 2019, 2:40 PM

Nov 20 2018

Carrot committed rL347325: [LoopSink] Add preheader to alias set.
[LoopSink] Add preheader to alias set
Nov 20 2018, 8:52 AM
Carrot closed D54659: [LoopSink] Add preheader to alias set.
Nov 20 2018, 8:52 AM

Nov 16 2018

Carrot created D54659: [LoopSink] Add preheader to alias set.
Nov 16 2018, 4:20 PM

Oct 26 2018

Carrot added a comment to D49168: [LV] Add a new reduction pattern match.

This patch doesn't correctly handle isFast(). By default isRecurrenceInstr() should check I->isFast(), but for this pattern I is Select, isFast() doesn't apply to it, it should be checked against FAdd/FMul inside isConditionalRdxPattern().

Oct 26 2018, 3:00 PM

Aug 15 2018

Carrot committed rL339822.
Aug 15 2018, 3:09 PM
Carrot closed D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.
Aug 15 2018, 3:09 PM

Aug 10 2018

Carrot updated the diff for D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.
Aug 10 2018, 10:43 AM

Aug 7 2018

Carrot added a comment to D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.

To be more precise, the latest promotion should be correct, but if we want the full information of multiple extension, the current patch is I believe wrong.
E.g., zext (sext i8 to i16) to i32, doesn't give you the same warranties on the bit pattern than what zext i8 to i32 gives, whereas we won't be able to see that.

Aug 7 2018, 4:04 PM
Carrot added a comment to D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.

Shouldn't we keep only the latest type and kind of extension?

Aug 7 2018, 3:28 PM

Aug 3 2018

Carrot added a comment to D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.

friendly ping.

Aug 3 2018, 4:29 PM

Jul 27 2018

Carrot added a comment to D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.

ping

Jul 27 2018, 2:22 PM

Jul 19 2018

Carrot updated the diff for D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.
Jul 19 2018, 3:34 PM
Carrot added a comment to D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.

from someone who is just an observer: What happens when we see IsSExt types

A
B
A

?
Then the last one will re-insert A, which is probably not what you want.

Jul 19 2018, 3:24 PM

Jul 18 2018

Carrot created D49512: [CodeGenPrepare] Add BothExtension type to PromotedInsts.
Jul 18 2018, 2:49 PM

Jun 7 2018

Carrot updated the diff for D47346: [X86] Add a new pass to fold extension into load instructions in previous BB.
Jun 7 2018, 3:31 PM

Jun 6 2018

Carrot added a comment to D47346: [X86] Add a new pass to fold extension into load instructions in previous BB.

We have an MI combine pass IIRC -- why not put this there? (Genuine question, haven't looked at these enough to know if that doesn't work...)

Jun 6 2018, 3:08 PM
Carrot updated the diff for D47346: [X86] Add a new pass to fold extension into load instructions in previous BB.
Jun 6 2018, 3:07 PM

Jun 5 2018

Carrot committed rL334049: [CodeGenPrepare] Move Extension Instructions Through Logical And Shift….
[CodeGenPrepare] Move Extension Instructions Through Logical And Shift…
Jun 5 2018, 2:10 PM

May 25 2018

Carrot committed rL333305: [CodeGenPrepare] Revert r331783.
[CodeGenPrepare] Revert r331783
May 25 2018, 1:34 PM

May 24 2018

Carrot created D47346: [X86] Add a new pass to fold extension into load instructions in previous BB.
May 24 2018, 2:16 PM

May 8 2018

Carrot committed rL331783: [CodeGenPrepare] Move Extension Instructions Through Logical And Shift….
[CodeGenPrepare] Move Extension Instructions Through Logical And Shift…
May 8 2018, 11:02 AM
Carrot closed D45537: [CodeGenPrepare] Move Extension Instructions Through Logical And Shift Instructions.
May 8 2018, 11:02 AM