Page MenuHomePhabricator
Feed Advanced Search

Yesterday

Carrot committed rG50b62731452c: [MBP] findBestLoopTopHelper should exit if OldTop is not a chain header (authored by Carrot).
[MBP] findBestLoopTopHelper should exit if OldTop is not a chain header
Wed, Jul 28, 7:03 PM
Carrot closed D106329: [MBP] findBestLoopTopHelper should exit if OldTop is not a chain header.
Wed, Jul 28, 7:03 PM · Restricted Project

Mon, Jul 19

Carrot requested review of D106329: [MBP] findBestLoopTopHelper should exit if OldTop is not a chain header.
Mon, Jul 19, 6:04 PM · Restricted Project

Fri, Jul 16

Carrot committed rG5609c8b60730: [X86FixupLEAs] Try again to transform the sequence LEA/SUB to SUB/SUB (authored by Carrot).
[X86FixupLEAs] Try again to transform the sequence LEA/SUB to SUB/SUB
Fri, Jul 16, 10:19 AM
Carrot closed D104684: [X86FixupLEAs] Try again to transform the sequence LEA/SUB to SUB/SUB.
Fri, Jul 16, 10:19 AM · Restricted Project

Thu, Jul 15

Carrot added a comment to D104684: [X86FixupLEAs] Try again to transform the sequence LEA/SUB to SUB/SUB.

I successfully bootstrapped a stage2 clang, also I tested stage2-check-all without regression.

Thu, Jul 15, 12:00 AM · Restricted Project

Thu, Jul 8

Carrot added a comment to D104684: [X86FixupLEAs] Try again to transform the sequence LEA/SUB to SUB/SUB.

ping

Thu, Jul 8, 8:06 PM · Restricted Project

Thu, Jul 1

Carrot added a comment to D104684: [X86FixupLEAs] Try again to transform the sequence LEA/SUB to SUB/SUB.

ping.

Thu, Jul 1, 5:19 PM · Restricted Project
Carrot added a comment to D105275: [SLP]Fix gathering of the scalars by not ignoring UndefValues..

Thanks for the fix!
The changes to CreateInsertElement looks good to me. But I'm not confident to review other parts of the patch.

Thu, Jul 1, 9:30 AM · Restricted Project

Wed, Jun 30

Carrot added inline comments to D103458: [SLP]Improve gathering of scalar elements..
Wed, Jun 30, 3:17 PM · Restricted Project
Carrot added a comment to D103458: [SLP]Improve gathering of scalar elements..

Alive does not agree with your analysis. Also, it is not SLP who merges undefs into poison, Builder.CreateInsertElement does this magic. Also, https://llvm.org/docs/LangRef.html#poison-values says that phis do not depend on the operands, so phi is not poisoned.

Thanks for the pointer, from the LLVM IR dump, the poison value was generated after SLP pass, we may dig it further.

Wed, Jun 30, 1:03 PM · Restricted Project
Carrot added a comment to D103458: [SLP]Improve gathering of scalar elements..

The problem is exactly in the merging of two undef into poison.

Wed, Jun 30, 11:03 AM · Restricted Project

Tue, Jun 29

Carrot added a comment to D103458: [SLP]Improve gathering of scalar elements..

Compile the following test case with

Tue, Jun 29, 9:21 PM · Restricted Project

Jun 21 2021

Carrot requested review of D104684: [X86FixupLEAs] Try again to transform the sequence LEA/SUB to SUB/SUB.
Jun 21 2021, 8:52 PM · Restricted Project

Jun 18 2021

Carrot committed rG575ba6f42560: [InstCombine] Don't transform code if DoTransform is false (authored by Carrot).
[InstCombine] Don't transform code if DoTransform is false
Jun 18 2021, 6:03 PM
Carrot closed D104567: [InstCombine] Don't transform code if DoTransform is false.
Jun 18 2021, 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.

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

Jun 14 2021

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

Thanks for the test case!
The problem is:

Jun 14 2021, 2:40 PM · Restricted Project

Jun 11 2021

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

The fix has been committed as f35bcea1d4748889b8240defdf00cb7a71cbe070.

Jun 11 2021, 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
Jun 11 2021, 9:46 AM
Carrot closed D103922: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization.
Jun 11 2021, 9:46 AM · Restricted Project

Jun 8 2021

Carrot updated the diff for D103922: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization.
Jun 8 2021, 1:36 PM · Restricted Project
Carrot requested review of D103922: [X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization.
Jun 8 2021, 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.

Jun 8 2021, 8:47 AM · Restricted Project

Jun 1 2021

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

May 27 2021

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

May 26 2021

Carrot updated the diff for D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 26 2021, 10:06 PM · Restricted Project
Carrot added inline comments to D101970: [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB.
May 26 2021, 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.

May 26 2021, 1:59 PM · Restricted Project

May 25 2021

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.

May 25 2021, 8:54 AM · Restricted Project

May 24 2021

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

Thanks for the report!

May 24 2021, 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