Page MenuHomePhabricator

linzj (zuojian lin)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 26 2018, 10:02 PM (78 w, 2 d)

Recent Activity

Mar 5 2020

linzj added a comment to D67147: Remove the additional constant which requires an extra register for statepoint lowering..

@arsenm , looks good to you?

Mar 5 2020, 10:58 PM · Restricted Project

Mar 3 2020

linzj added a comment to D67147: Remove the additional constant which requires an extra register for statepoint lowering..

I think it's fine to go back to the main stream.

Mar 3 2020, 2:09 AM · Restricted Project

Mar 2 2020

linzj updated the diff for D67147: Remove the additional constant which requires an extra register for statepoint lowering..

Rebase again. I don't think the failed unit test is relevant to my change.

Mar 2 2020, 6:33 PM · Restricted Project
linzj updated the diff for D67147: Remove the additional constant which requires an extra register for statepoint lowering..

Fix test case miss RUN comment.

Mar 2 2020, 1:54 AM · Restricted Project

Mar 1 2020

linzj updated the diff for D67147: Remove the additional constant which requires an extra register for statepoint lowering..

Rebase from the master.

Mar 1 2020, 10:46 PM · Restricted Project
linzj added a comment to D67147: Remove the additional constant which requires an extra register for statepoint lowering..

Can you rebase this? I think a similar patch conflicts (a6f38b46972e4e6978c3a768001903d3f3334cb7)

Mar 1 2020, 5:44 PM · Restricted Project

Feb 26 2020

linzj added a comment to D67147: Remove the additional constant which requires an extra register for statepoint lowering..

When the commit will be landed?

If you need someone to commit a patch for you, you should explicitly state so. I can try to commit this in the next day or so

Feb 26 2020, 6:52 PM · Restricted Project
linzj added a comment to D67147: Remove the additional constant which requires an extra register for statepoint lowering..

When the commit will be landed?

Feb 26 2020, 6:07 PM · Restricted Project

Nov 11 2019

linzj added a comment to D66459: Make ShrinkWrap more consistent..

V8 needs to save a specific set of registers at the entry of a function depending on the type of this function. For example, a JS function needs to save r0, r1,r7 along with fp, lr. And a wasm function needs to spill r3 at sp - 16.

So, these registers essentially hold argument values?

Yes. They are argument values.

But they are CSRs in the ShrinkWrap context. For example, If a JS function use/def r1 in the a basic block but ShrinkWrap move the save block to one of its successor, that will be a trouble.

I think ShrinkWrap pass is the wrong place to solve this problem. Could you, please, look at the how the registers, which correspond to vararg arguments of a variadic function are saved to
designated slots on the stack (check all mentions of ArgRegsSaveSize in ARMFrameLowering.cpp)? Perhaps you could do something similar?

Nov 11 2019, 8:35 PM · Restricted Project

Sep 18 2019

linzj added a comment to D66459: Make ShrinkWrap more consistent..

You can try to reproduce the behavior of the calling convention through a MIR test: https://llvm.org/docs/MIRLangRef.html, using $REG = IMPLICIT_DEF to clobber a CSR.

Not that simple. Your solution just handles the call instructions. The the prologue is inserted by the prologue inserter. I can't simply add a prologue to a function's MIR script, right?

What I was suggesting is to write a MIR test that starts the compilation from the ShrinkWrap pass and goes through PrologEpilogInserter (or all the way to the end), then check the output.

To do that, you can generate the MIR test with llc -stop-before shrink-wrap with your patch applied, and use $REG = IMPLICIT_DEF to strip out everything related to your downstream code. Then using llc -start-before shrink-wrap -stop-after prologepilog should allow you to check if the prologue/epilogue has been inserted at the right place.
Another solution would be to use the debug output of the ShrinkWrap pass (llc -run-pass shrink-wrap -debug-only=shrink-wrap), but that will only be tested with asserts enabled.

I may be getting all of this wrong, so let me know if that doesn't make sense for your use case.

Sep 18 2019, 5:55 PM · Restricted Project

Sep 17 2019

linzj added a comment to D66459: Make ShrinkWrap more consistent..

You can try to reproduce the behavior of the calling convention through a MIR test: https://llvm.org/docs/MIRLangRef.html, using $REG = IMPLICIT_DEF to clobber a CSR.

Not that simple. Your solution just handles the call instructions. The the prologue is inserted by the prologue inserter. I can't simply add a prologue to a function's MIR script, right?

Sep 17 2019, 10:56 PM · Restricted Project

Sep 15 2019

linzj added a comment to D66459: Make ShrinkWrap more consistent..

You need to clone https://github.com/linzj/llvm-toy, then checkout the branch named arm-tf-6_9_427_23. Then apply the patch llvm-patch-by-far.patch to llvm 8.0. So that you can compile the test case as follow. Because of a new calling convention v8cc.
the test case:

; ModuleID = 'main'
source_filename = "main"
target triple = "armv7-unknown-unknown-v8"
Sep 15 2019, 6:27 PM · Restricted Project

Sep 6 2019

linzj added a comment to D67257: New statepoint spilling mechanism.

Hi,

I don't think this patch is correct in the sense that having statepoints depend on GreedyRegAlloc is a non-starter.
Indeed, that means that now any configuration that doesn't use greedy reg alloc (like fast or basic reg alloc) will generate incorrect code with respect to state point spilling.

What problem do you see with the current handling of statepoints?

Cheers,
-Quentin

Sep 6 2019, 8:32 PM · Restricted Project
linzj added a comment to D66459: Make ShrinkWrap more consistent..

Thanks for upstreaming your changes.

I am not sure I understand what you are trying to fix, similar to @chill's request, can you please provide an example (ideally, as a test case) of what this fixes? Using MIR with llc -run-pass=shrink-wrap might help you creating a more precise test case for shrink-wrapping.

Sep 6 2019, 5:48 AM · Restricted Project

Sep 5 2019

linzj updated the diff for D67257: New statepoint spilling mechanism.

Remove an unused function.

Sep 5 2019, 11:51 PM · Restricted Project
linzj updated the diff for D67257: New statepoint spilling mechanism.

Remove an unused include file.

Sep 5 2019, 11:51 PM · Restricted Project
linzj updated the diff for D67257: New statepoint spilling mechanism.

Remove logs.

Sep 5 2019, 11:44 PM · Restricted Project
linzj created D67257: New statepoint spilling mechanism.
Sep 5 2019, 11:40 PM · Restricted Project

Sep 4 2019

linzj updated the diff for D67147: Remove the additional constant which requires an extra register for statepoint lowering..

Use undef SDValue instead.

Sep 4 2019, 7:47 PM · Restricted Project
linzj added inline comments to D67147: Remove the additional constant which requires an extra register for statepoint lowering..
Sep 4 2019, 6:57 PM · Restricted Project
linzj added a reviewer for D67147: Remove the additional constant which requires an extra register for statepoint lowering.: arsenm.
Sep 4 2019, 6:10 PM · Restricted Project
linzj added a reviewer for D67147: Remove the additional constant which requires an extra register for statepoint lowering.: igor-laevsky.
Sep 4 2019, 6:10 PM · Restricted Project
linzj created D67147: Remove the additional constant which requires an extra register for statepoint lowering..
Sep 4 2019, 12:47 AM · Restricted Project

Sep 2 2019

linzj abandoned D67068: A instruction bitcast a constant, and get used across the basic block will generate additional COPY SDNode.The example as follow:.

I think the ConstantHoist have its job well done, maybe reload a constant from a stack slot is a good idea.

Sep 2 2019, 6:23 PM · Restricted Project
linzj added a comment to D67068: A instruction bitcast a constant, and get used across the basic block will generate additional COPY SDNode.The example as follow:.

tests missing.
From the first look this fix seems rather ad-hoc.

Sep 2 2019, 5:34 AM · Restricted Project
linzj created D67068: A instruction bitcast a constant, and get used across the basic block will generate additional COPY SDNode.The example as follow:.
Sep 2 2019, 3:27 AM · Restricted Project

Aug 21 2019

linzj added inline comments to D66459: Make ShrinkWrap more consistent..
Aug 21 2019, 12:59 AM · Restricted Project

Aug 20 2019

linzj added inline comments to D66459: Make ShrinkWrap more consistent..
Aug 20 2019, 6:11 PM · Restricted Project

Aug 19 2019

linzj created D66459: Make ShrinkWrap more consistent..
Aug 19 2019, 6:48 PM · Restricted Project

Nov 26 2018

linzj added a comment to D54929: Support StackMaps For ARM.

This patch pass the test:
; ModuleID = 'test'
source_filename = "test"
target triple = "armv7-linux-android"

Nov 26 2018, 10:15 PM
linzj added reviewers for D54929: Support StackMaps For ARM: grosbach, lattner, rafaelauler.
Nov 26 2018, 10:13 PM
linzj created D54929: Support StackMaps For ARM.
Nov 26 2018, 10:09 PM