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 (53 w, 3 d)

Recent Activity

Yesterday

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

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

Thu, May 23

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.

Thu, May 23, 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…
Thu, May 23, 10:32 PM

Tue, May 21

steven.zhang added inline comments to D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.
Tue, May 21, 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.

Tue, May 21, 12:37 AM · Restricted Project

Mon, May 20

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…
Mon, May 20, 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!

Mon, May 20, 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.

Mon, May 20, 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.
Mon, May 20, 2:05 AM · Restricted Project

Tue, May 14

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

Mon, May 13

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

Mon, May 13, 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.
Mon, May 13, 1:33 AM · Restricted Project

Sun, May 12

steven.zhang created D61843: [DAGCombine] Match a pattern where a wide type scalar value is stored by several narrow stores.
Sun, May 12, 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 ...

Sun, May 12, 7:48 PM · Restricted Project

Wed, May 8

steven.zhang committed rG5f7c86147d33: [NFC][PowerPC] Add test for store combine optimization. (authored by steven.zhang).
[NFC][PowerPC] Add test for store combine optimization.
Wed, May 8, 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…
Wed, May 8, 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…
Wed, May 8, 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.

Wed, May 8, 12:13 AM · Restricted Project

Sat, May 4

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

Update local variable name.

Sat, May 4, 11:41 PM · Restricted Project

Mon, Apr 29

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

Address comments.

Mon, Apr 29, 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.

Mon, Apr 29, 12:03 AM · Restricted Project

Sun, Apr 28

steven.zhang updated the diff for D61169: [CodeGenPrepare] Don't split the store if it is volatile.
Sun, Apr 28, 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.

Sun, Apr 28, 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.

Sun, Apr 28, 8:02 PM · Restricted Project
steven.zhang created D61250: [PowerPC] Forward the scheduling state for PowerPC target.
Sun, Apr 28, 7:54 PM · Restricted Project
steven.zhang created D61249: [NFC] Refactor the systemZ scheduler strategy to adapt with the new schedule state forwarding infrastructure.
Sun, Apr 28, 7:38 PM · Restricted Project
steven.zhang created D61248: [NFC] Add the infrastructure to forward the scheduled state between MBB.
Sun, Apr 28, 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.

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

Sat, Apr 27

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

Thu, Apr 25

steven.zhang created D61169: [CodeGenPrepare] Don't split the store if it is volatile.
Thu, Apr 25, 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

Mar 26 2019

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

ok. I will prepare another two patches first, so that, we could continue the review.

Mar 26 2019, 9:07 PM · Restricted Project
steven.zhang committed rG5321dcd608a1: [NFC][PowerPC] Custom PowerPC specific machine-scheduler This patch lays the… (authored by steven.zhang).
[NFC][PowerPC] Custom PowerPC specific machine-scheduler This patch lays the…
Mar 26 2019, 8:49 PM
steven.zhang added a comment to D59284: [NFC][PowerPC] Custom PowerPC specific machine-scheduler.

Thank you for the review comments. I have addressed all the comments.

Mar 26 2019, 8:39 PM · Restricted Project

Mar 24 2019

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

gentle ping ...

Mar 24 2019, 11:20 PM · Restricted Project

Mar 18 2019

steven.zhang added inline comments to D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.
Mar 18 2019, 8:20 PM · Restricted Project
steven.zhang updated the diff for D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.

Address comments.

Mar 18 2019, 8:18 PM · Restricted Project
steven.zhang added a comment to D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.

On a first look, the patch looks useful! Any chance to provide the follow-up patch that uses it as well? that would be helpful to see the bigger picture. Also, are you seeing any benefits by preserving the state?

Mar 18 2019, 7:09 PM · Restricted Project
steven.zhang added a comment to D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.

I did something similar for the SystemZ PostRA scheduler. Is this patch taking that into consideration? I have not looked at this in detail, but it would be nice if the SystemZ implementation could use this or at least parts of it...

Mar 18 2019, 7:03 PM · Restricted Project

Mar 17 2019

steven.zhang created D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB.
Mar 17 2019, 11:03 PM · Restricted Project
steven.zhang added a comment to D59284: [NFC][PowerPC] Custom PowerPC specific machine-scheduler.

gentle ping ..

Mar 17 2019, 7:16 PM · Restricted Project

Mar 12 2019

steven.zhang created D59284: [NFC][PowerPC] Custom PowerPC specific machine-scheduler.
Mar 12 2019, 7:28 PM · Restricted Project

Mar 5 2019

steven.zhang committed rG6a8aa0e89807: [NFC] Declare the member data of class PostGenericScheduler as "protected"… (authored by steven.zhang).
[NFC] Declare the member data of class PostGenericScheduler as "protected"…
Mar 5 2019, 6:39 PM

Mar 4 2019

steven.zhang created D58949: [NFC] Declare the member data of class PostGenericScheduler as "protected" instead of "private".
Mar 4 2019, 6:43 PM · Restricted Project

Feb 19 2019

steven.zhang added a comment to D58378: [PowerPC]Leverage the addend in the TOC relocation to do the address calculation.

This can cause relocation overflows:

$ cat b.c 
double b[1LU << 33];
double foo() { return b[(1LU << _SH) - 1] ; }
void setfoo(double d) { b[(1LU << _SH) - 1] = d; }

$ cat main.c 
double foo();
void setfoo(double);
int main(void) {
  setfoo(445.2);
  return foo() == 445.2;
}

$ clang -O2 b.c main.c -D_SH=28
/tmp/b-9d97be.o: In function `foo':
b.c:(.text+0x8): relocation truncated to fit: R_PPC64_TOC16_HA against symbol `b' defined in COMMON section in /tmp/b-9d97be.o+7ffffff8
/tmp/b-9d97be.o: In function `setfoo':
b.c:(.text+0x28): relocation truncated to fit: R_PPC64_TOC16_HA against symbol `b' defined in COMMON section in /tmp/b-9d97be.o+7ffffff8
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
Feb 19 2019, 10:35 PM · Restricted Project
steven.zhang added inline comments to D58378: [PowerPC]Leverage the addend in the TOC relocation to do the address calculation.
Feb 19 2019, 10:31 PM · Restricted Project
steven.zhang created D58378: [PowerPC]Leverage the addend in the TOC relocation to do the address calculation.
Feb 19 2019, 12:51 AM · Restricted Project

Dec 25 2018

steven.zhang updated the diff for D56078: [PowerPC] Remove the implicit use of the register if it is replaced by Imm.
Dec 25 2018, 7:19 PM
steven.zhang created D56078: [PowerPC] Remove the implicit use of the register if it is replaced by Imm.
Dec 25 2018, 7:14 PM

Dec 18 2018

steven.zhang accepted D55754: [PowerPC] Implement the ”isSelectSupported()“ target hook.

LGTM. However, please hold on until another reviewer accept this patch,

Dec 18 2018, 9:33 PM
steven.zhang added inline comments to D55754: [PowerPC] Implement the ”isSelectSupported()“ target hook.
Dec 18 2018, 5:54 PM

Dec 17 2018

steven.zhang created D55810: [Power9] Enable the Out-of-Order scheduling model for P9 hw.
Dec 17 2018, 11:23 PM

Dec 6 2018

steven.zhang accepted D55143: [PowerPC][NFC] Sorting out Pseudo related classes to avoid confusion.

LGTM.

Dec 6 2018, 8:51 PM
steven.zhang added a comment to D55192: [PowerPC] VSX register support for inline assembly.

It seems that, there are more registers in ABI about the additional register than we present in this patch. It would be great if we would list all of them here or add some comments to indicate this at least.

Dec 6 2018, 8:46 PM

Dec 5 2018

steven.zhang added inline comments to D55143: [PowerPC][NFC] Sorting out Pseudo related classes to avoid confusion.
Dec 5 2018, 6:21 PM

Dec 3 2018

steven.zhang added inline comments to D55143: [PowerPC][NFC] Sorting out Pseudo related classes to avoid confusion.
Dec 3 2018, 8:01 PM
steven.zhang added inline comments to D55143: [PowerPC][NFC] Sorting out Pseudo related classes to avoid confusion.
Dec 3 2018, 7:56 PM

Dec 2 2018

steven.zhang accepted D54738: [PowerPC] Fix inconsistent ImmMustBeMultipleOf for same instruction.

LGTM.

Dec 2 2018, 7:14 PM

Nov 29 2018

steven.zhang added a comment to D54925: [NFC] [PowerPC] add an routine in PPCTargetLowering to determine if a global is accessed as got-indirect or not..

Update the comments.

Nov 29 2018, 11:01 PM
steven.zhang updated the diff for D54925: [NFC] [PowerPC] add an routine in PPCTargetLowering to determine if a global is accessed as got-indirect or not..
Nov 29 2018, 11:01 PM

Nov 27 2018

steven.zhang accepted D54825: [PowerPC] Fix a conversion is not considered when the ISD::BR_CC node making the instruction selection.

LGTM.

Nov 27 2018, 7:08 PM
steven.zhang accepted D54824: [PowerPC] [NFC] Add test cases to the ISD::BR_CC node in the instruction selection.

LGTM now.

Nov 27 2018, 1:35 AM

Nov 26 2018

steven.zhang created D54925: [NFC] [PowerPC] add an routine in PPCTargetLowering to determine if a global is accessed as got-indirect or not..
Nov 26 2018, 6:54 PM
steven.zhang requested changes to D54824: [PowerPC] [NFC] Add test cases to the ISD::BR_CC node in the instruction selection.

Personally, I don't like writing the test case using such script. Because, it will check all the instructions and make your test point unclear. And it hard code the register name, which make this test fragile。

This makes maintenance of tests easier since anyone can re-run the script. Of course, the test case is very strictly specified which will make it sensitive to changes in codegen/regalloc/scheduling. However, it is arguably easier for someone to re-run the script and for reviewers to carefully review every aspect of the change than it would be if only specific instructions are checked. There is some value in tests being sensitive to changes not necessarily related to what they are testing - we may discover unintended changes that are actually detrimental.

As to the point about what the test case is actually testing, I think that is a valid concern and a comment should explain that.

Thank you for the detail explanation. So, there are Pro & Cons for both and they are targeting for different purpose. For this case, we shouldn't use this script as we have clear testing point.

Nov 26 2018, 6:10 PM

Nov 21 2018

steven.zhang added a comment to D54824: [PowerPC] [NFC] Add test cases to the ISD::BR_CC node in the instruction selection.

Personally, I don't like writing the test case using such script. Because, it will check all the instructions and make your test point unclear. And it hard code the register name, which make this test fragile。

Nov 21 2018, 11:13 PM
steven.zhang accepted D54824: [PowerPC] [NFC] Add test cases to the ISD::BR_CC node in the instruction selection.

You don't need create a review for the new added NFC test case. LGTM.

Nov 21 2018, 10:54 PM

Oct 25 2018

steven.zhang added inline comments to D44528: [PowerPC] Implement canCombineStoreAndExtract and provide the missing codegen patterns.
Oct 25 2018, 12:28 AM

Oct 21 2018

steven.zhang accepted D53323: [PowerPC][NFC] Fix bugs in r+r to r+i conversion.

LGTM.

Oct 21 2018, 7:36 PM

Oct 16 2018

steven.zhang added a comment to D53323: [PowerPC][NFC] Fix bugs in r+r to r+i conversion.

The patch will disable some valid transformation post RA(i.e. LXSDX --> LXSD if the def reg is valid for D-form). We can continue to check the dst Reg to see if it is valid, instead of disabling it completely.

Oct 16 2018, 7:54 PM

Oct 11 2018

steven.zhang added a comment to D46377: [PowerPC] Forward source register of add-immediate to D-Form instructions.

This is for pre-RA and my fix is for Post RA. Maybe, we can extend my fix to cover the pre-RA case. I will re-submit a new fix to cover this test case. I think, we could abandon this fix.

Oct 11 2018, 7:08 PM

Oct 9 2018

steven.zhang added a comment to D52449: [PowerPC] Fix the assert of ISD::SIGN_EXTEND_INREG when type is v2i16 and v2i8.

@wuzish You could apply the commit access from community. I will commit the patch for you.

Oct 9 2018, 7:13 PM

Sep 19 2018

steven.zhang added a comment to D52074: [PowerPC] [Clang] Add vector int128 pack/unpack builtins.

I will commit the patch for you.

Sep 19 2018, 8:18 PM
steven.zhang added a comment to D52072: [PowerPC] Fix the assert of combineBVOfConsecutiveLoads when element num is 1.

I will commit the patch for you.

Sep 19 2018, 8:06 PM

Sep 12 2018

steven.zhang added inline comments to D51988: [PowerPC] Folding XForm to DForm loads requires alignment for some DForm loads..
Sep 12 2018, 6:49 PM

Aug 21 2018

steven.zhang added inline comments to D50968: [AST] make a static local variable in a fuction hidden by -fvisibility-inlines-hidden visible.
Aug 21 2018, 3:35 AM

Aug 17 2018

steven.zhang added a comment to D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.

I have done the following tests with this patch:

  1. LLVM check-all uniitests
  2. LLVM test-suites
  3. bootstrap build the clang with the clang including my fix, and then, run the llvm check-all and test-suites, and it passed.
Aug 17 2018, 2:07 AM
steven.zhang added inline comments to D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.
Aug 17 2018, 2:05 AM
steven.zhang updated the diff for D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.
Aug 17 2018, 2:01 AM

Jul 30 2018

steven.zhang added a comment to D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.

I have updated the patch and we can continue the review now.

Jul 30 2018, 12:40 AM

Jul 20 2018

steven.zhang updated the diff for D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.
Jul 20 2018, 12:44 AM

Jul 19 2018

steven.zhang updated the diff for D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.

Clean up all the failures from llvm test-suite. We miss to check the RegMO operand for the ADDI.

Jul 19 2018, 11:54 PM

Jul 16 2018

steven.zhang added a comment to D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.

Yes, you are right.
y = ADDI x, imm.
w = LFDX 0, y

Jul 16 2018, 12:27 AM

Jul 6 2018

steven.zhang created D49007: [PowerPC] Add a peephole post RA to transform the inst that fed by add.
Jul 6 2018, 1:12 AM

Jul 1 2018

steven.zhang added a comment to D48813: [PowerPC] Don't make it as pre-inc candidate if displacement isn't 4's multiple for i64 pre-inc load/store.

It is done.

Jul 1 2018, 10:57 PM

Jun 12 2018

steven.zhang updated the diff for D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.

Remove the data layout and triple in the IR and specify it in the command line.

Jun 12 2018, 7:14 PM
steven.zhang updated the diff for D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.

Add the triple for the new created test case toc-float.ll

Jun 12 2018, 1:18 AM

Jun 10 2018

steven.zhang updated the diff for D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.
Jun 10 2018, 10:14 PM
steven.zhang added inline comments to D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.
Jun 10 2018, 10:10 PM
steven.zhang added inline comments to D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.
Jun 10 2018, 7:25 PM

Jun 8 2018

steven.zhang updated the diff for D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.
Jun 8 2018, 2:52 AM
steven.zhang added a comment to D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.

Update the change basing on Nemanjai's comment. Thank you.

Jun 8 2018, 12:49 AM
steven.zhang updated the diff for D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.
Jun 8 2018, 12:39 AM

May 31 2018

steven.zhang added a comment to D46377: [PowerPC] Forward source register of add-immediate to D-Form instructions.

If I understand correctly, we may also need to handle the DFLOADf32/DFLOADf64 and store pair here, as this is done pre-RA.

May 31 2018, 10:13 PM
steven.zhang updated the diff for D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.

There are two changes:

  1. add a query to check if it is imm operand as Nemanjai suggested. Didn't find other places that could use this query.
  2. add a new test case to address the global case.
May 31 2018, 8:17 PM
steven.zhang added a comment to D47568: [Power9] Do the add-imm peephole for pseudo instruction DFLOADf32/DFLOADf64 and the store pair.

Thank you for the comment. I will fix that. BTW, I cannot get the assertion from your case, but this case.(miss some options ?) It seems that, clang put the floating variable into the TOC with some condition, which is different from gcc/xlc. I will deliver some other change to fix this issue.

May 31 2018, 7:17 PM