Page MenuHomePhabricator

zzheng (Z. Zheng)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 2 2014, 3:28 PM (346 w, 5 d)

Recent Activity

Sep 17 2020

zzheng committed rG1c466477ad46: [RISCV] Support Shadow Call Stack (authored by zzheng).
[RISCV] Support Shadow Call Stack
Sep 17 2020, 4:03 PM
zzheng closed D84414: [RISCV] Support Shadow Call Stack.
Sep 17 2020, 4:02 PM · Restricted Project, Restricted Project
zzheng committed rGcab780a5a0ef: [NFC] Test Commit (authored by zzheng).
[NFC] Test Commit
Sep 17 2020, 3:15 PM
zzheng added a comment to D87582: [RISCV][ASAN] mark asan as supported for RISCV64 and enable tests.

I don't mean to be nit-picking... but aren't all these [ASAN] patches only applies to RV-64? maybe mention in commit msg that RV-32 is not supported?

Sep 17 2020, 2:31 PM · Restricted Project

Sep 16 2020

zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

Fixed comment and lint

Sep 16 2020, 5:16 PM · Restricted Project, Restricted Project
zzheng added inline comments to D84414: [RISCV] Support Shadow Call Stack.
Sep 16 2020, 4:25 PM · Restricted Project, Restricted Project
zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

Addressed comments by @jrtc27

Sep 16 2020, 4:23 PM · Restricted Project, Restricted Project
zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

rebase & ping..

Sep 16 2020, 10:58 AM · Restricted Project, Restricted Project

Sep 3 2020

zzheng added a comment to D84414: [RISCV] Support Shadow Call Stack.

@jrt27, @lenary, @asb, IMHO, the patch is in good shape now, all concerns raised in comments has been addressed/answered, is there any additional comments before we can land it?

Sep 3 2020, 7:39 AM · Restricted Project, Restricted Project

Aug 25 2020

zzheng added a comment to D84414: [RISCV] Support Shadow Call Stack.

Ok, so any compilation units without -fsanitize=shadow-call-stack should be compiled with -ffixed-x18 if you want to link those together. That is reasonable. My question was whether we can ensure that -fsanitize=shadow-call-stack can imply -ffixed-x18 rather than having to pass both options.

It is my understanding that all functions in a CU with -fsanitize=shadow-call-stack will get the SCS function attribute, so why can't we use that attribute to work out whether x18 should be reserved, rather than using -ffixed-x18? You'll see RISCVRegisterInfo::getReservedRegs reserves fp and bp only if they're needed by the function (which can be based on attributes or other info), rather than using isRegisterReservedByUser - which seems cleaner to me.

Aug 25 2020, 10:50 AM · Restricted Project, Restricted Project

Aug 24 2020

zzheng added a comment to D84414: [RISCV] Support Shadow Call Stack.

Why do we have to pass -ffixed-x18 when compiling? Is it enough to just reserve x18 whenever the function has the shadow call stack attribute?

Aug 24 2020, 11:04 AM · Restricted Project, Restricted Project
zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

IMHO, the patch is in good shape. As we discussed in the bi-weekly meetings, RV32E only has 16 registers. Systems based on RV32E may have limited memory as well. Besides, LLVM does not have full support for RV32E yet. We can commit this patch as-is and change it later if RV32E needs SCS.

Aug 24 2020, 10:07 AM · Restricted Project, Restricted Project

Aug 19 2020

zzheng added a comment to D86195: [RISC-V] Add support for AddressSanitizer on RISC-V GCC.

can you generate the diff with full context?

Aug 19 2020, 9:01 AM

Jul 28 2020

zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

rebased..

Jul 28 2020, 3:17 PM · Restricted Project, Restricted Project

Jul 27 2020

zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

clang-formatted.

Jul 27 2020, 3:15 PM · Restricted Project, Restricted Project
zzheng added inline comments to D84414: [RISCV] Support Shadow Call Stack.
Jul 27 2020, 1:24 PM · Restricted Project, Restricted Project
zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

Addressed styling & code clarity issues.

Jul 27 2020, 1:23 PM · Restricted Project, Restricted Project

Jul 23 2020

zzheng added inline comments to D84414: [RISCV] Support Shadow Call Stack.
Jul 23 2020, 11:56 AM · Restricted Project, Restricted Project
zzheng updated the diff for D84414: [RISCV] Support Shadow Call Stack.

clang-formated RISCVFrameLowering.cpp

Jul 23 2020, 11:56 AM · Restricted Project, Restricted Project
Herald added projects to D84414: [RISCV] Support Shadow Call Stack: Restricted Project, Restricted Project.
Jul 23 2020, 7:47 AM · Restricted Project, Restricted Project

Sep 27 2019

zzheng updated the diff for D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

rebased moved to monorepo

Sep 27 2019, 11:05 AM · Restricted Project

Sep 26 2019

zzheng committed rG1128fa092491: [Unroll] Do NOT unroll a loop with small runtime upperbound (authored by zzheng).
[Unroll] Do NOT unroll a loop with small runtime upperbound
Sep 26 2019, 2:43 PM
zzheng abandoned D62833: [DAGCombine][Thumb] Use single CP entry for addressing GV with large offset.
Sep 26 2019, 2:42 PM · Restricted Project
zzheng committed rL373017: [Unroll] Do NOT unroll a loop with small runtime upperbound.
[Unroll] Do NOT unroll a loop with small runtime upperbound
Sep 26 2019, 2:39 PM
zzheng closed D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.
Sep 26 2019, 2:39 PM · Restricted Project

Jul 25 2019

zzheng added a comment to D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

ping?

Jul 25 2019, 4:37 PM · Restricted Project

Jul 23 2019

zzheng added inline comments to D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.
Jul 23 2019, 11:11 AM · Restricted Project
zzheng added a comment to D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

For the case in this issue, Start and L are not enough, we also need Stride, to calculate correct MinStart, requiring getUnsignedRangeAtScope() take to SCEV* parameters, I think it's a little confusing.

Jul 23 2019, 11:08 AM · Restricted Project
zzheng updated the diff for D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

Added new test

Jul 23 2019, 11:00 AM · Restricted Project

Jun 20 2019

zzheng added a comment to D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.

ping...

Jun 20 2019, 1:07 PM · Restricted Project
zzheng retitled D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT from [SCEV]When safe, use Stride as MinStart in computeMaxBECountForLT to [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.
Jun 20 2019, 12:16 PM · Restricted Project
zzheng updated the diff for D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.
Jun 20 2019, 12:12 PM · Restricted Project

Jun 13 2019

zzheng added a comment to D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.

ping?

Jun 13 2019, 11:17 AM · Restricted Project
zzheng added a comment to D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

ping?

Jun 13 2019, 11:17 AM · Restricted Project

Jun 11 2019

zzheng updated the diff for D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.
Jun 11 2019, 3:59 PM · Restricted Project
zzheng updated the summary of D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.
Jun 11 2019, 1:28 PM · Restricted Project
zzheng updated the diff for D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.

Renamed UnrollByMaxCount to FullUnrollMaxTripCount, note this is not to be confused with member variable UP.FullUnrollMaxCount.
Changed debug output to accurately reflect partial or runtime unrolling.

Jun 11 2019, 1:28 PM · Restricted Project

Jun 10 2019

zzheng added a reviewer for D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound: dmgreen.
Jun 10 2019, 5:29 PM · Restricted Project
zzheng added inline comments to D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.
Jun 10 2019, 5:27 PM · Restricted Project

Jun 7 2019

zzheng added a comment to D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.

Wouldn't I want to (fully) unroll loops especially those with low trip count to reduce overhead/enable further optimizations?

Do you have performance/code size numbers?

Jun 7 2019, 4:59 PM · Restricted Project
zzheng added a comment to D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.

What problem is this solving?

Jun 7 2019, 4:01 PM · Restricted Project
zzheng updated the diff for D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.
define dso_local void @hoge_3(i8 %arg) {
entry:
  %x = load i32, i32* @global, align 4
  %y = load i8*, i8** @global.1, align 4
  %0 = icmp ult i32 %x, 17
  br i1 %0, label %loop, label %exit
Jun 7 2019, 4:01 PM · Restricted Project

Jun 6 2019

zzheng updated the diff for D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

re-upload with full context

Jun 6 2019, 9:20 PM · Restricted Project
zzheng updated the summary of D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.
Jun 6 2019, 9:14 PM · Restricted Project
zzheng updated the diff for D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.

Re-upload patch with full context.

Jun 6 2019, 9:14 PM · Restricted Project
zzheng abandoned D27911: [LoopUnroll] Keep UP.Count when considering complete unroll.
Jun 6 2019, 6:24 PM · Restricted Project
zzheng updated the summary of D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.
Jun 6 2019, 6:19 PM · Restricted Project
zzheng created D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.
Jun 6 2019, 6:16 PM · Restricted Project
zzheng created D62989: [Unroll] Do NOT unroll a loop with small runtime upperbound.
Jun 6 2019, 5:52 PM · Restricted Project

Jun 3 2019

zzheng created D62833: [DAGCombine][Thumb] Use single CP entry for addressing GV with large offset.
Jun 3 2019, 5:08 PM · Restricted Project

Oct 11 2018

zzheng added inline comments to D53005: Implement machine unroller utility class.
Oct 11 2018, 1:54 PM

Oct 10 2018

zzheng added inline comments to D33935: Allow rematerialization of ARM Thumb MOVi8 instruction in some contexts.
Oct 10 2018, 4:09 PM

Sep 25 2018

zzheng committed rL343053: Revert "Revert "[ConstHoist] Do not rebase single (or few) dependent constant"".
Revert "Revert "[ConstHoist] Do not rebase single (or few) dependent constant""
Sep 25 2018, 6:01 PM
zzheng committed rL342994: [ConstHoist] Do not rebase single (or few) dependent constant.
[ConstHoist] Do not rebase single (or few) dependent constant
Sep 25 2018, 10:49 AM
zzheng closed D52243: [ConstHoist] Do not rebase single (or few) dependent constant.
Sep 25 2018, 10:49 AM

Sep 24 2018

zzheng added inline comments to D52243: [ConstHoist] Do not rebase single (or few) dependent constant.
Sep 24 2018, 3:28 PM
zzheng updated the diff for D52243: [ConstHoist] Do not rebase single (or few) dependent constant.

Moved collecting dependent rebased and checking size of ToBeRebased prior to emitting bitcast of base constants
Added bb labels to check in the test case.

Sep 24 2018, 3:27 PM
zzheng committed rL342898: [Thumb1] Any imm8 should have cost of 1.
[Thumb1] Any imm8 should have cost of 1
Sep 24 2018, 9:17 AM
zzheng closed D52257: [Thumb1] Any imm of i8 type on Thumb1 should have cost of 1.
Sep 24 2018, 9:17 AM

Sep 21 2018

zzheng added a comment to D52243: [ConstHoist] Do not rebase single (or few) dependent constant.

This does seem, from the tests I ran, to reduce codesize on average. Especially on Thumb1.

Sep 21 2018, 5:26 PM
zzheng added inline comments to D52243: [ConstHoist] Do not rebase single (or few) dependent constant.
Sep 21 2018, 5:25 PM
zzheng updated the diff for D52243: [ConstHoist] Do not rebase single (or few) dependent constant.

Cleaned up test case.
Added opt tests.
Opt tests was put in the same test file to avoid duplication and maintenance burden.

Sep 21 2018, 5:17 PM
zzheng added a comment to D52257: [Thumb1] Any imm of i8 type on Thumb1 should have cost of 1.

Ah, but looking a bit closer now, I am not sure this is the right thing to do. This changes makes any 8 bit value cheap, including negative numbers. And I am not sure if this is the right thing to do, since the Thumb1 immediates are positive numbers. It looks this a workaround for store-merging interacting badly with constant hoisting.

Sep 21 2018, 3:58 PM
zzheng updated the diff for D52257: [Thumb1] Any imm of i8 type on Thumb1 should have cost of 1.

Cleaned up test case.

Sep 21 2018, 3:54 PM

Sep 19 2018

zzheng added a comment to D52243: [ConstHoist] Do not rebase single (or few) dependent constant.

ping...

Sep 19 2018, 4:33 PM
zzheng added a comment to D52257: [Thumb1] Any imm of i8 type on Thumb1 should have cost of 1.

ping...

Sep 19 2018, 4:32 PM

Sep 18 2018

zzheng created D52257: [Thumb1] Any imm of i8 type on Thumb1 should have cost of 1.
Sep 18 2018, 7:45 PM
zzheng added reviewers for D52257: [Thumb1] Any imm of i8 type on Thumb1 should have cost of 1: zinob, apazos.
Sep 18 2018, 7:45 PM
zzheng added reviewers for D52243: [ConstHoist] Do not rebase single (or few) dependent constant: javed.absar, wmi, SjoerdMeijer, mehdi_amini.
Sep 18 2018, 7:32 PM
zzheng created D52243: [ConstHoist] Do not rebase single (or few) dependent constant.
Sep 18 2018, 11:51 AM

Sep 4 2018

zzheng committed rL341417: Revert "Revert r341269: [Constant Hoisting] Hoisting Constant GEP Expressions".
Revert "Revert r341269: [Constant Hoisting] Hoisting Constant GEP Expressions"
Sep 4 2018, 3:18 PM
zzheng closed D51654: Reland r341269: [Constant Hoisting] Hoisting Constant GEP Expressions.
Sep 4 2018, 3:18 PM
zzheng updated the summary of D51654: Reland r341269: [Constant Hoisting] Hoisting Constant GEP Expressions.
Sep 4 2018, 2:48 PM
zzheng updated the diff for D51654: Reland r341269: [Constant Hoisting] Hoisting Constant GEP Expressions.

Use std::stable_sort() as Eli suggested.

Sep 4 2018, 2:48 PM
zzheng created D51654: Reland r341269: [Constant Hoisting] Hoisting Constant GEP Expressions.
Sep 4 2018, 1:20 PM

Aug 31 2018

zzheng committed rL341269: [Constant Hoisting] Hoisting Constant GEP Expressions.
[Constant Hoisting] Hoisting Constant GEP Expressions
Aug 31 2018, 5:07 PM
zzheng closed D51396: [Constant Hoisting] Hoisting Constant GEP Expressions.
Aug 31 2018, 5:07 PM
zzheng updated the diff for D51396: [Constant Hoisting] Hoisting Constant GEP Expressions.

Addressed Eli's comments.

Aug 31 2018, 4:52 PM
zzheng added inline comments to D51396: [Constant Hoisting] Hoisting Constant GEP Expressions.
Aug 31 2018, 4:08 PM
zzheng updated the diff for D51396: [Constant Hoisting] Hoisting Constant GEP Expressions.

Updated version reflects discussion with Eli.

Aug 31 2018, 3:59 PM

Aug 29 2018

zzheng added inline comments to D51396: [Constant Hoisting] Hoisting Constant GEP Expressions.
Aug 29 2018, 4:13 PM
zzheng updated the diff for D51396: [Constant Hoisting] Hoisting Constant GEP Expressions.

Unfortunately bitcast + gep + bitcast will only change the constant GEP expr from multi-dimension to single dimension, and it's still a constant pool entry after lowering.

Aug 29 2018, 1:01 PM

Aug 28 2018

zzheng created D51396: [Constant Hoisting] Hoisting Constant GEP Expressions.
Aug 28 2018, 5:44 PM
zzheng committed rL340882: [QTOOL-37352] Consider isLegalAddressingImm in Constant Hoisting.
[QTOOL-37352] Consider isLegalAddressingImm in Constant Hoisting
Aug 28 2018, 4:03 PM
zzheng closed D50931: Consider isLegalAddressingImm in Constant Hoisting.
Aug 28 2018, 4:03 PM
zzheng updated the diff for D50931: Consider isLegalAddressingImm in Constant Hoisting.
Aug 28 2018, 3:46 PM

Aug 27 2018

zzheng updated the diff for D50931: Consider isLegalAddressingImm in Constant Hoisting.

Moved 'break;' under proper if statement.

Aug 27 2018, 4:57 PM
zzheng updated the diff for D50931: Consider isLegalAddressingImm in Constant Hoisting.

Previous version mistakenly checks MinValItr->ConstInst rather than CC->ConstInst against StoreInst User's pointer operand.

Aug 27 2018, 4:08 PM

Aug 24 2018

zzheng added inline comments to D50931: Consider isLegalAddressingImm in Constant Hoisting.
Aug 24 2018, 5:16 PM
zzheng updated the diff for D50931: Consider isLegalAddressingImm in Constant Hoisting.

Updated as Eli suggested.

Aug 24 2018, 5:14 PM

Aug 23 2018

zzheng added a comment to D50931: Consider isLegalAddressingImm in Constant Hoisting.

ping...

Aug 23 2018, 10:24 AM

Aug 21 2018

zzheng updated the diff for D50931: Consider isLegalAddressingImm in Constant Hoisting.

Updated test case as Eli suggested.

Aug 21 2018, 3:56 PM

Aug 20 2018

zzheng added a comment to D50931: Consider isLegalAddressingImm in Constant Hoisting.

ping?

Aug 20 2018, 11:24 AM

Aug 17 2018

zzheng edited reviewers for D50931: Consider isLegalAddressingImm in Constant Hoisting, added: srhines, ributzka; removed: zinob, yinma.
Aug 17 2018, 4:11 PM
zzheng created D50931: Consider isLegalAddressingImm in Constant Hoisting.
Aug 17 2018, 4:05 PM

Apr 9 2018

zzheng closed D44257: [MemorySSAUpdater] Mark non-trivial Phi for not to optimize.

committed as r329621, spelling errors fixed in r329230

Apr 9 2018, 2:03 PM
zzheng committed rL329621: [MemorySSAUpdater] Mark Phi users of a node being moved as non-optimize.
[MemorySSAUpdater] Mark Phi users of a node being moved as non-optimize
Apr 9 2018, 1:58 PM

Apr 4 2018

zzheng added a comment to D44257: [MemorySSAUpdater] Mark non-trivial Phi for not to optimize.

I'll run a bunch of internal test to validate the patch. I'll commit it after testing if no one objects.

Apr 4 2018, 7:29 PM
zzheng added a comment to D44257: [MemorySSAUpdater] Mark non-trivial Phi for not to optimize.

Just one nit (inline) and a general question: is this new set meant to persist across multiple updates, should the erase in fixupDefs be taking care of everything added in a given query, or should we be clearing it at some point?

(If the answer is "the middle one," would it be easy to assert that the def is empty somewhere?)

Apr 4 2018, 7:28 PM
zzheng updated the diff for D44257: [MemorySSAUpdater] Mark non-trivial Phi for not to optimize.

Addressed comments by Eli and George.

Apr 4 2018, 7:25 PM