Page MenuHomePhabricator

steven.zhang (Qing Shan Zhang)
User

Projects

User does not belong to any projects.

User Details

User Since
May 15 2018, 2:45 AM (69 w, 5 d)

Recent Activity

Thu, Sep 5

steven.zhang added a comment to D66576: [Regalloc][WIP] Increase CSR cost in RegAllocGreedy to favour splitting/spill over CSR first use.

.AMDGPU also override the getCSRFirstUseCost() but your patch didn't catch that. And would you please post some improve number for powerpc of this patch ?

Thu, Sep 5, 7:53 PM · Restricted Project

Aug 16 2019

steven.zhang requested changes to D65094: [PowerPC] Combine address computation to favour selecting DForm instructions.

We need to double check the base offset we select to avoid exceeding the 16-bit as much as possible

Aug 16 2019, 2:27 AM · Restricted Project

Aug 15 2019

steven.zhang accepted D65529: [PowerPC] Use xxleqv to set all one vector IMM(-1)..

LGTM except some minor comments.

Aug 15 2019, 1:00 AM · Restricted Project

Aug 14 2019

steven.zhang requested changes to D65529: [PowerPC] Use xxleqv to set all one vector IMM(-1)..

Only v4i32 is handled. We need to handle all the valid vector type.

Aug 14 2019, 12:31 AM · Restricted Project

Aug 12 2019

steven.zhang added reviewers for D66050: Improve division estimation of floating points.: jsji, nemanjai.
Aug 12 2019, 12:48 AM · Restricted Project

Aug 1 2019

steven.zhang accepted D65315: [PowerPC][Peephole] Check if `extsw`'s second operand is a virtual register.

LGTM with the update.

Aug 1 2019, 8:11 PM · Restricted Project

Jul 22 2019

steven.zhang added a reviewer for D65094: [PowerPC] Combine address computation to favour selecting DForm instructions: steven.zhang.
Jul 22 2019, 9:14 PM · Restricted Project
steven.zhang added a comment to D65094: [PowerPC] Combine address computation to favour selecting DForm instructions.

The idea is great! Some comments.

Jul 22 2019, 9:14 PM · Restricted Project

Jul 21 2019

steven.zhang abandoned D63590: [PowerPC] Sign extend the select instr operands if it is any_extend.

Abandon this revision, as most opportunity has been fixed by https://reviews.llvm.org/rL202451.

Jul 21 2019, 8:04 PM · Restricted Project

Jul 10 2019

steven.zhang added inline comments to D64220: [PowerPC] Remove redundant load immediate instructions.
Jul 10 2019, 7:18 PM · Restricted Project

Jul 7 2019

steven.zhang abandoned D64198: [NFC][PowerPC] Add the feature control for PreRA and PostRA scheduler.

No. I didn't have the requirement to customer to cpu for the scheduler yet. I will abandon this patch and we can add the feature if we indeed find some cases that to do the customization.

Jul 7 2019, 7:21 PM · Restricted Project

Jul 4 2019

steven.zhang added a comment to D64198: [NFC][PowerPC] Add the feature control for PreRA and PostRA scheduler.

As Hal mentioned, enable-misched and enable-post-misched should be able to turn on/off the pre-ra/post-ra scheduler.
Regarding to different subtarget (cpu), why we need to turn on/off with feature at runtime? Shouldn't that be configured in code?

yeah, per function control might be more useful here.

Jul 4 2019, 8:00 PM · Restricted Project
steven.zhang added inline comments to D64220: [PowerPC] Remove redundant load immediate instructions.
Jul 4 2019, 7:48 PM · Restricted Project
steven.zhang added a comment to D64198: [NFC][PowerPC] Add the feature control for PreRA and PostRA scheduler.

I am sorry that, I didn't put enough background for this change. The idea is not for per-function basis. We have the pre-ra scheduler and post-ra scheduler you know, and they should be able to be configured for different CPU processor. (Some cpu might need the post-ra scheduler, and some didn't, though we always enable it for all cpus) This is done by adding features and included by different cpu. And it also gives us the ability to turn on/off the specific scheduler.

Jul 4 2019, 7:12 PM · Restricted Project
steven.zhang created D64198: [NFC][PowerPC] Add the feature control for PreRA and PostRA scheduler.
Jul 4 2019, 2:21 AM · Restricted Project
steven.zhang committed rG63e62006cff7: [NFC][PowerPC] Make the PowerPC scheduling strategy feature only control the… (authored by steven.zhang).
[NFC][PowerPC] Make the PowerPC scheduling strategy feature only control the…
Jul 4 2019, 12:45 AM

Jul 1 2019

steven.zhang committed rG7fdb3a293b27: [PowerPC] Implement the areMemAccessesTriviallyDisjoint hook After implemented… (authored by steven.zhang).
[PowerPC] Implement the areMemAccessesTriviallyDisjoint hook After implemented…
Jul 1 2019, 8:30 PM
steven.zhang added inline comments to D63804: [PowerPC] Implement the areMemAccessesTriviallyDisjoint hook.
Jul 1 2019, 7:41 PM · Restricted Project

Jun 27 2019

steven.zhang added inline comments to D60601: [DAGCombiner] Exploiting more about the transformation of TransformFPLoadStorePair function.
Jun 27 2019, 1:00 AM · Restricted Project

Jun 25 2019

steven.zhang committed rGe0e7d4c3662e: Teach the DAGCombine to fold this pattern(c1 and c2 is constant). (authored by steven.zhang).
Teach the DAGCombine to fold this pattern(c1 and c2 is constant).
Jun 25 2019, 10:17 PM
steven.zhang accepted D63801: [PowerPC] Fixed missing change flag of emitRLDICWhenLoweringJumpTables.

LGTM, with one minor comments. Maybe, you could commit a NFC patch to use "|=" instead of "=" to set the Simplified flag.

Jun 25 2019, 10:08 PM · Restricted Project
steven.zhang created D63804: [PowerPC] Implement the areMemAccessesTriviallyDisjoint hook.
Jun 25 2019, 8:37 PM · Restricted Project
steven.zhang added inline comments to D63590: [PowerPC] Sign extend the select instr operands if it is any_extend.
Jun 25 2019, 8:25 PM · Restricted Project
steven.zhang added inline comments to D63590: [PowerPC] Sign extend the select instr operands if it is any_extend.
Jun 25 2019, 7:50 PM · Restricted Project
steven.zhang added inline comments to D63801: [PowerPC] Fixed missing change flag of emitRLDICWhenLoweringJumpTables.
Jun 25 2019, 7:21 PM · Restricted Project
steven.zhang added inline comments to D63590: [PowerPC] Sign extend the select instr operands if it is any_extend.
Jun 25 2019, 7:12 PM · Restricted Project
steven.zhang added a comment to D63754: [PowerPC][NFC] Move current peephole optimization of RLDICR into a method.

As talked, please confirm why we didn't set the Simplified flags. FWIK, this is a flag to indicate that, we have done some changes. We should set it.

Jun 25 2019, 3:08 AM · Restricted Project
steven.zhang added a comment to D63590: [PowerPC] Sign extend the select instr operands if it is any_extend.

Hi, @hfinkel
As this was added by you in https://reviews.llvm.org/rL202451, would you please help me review this patch ? And I also commit another patch(https://reviews.llvm.org/D63318) to fold this pattern in DAGCombine. Would you please take a look together ? Thank you!

Jun 25 2019, 2:43 AM · Restricted Project

Jun 24 2019

steven.zhang updated the diff for D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.

Update the comments.

Jun 24 2019, 2:54 AM · Restricted Project

Jun 20 2019

steven.zhang updated the summary of D63590: [PowerPC] Sign extend the select instr operands if it is any_extend.
Jun 20 2019, 2:04 AM · Restricted Project
steven.zhang created D63590: [PowerPC] Sign extend the select instr operands if it is any_extend.
Jun 20 2019, 2:03 AM · Restricted Project

Jun 19 2019

steven.zhang added a comment to D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.

As the X86 review is done (Another issue exposed by this patch, and x86 backend will work on that ?), let's continue the review for the PowerPC backend and DAGCombine logic.

Jun 19 2019, 7:06 PM · Restricted Project
steven.zhang added inline comments to D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.
Jun 19 2019, 12:35 AM · Restricted Project

Jun 18 2019

steven.zhang added a comment to D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.
Jun 18 2019, 11:25 PM · Restricted Project
steven.zhang updated the diff for D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.

Add the isZextFree check.

Jun 18 2019, 11:10 PM · Restricted Project
steven.zhang added inline comments to D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.
Jun 18 2019, 9:53 PM · Restricted Project
steven.zhang added inline comments to D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.
Jun 18 2019, 12:12 AM · Restricted Project

Jun 17 2019

steven.zhang added a comment to D61250: [PowerPC] Forward the scheduling state for PowerPC target.

Would it be possible to add a test where the forwarding kicks in?

Jun 17 2019, 11:38 PM · Restricted Project
steven.zhang added inline comments to D61248: [NFC] Add the infrastructure to forward the scheduled state between MBB.
Jun 17 2019, 11:33 PM · Restricted Project
steven.zhang updated the diff for D61248: [NFC] Add the infrastructure to forward the scheduled state between MBB.

Address reviewer's comments. Thank you!

Jun 17 2019, 11:32 PM · Restricted Project
steven.zhang added inline comments to D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.
Jun 17 2019, 10:52 PM · Restricted Project
steven.zhang updated the diff for D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.

Address reviewer's comments.

  • Move the ctor to the header.
  • Declare the SchedState as "class" instead of "struct" (Is it ok?).
  • Rebase the patch to master and resolve the conflict.
Jun 17 2019, 10:51 PM · Restricted Project

Jun 14 2019

steven.zhang added inline comments to D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.
Jun 14 2019, 3:50 AM · Restricted Project
steven.zhang accepted D61228: [PowerPC] Set the innermost hot loop to align 32 bytes.

LGTM

Jun 14 2019, 3:03 AM · Restricted Project

Jun 13 2019

steven.zhang created D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern.
Jun 13 2019, 10:58 PM · Restricted Project
steven.zhang added inline comments to D61228: [PowerPC] Set the innermost hot loop to align 32 bytes.
Jun 13 2019, 8:51 PM · Restricted Project

Jun 9 2019

steven.zhang committed rGab846da7e8ad: [DAGCombine] Match a pattern where a wide type scalar value is stored by… (authored by steven.zhang).
[DAGCombine] Match a pattern where a wide type scalar value is stored by…
Jun 9 2019, 10:38 PM
steven.zhang added a comment to D62897: [DAGCombine] Initialize the bytes offset vector as INT64_MAX to avoid inference the endian check.

recommit the patch https://reviews.llvm.org/D61843 together with this one.

Jun 9 2019, 10:37 PM · Restricted Project
steven.zhang added a comment to D62897: [DAGCombine] Initialize the bytes offset vector as INT64_MAX to avoid inference the endian check.

@RKSimon Thank you for your nice review!

Jun 9 2019, 7:23 PM · Restricted Project

Jun 5 2019

steven.zhang updated the diff for D62897: [DAGCombine] Initialize the bytes offset vector as INT64_MAX to avoid inference the endian check.

Address comments. Early return if it has been set before, to make the code more robust.

Jun 5 2019, 7:21 PM · Restricted Project
steven.zhang added a comment to D62897: [DAGCombine] Initialize the bytes offset vector as INT64_MAX to avoid inference the endian check.

We cannot have the assertion, as it is possible that, it isn't set to something else(for example, this case). And the isBigEndian() check will fail if it isn't set to something else. However, in fact, we could do a check for each element, early return if it isn't set.

Jun 5 2019, 7:06 PM · Restricted Project
steven.zhang added a comment to rL362472: [DAGCombine] Match a pattern where a wide type scalar value is stored by….

I have created the patch https://reviews.llvm.org/D62897 to fix this issue. @sbc100 Do you have any step for me to reproduce the broken ? I tried the c code you mentioned, didn't see the difference. And it would be great if you could try the patch of https://reviews.llvm.org/D62897 together with this one to see, if the broken fixed.

Jun 5 2019, 3:44 AM
steven.zhang created D62897: [DAGCombine] Initialize the bytes offset vector as INT64_MAX to avoid inference the endian check.
Jun 5 2019, 3:37 AM · Restricted Project

Jun 4 2019

steven.zhang committed rG11de0e71b0da: [DAGCombine] Match a pattern where a wide type scalar value is stored by… (authored by steven.zhang).
[DAGCombine] Match a pattern where a wide type scalar value is stored by…
Jun 4 2019, 1:51 AM
steven.zhang committed rG72667b4e4811: [NFC] Update the test to check the endianness after the CodeGenPrepare instead… (authored by steven.zhang).
[NFC] Update the test to check the endianness after the CodeGenPrepare instead…
Jun 4 2019, 1:44 AM
steven.zhang closed D62370: [NFC] Check the endianness after the CodeGenPrepare.
Jun 4 2019, 1:44 AM · Restricted Project
steven.zhang added a comment to D62370: [NFC] Check the endianness after the CodeGenPrepare.

I have never used the children-parent before. I just add it as parent revision now, no more action. This is what I want to do:

  1. commit this patch.
  2. rebase the parent revision patch and commit it. (I need to update the patch for that revision in theory)
Jun 4 2019, 1:17 AM · Restricted Project

May 30 2019

steven.zhang added a comment to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.

I will hold this patch until the test case update for systemZ is accepted. D62370: [NFC] Check the endianness after the CodeGenPrepare.

May 30 2019, 8:46 PM · Restricted Project
steven.zhang updated the diff for D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.

Address comments.

May 30 2019, 8:44 PM · Restricted Project
steven.zhang added a parent revision for D62370: [NFC] Check the endianness after the CodeGenPrepare: D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.
May 30 2019, 7:55 PM · Restricted Project
steven.zhang added a child revision for D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores: D62370: [NFC] Check the endianness after the CodeGenPrepare.
May 30 2019, 7:55 PM · Restricted Project
steven.zhang added a comment to D62370: [NFC] Check the endianness after the CodeGenPrepare.

Hi @jonpa
As https://reviews.llvm.org/D61843 is approved but blocking by this patch, would you please help me review the change ? Thank you !

May 30 2019, 7:55 PM · Restricted Project

May 29 2019

steven.zhang added a comment to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.

Yes, I tried but decide not to reuse it. Because, the load pattern is trying to find out the load sequences that they are SHIFT and OR together, so, they have to walk the tree recursively to collect all the loads. But the store pattern is much easier. Because, We already know the stores from the chain. What we need to do is to check if all the store values are from some fixed pattern.

May 29 2019, 7:25 PM · Restricted Project

May 27 2019

steven.zhang added a comment to D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.

Gentle ping ... Thank you!

May 27 2019, 7:28 PM · Restricted Project

May 24 2019

steven.zhang added a comment to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.

https://reviews.llvm.org/D62370 is created to update the test llvm/test/CodeGen/SystemZ/codegenprepare-splitstore.ll

May 24 2019, 1:16 AM · Restricted Project
steven.zhang created D62370: [NFC] Check the endianness after the CodeGenPrepare.
May 24 2019, 1:15 AM · Restricted Project

May 23 2019

steven.zhang accepted D61873: [PowerPC] P9 Scheduling Model: dispatching rule fixes.

LGTM. But please hold on for some days if someone else might have comments.

May 23 2019, 10:54 PM · Restricted Project
steven.zhang committed rG449bfdd1b02b: [Power9] Add a specific heuristic to schedule the addi before the load When we… (authored by steven.zhang).
[Power9] Add a specific heuristic to schedule the addi before the load When we…
May 23 2019, 10:32 PM

May 21 2019

steven.zhang added inline comments to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.
May 21 2019, 7:08 PM · Restricted Project
steven.zhang updated the diff for D61930: [Power9] Add a specific heuristic to schedule the addi before the load.

Address jinong's comments.

May 21 2019, 12:37 AM · Restricted Project

May 20 2019

steven.zhang committed rG690fa1b51beb: [NFC][PowerPC] Add a test to verify if the scheduler schedule the addi before… (authored by steven.zhang).
[NFC][PowerPC] Add a test to verify if the scheduler schedule the addi before…
May 20 2019, 11:31 PM
steven.zhang added a comment to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.

Gentle ping ... Thank you!

May 20 2019, 10:03 PM · Restricted Project
steven.zhang accepted D62165: [MachinePipeliner][NFC] Add some debug log and statistics.

LGTM, except some minor comments. However, please hold on for some days, if others have comments.

May 20 2019, 7:45 PM · Restricted Project
steven.zhang retitled D61930: [Power9] Add a specific heuristic to schedule the addi before the load from [PowerPC] Add a specific heuristic to schedule the addi before the load to [Power9] Add a specific heuristic to schedule the addi before the load.
May 20 2019, 2:05 AM · Restricted Project

May 14 2019

steven.zhang created D61930: [Power9] Add a specific heuristic to schedule the addi before the load.
May 14 2019, 8:16 PM · Restricted Project

May 13 2019

steven.zhang added a comment to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.

FYI. This is the thread of the discussion. http://lists.llvm.org/pipermail/llvm-dev/2016-September/105291.html

May 13 2019, 2:09 AM · Restricted Project
steven.zhang added a comment to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.

That was discussed widely when https://reviews.llvm.org/D26149 is reviewed. This is the commit log saying something about the delay.

This optimization was discussed on llvm-dev some time ago in "Load combine pass" thread. We came to the conclusion that we want to do
this transformation late in the pipeline because in presence of atomic loads load widening is irreversible transformation and it might hinder other optimizations.
May 13 2019, 1:33 AM · Restricted Project

May 12 2019

steven.zhang created D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.
May 12 2019, 8:59 PM · Restricted Project
steven.zhang added a comment to D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.

Gentle ping ...

May 12 2019, 7:48 PM · Restricted Project

May 8 2019

steven.zhang committed rG5f7c86147d33: [NFC][PowerPC] Add test for store combine optimization. (authored by steven.zhang).
[NFC][PowerPC] Add test for store combine optimization.
May 8 2019, 12:56 AM
steven.zhang committed rG0e71a6e755f0: [CodeGenPrepare] Don't split the store if it is volatile We shouldn't split the… (authored by steven.zhang).
[CodeGenPrepare] Don't split the store if it is volatile We shouldn't split the…
May 8 2019, 12:30 AM
steven.zhang committed rGe065af6a42a9: [NFC] Add a static function to do the endian check Add a new function to do the… (authored by steven.zhang).
[NFC] Add a static function to do the endian check Add a new function to do the…
May 8 2019, 12:21 AM
steven.zhang added a comment to D61236: [NFC] Add a static function to do the endian check.

ok. Use the hasValue instead of the implicit bool convert operator to make the code clear.

May 8 2019, 12:13 AM · Restricted Project

May 4 2019

steven.zhang updated the diff for D61236: [NFC] Add a static function to do the endian check.

Update local variable name.

May 4 2019, 11:41 PM · Restricted Project

Apr 29 2019

steven.zhang updated the diff for D61236: [NFC] Add a static function to do the endian check.

Address comments.

Apr 29 2019, 10:10 PM · Restricted Project
steven.zhang updated the diff for D61169: [CodeGenPrepare] Don't split the store if it is volatile.

Use opt instead of llc to do the check.

Apr 29 2019, 12:03 AM · Restricted Project

Apr 28 2019

steven.zhang updated the diff for D61169: [CodeGenPrepare] Don't split the store if it is volatile.
Apr 28 2019, 10:08 PM · Restricted Project
steven.zhang added a comment to D61169: [CodeGenPrepare] Don't split the store if it is volatile.

Hello. I feel like this splitting just shouldn't be done for volatile stores.

Apr 28 2019, 10:08 PM · Restricted Project
steven.zhang added a comment to D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.

@fhahn I have completed all the needed patches, and it would be great if you have the time to continue the review. This is the whole picture.
https://reviews.llvm.org/D61248 is the 1st patch to allow the schedule strategy to forward the schedule state between MBB.
https://reviews.llvm.org/D61249 is the 2nd patch to update the schedule strategy for SystemZ target to adapt with 1st patch.
https://reviews.llvm.org/D59480(this patch) is the 3rd patch to add the scheduled state data structure, so that, it could be kept somewhere.
https://reviews.llvm.org/D61250 is the last patch to forward the scheduled state 3rd patch added for PostGenericScheduler and enable it for PowerPC target.

Apr 28 2019, 8:02 PM · Restricted Project
steven.zhang created D61250: [PowerPC] Forward the scheduling state for PowerPC target.
Apr 28 2019, 7:54 PM · Restricted Project
steven.zhang created D61249: [NFC] Refactor the systemZ scheduler strategy to adapt with the new schedule state forwarding infrastructure.
Apr 28 2019, 7:38 PM · Restricted Project
steven.zhang created D61248: [NFC] Add the infrastructure to forward the scheduled state between MBB.
Apr 28 2019, 7:32 PM · Restricted Project
steven.zhang updated the diff for D61236: [NFC] Add a static function to do the endian check.

Update the patch according to the reviewer comments.

Apr 28 2019, 7:09 PM · Restricted Project
steven.zhang added inline comments to D61236: [NFC] Add a static function to do the endian check.
Apr 28 2019, 4:15 AM · Restricted Project

Apr 27 2019

steven.zhang created D61236: [NFC] Add a static function to do the endian check.
Apr 27 2019, 11:18 PM · Restricted Project

Apr 25 2019

steven.zhang created D61169: [CodeGenPrepare] Don't split the store if it is volatile.
Apr 25 2019, 7:26 PM · Restricted Project

Apr 15 2019

steven.zhang added a comment to D59843: [PowerPC] Add support for __dcbf builtin.

I am ok now for the doc part change. Thank you.

Apr 15 2019, 3:31 AM · Restricted Project, Restricted Project

Apr 10 2019

steven.zhang added a comment to D59843: [PowerPC] Add support for __dcbf builtin.

Looks good, just one minor comments.
It seems that, we have already had the PowerPC section in the rst. It would be better to put them together.

PowerPC Language Extensions
------------------------------
Apr 10 2019, 8:17 PM · Restricted Project, Restricted Project

Apr 7 2019

steven.zhang added a comment to D59843: [PowerPC] Add support for __dcbf builtin.

It would be great if we could add some documentation for these new added builtins, to make more people to know what we have done. i.e. clang/docs/LanguageExtensions.rst

Apr 7 2019, 6:12 PM · Restricted Project, Restricted Project

Mar 27 2019

steven.zhang added reviewers for D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB: kbarton, nemanjai.
Mar 27 2019, 8:15 PM · Restricted Project