Page MenuHomePhabricator

skan (Kan Shengchen)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 23 2019, 8:52 PM (166 w, 2 d)

Recent Activity

Tue, Jun 28

skan accepted D127932: [TableGen] Add a knob for MCOperandInfo expansion in gen-instr-info.

LGTM

Tue, Jun 28, 6:57 PM · Restricted Project, Restricted Project

Thu, Jun 23

skan added inline comments to D127932: [TableGen] Add a knob for MCOperandInfo expansion in gen-instr-info.
Thu, Jun 23, 8:07 AM · Restricted Project, Restricted Project

Wed, Jun 15

skan accepted D126116: [X86][BOLT] Use getOperandType to determine memory access size.

LGTM

Wed, Jun 15, 7:02 PM · Restricted Project, Restricted Project
skan accepted D127787: [TableGen][X86] Add Size field to X86MemOperand class.

LGTM

Wed, Jun 15, 6:58 PM · Restricted Project, Restricted Project
skan added a comment to D127787: [TableGen][X86] Add Size field to X86MemOperand class.

What is this going to be used for?

Wed, Jun 15, 8:32 AM · Restricted Project, Restricted Project
skan added inline comments to D127787: [TableGen][X86] Add Size field to X86MemOperand class.
Wed, Jun 15, 8:31 AM · Restricted Project, Restricted Project

Tue, Jun 14

skan added inline comments to D127787: [TableGen][X86] Add Size field to X86MemOperand class.
Tue, Jun 14, 7:58 PM · Restricted Project, Restricted Project
skan added a reviewer for D127787: [TableGen][X86] Add Size field to X86MemOperand class: pengfei.
Tue, Jun 14, 7:56 PM · Restricted Project, Restricted Project
skan accepted D127719: [X86][NFC] Use mnemonic tables in validateInstruction 4/4.

LGTM

Tue, Jun 14, 7:51 PM · Restricted Project, Restricted Project

Sun, Jun 12

skan accepted D126726: [X86][Disassembler] Fix displacement operand size for symbolizer.

LGTM

Sun, Jun 12, 8:53 PM · Restricted Project, Restricted Project

Wed, Jun 8

skan added inline comments to D126726: [X86][Disassembler] Fix displacement operand size for symbolizer.
Wed, Jun 8, 3:33 AM · Restricted Project, Restricted Project

Sun, Jun 5

skan added inline comments to D126116: [X86][BOLT] Use getOperandType to determine memory access size.
Sun, Jun 5, 11:08 PM · Restricted Project, Restricted Project

May 24 2022

skan added inline comments to D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI.
May 24 2022, 3:47 AM · Restricted Project, Restricted Project, Restricted Project

May 23 2022

skan accepted D126101: [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand().

LGTM for X86 part.

May 23 2022, 8:31 PM · Restricted Project, Restricted Project
skan added inline comments to D126101: [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand().
May 23 2022, 6:36 PM · Restricted Project, Restricted Project

May 14 2022

skan added inline comments to D124560: [llvm-objdump] Let --symbolize-operands symbolize basic block addresses based on the SHT_LLVM_BB_ADDR_MAP section..
May 14 2022, 12:53 AM · Restricted Project, Restricted Project
skan added inline comments to D124560: [llvm-objdump] Let --symbolize-operands symbolize basic block addresses based on the SHT_LLVM_BB_ADDR_MAP section..
May 14 2022, 12:27 AM · Restricted Project, Restricted Project

May 9 2022

skan accepted D124118: [Peephole-Opt][X86] Enhance peephole opt to see through SUBREG_TO_REG (following AND) and eliminates redundant TEST instruction..

LGTM!

May 9 2022, 8:49 PM · Restricted Project, Restricted Project
skan added inline comments to D124118: [Peephole-Opt][X86] Enhance peephole opt to see through SUBREG_TO_REG (following AND) and eliminates redundant TEST instruction..
May 9 2022, 7:48 PM · Restricted Project, Restricted Project
skan added inline comments to D124118: [Peephole-Opt][X86] Enhance peephole opt to see through SUBREG_TO_REG (following AND) and eliminates redundant TEST instruction..
May 9 2022, 4:52 AM · Restricted Project, Restricted Project

May 7 2022

skan added inline comments to D124118: [Peephole-Opt][X86] Enhance peephole opt to see through SUBREG_TO_REG (following AND) and eliminates redundant TEST instruction..
May 7 2022, 7:59 AM · Restricted Project, Restricted Project
skan added inline comments to D124118: [Peephole-Opt][X86] Enhance peephole opt to see through SUBREG_TO_REG (following AND) and eliminates redundant TEST instruction..
May 7 2022, 7:51 AM · Restricted Project, Restricted Project
skan added a comment to D124118: [Peephole-Opt][X86] Enhance peephole opt to see through SUBREG_TO_REG (following AND) and eliminates redundant TEST instruction..

As to the desciption, maybe it should not be called a heuristic optimization?

May 7 2022, 7:50 AM · Restricted Project, Restricted Project

Apr 27 2022

skan committed rG6a6b0e4a6310: [X86] Check the address in machine verifier (authored by skan).
[X86] Check the address in machine verifier
Apr 27 2022, 7:06 PM · Restricted Project, Restricted Project
skan closed D124455: [X86] Check the address in machine verifier.
Apr 27 2022, 7:05 PM · Restricted Project, Restricted Project

Apr 26 2022

skan added a comment to D124455: [X86] Check the address in machine verifier.

Do we have test coverage that the expensive checks bot runs that would have caught the gather+opaque ptr issue that motivated this patch?

I'm not opposed to this patch, just wondering if it is enough to help us find issues.

I think so. https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/TargetPassConfig.cpp#L809
Machine verify is enabled when the macro EXPENSIVE_CHECKS is on, so we can expose the "gather+opaque ptr" issue at ISEL stage w/ this patch.

Apr 26 2022, 7:44 PM · Restricted Project, Restricted Project
skan added a comment to D124455: [X86] Check the address in machine verifier.

Do we have test coverage that the expensive checks bot runs that would have caught the gather+opaque ptr issue that motivated this patch?

I'm not opposed to this patch, just wondering if it is enough to help us find issues.

Apr 26 2022, 7:30 PM · Restricted Project, Restricted Project
skan added inline comments to D124455: [X86] Check the address in machine verifier.
Apr 26 2022, 6:52 PM · Restricted Project, Restricted Project
skan added inline comments to D124455: [X86] Check the address in machine verifier.
Apr 26 2022, 6:49 PM · Restricted Project, Restricted Project
skan added inline comments to D124455: [X86] Check the address in machine verifier.
Apr 26 2022, 9:28 AM · Restricted Project, Restricted Project
skan updated the diff for D124455: [X86] Check the address in machine verifier.

Check the scale only when index register is not none

Apr 26 2022, 9:26 AM · Restricted Project, Restricted Project
skan updated the diff for D124455: [X86] Check the address in machine verifier.

Updated the test file

  1. Removed dependency on opaque pointer
  2. Checked there are exactly 2 errors
Apr 26 2022, 8:02 AM · Restricted Project, Restricted Project
skan updated the diff for D124455: [X86] Check the address in machine verifier.

Remove redundant IR/MIR in the test

Apr 26 2022, 7:55 AM · Restricted Project, Restricted Project
skan added reviewers for D124455: [X86] Check the address in machine verifier: pengfei, RKSimon, craig.topper, ABataev, fhahn.
Apr 26 2022, 7:38 AM · Restricted Project, Restricted Project
skan requested review of D124455: [X86] Check the address in machine verifier.
Apr 26 2022, 7:35 AM · Restricted Project, Restricted Project
skan added a comment to D124435: [X86] Always extend the integer parameters in callee.

Should we update the clang/docs/ReleaseNotes.rst for this?

Apr 26 2022, 2:53 AM · Restricted Project, Restricted Project

Apr 12 2022

skan committed rGfcade8e91eae: [X86][test] Add encoding/decoding tests for VEX instruction w/ address-size… (authored by skan).
[X86][test] Add encoding/decoding tests for VEX instruction w/ address-size…
Apr 12 2022, 9:50 PM · Restricted Project, Restricted Project
skan closed D122449: [X86][test] Add encoding/decoding tests for VEX instruction w/ address-size prefix.
Apr 12 2022, 9:50 PM · Restricted Project, Restricted Project
skan added a comment to D122449: [X86][test] Add encoding/decoding tests for VEX instruction w/ address-size prefix.

I've pushed D122540, would you like me to push this as well or would you rather do that yourself?

Apr 12 2022, 9:48 PM · Restricted Project, Restricted Project

Apr 7 2022

skan added inline comments to D122963: [X86] Extend the integer parameter if the function isn't local linked.
Apr 7 2022, 1:56 AM · Restricted Project, Restricted Project

Apr 6 2022

skan added inline comments to D122963: [X86] Extend the integer parameter if the function isn't local linked.
Apr 6 2022, 11:18 PM · Restricted Project, Restricted Project
skan added a reviewer for D122963: [X86] Extend the integer parameter if the function isn't local linked: skan.
Apr 6 2022, 11:13 PM · Restricted Project, Restricted Project
skan committed rG05535f3d0728: [X86][tablgen] Add one entry manually into the memory folding table (authored by skan).
[X86][tablgen] Add one entry manually into the memory folding table
Apr 6 2022, 7:07 AM · Restricted Project, Restricted Project
skan committed rGf4661b5a55ca: [X86] Fold MMX_MOVD64from64rr + store to MMX_MOVQ64mr instead of… (authored by skan).
[X86] Fold MMX_MOVD64from64rr + store to MMX_MOVQ64mr instead of…
Apr 6 2022, 6:34 AM · Restricted Project, Restricted Project
skan committed rGeddd399c9805: [X86][tablgen] Add three entries manually into the memory folding table (authored by skan).
[X86][tablgen] Add three entries manually into the memory folding table
Apr 6 2022, 5:38 AM · Restricted Project, Restricted Project
skan committed rG4d2149700618: [X86] Remove TB_NO_REVERSE for 2 memory folding entries (authored by skan).
[X86] Remove TB_NO_REVERSE for 2 memory folding entries
Apr 6 2022, 2:21 AM · Restricted Project, Restricted Project
skan closed D122217: [X86] Remove TB_NO_REVERSE for 2 memory folding entries.
Apr 6 2022, 2:21 AM · Restricted Project, Restricted Project
skan accepted D122540: [X86] Fix handling of maskmovdqu in x32 differently.

LGTM

Apr 6 2022, 1:52 AM · Restricted Project, Restricted Project
skan added a comment to D122217: [X86] Remove TB_NO_REVERSE for 2 memory folding entries.

Thank you all @craig.topper @RKSimon @pengfei !

Apr 6 2022, 12:43 AM · Restricted Project, Restricted Project

Apr 5 2022

skan added a comment to D122217: [X86] Remove TB_NO_REVERSE for 2 memory folding entries.

Ping

Apr 5 2022, 9:55 PM · Restricted Project, Restricted Project
skan committed rG81b10f8200ae: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table (authored by skan).
[X86][tablgen] Consider the mnemonic when auto-generating memory folding table
Apr 5 2022, 9:53 PM · Restricted Project, Restricted Project
skan closed D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.
Apr 5 2022, 9:53 PM · Restricted Project, Restricted Project

Apr 1 2022

skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Does this patch look good to you? @craig.topper

Apr 1 2022, 2:53 AM · Restricted Project, Restricted Project
skan added a comment to D122540: [X86] Fix handling of maskmovdqu in x32 differently.

Anyway, let's focus on the patch itself and ignore the misunderstandings caused by culture or personality during the communication process. Our purpose is to fix the issue and improve the code quality.

Apr 1 2022, 1:55 AM · Restricted Project, Restricted Project

Mar 31 2022

skan updated the summary of D122217: [X86] Remove TB_NO_REVERSE for 2 memory folding entries.
Mar 31 2022, 11:29 PM · Restricted Project, Restricted Project
skan added inline comments to D122540: [X86] Fix handling of maskmovdqu in x32 differently.
Mar 31 2022, 10:48 PM · Restricted Project, Restricted Project
skan added inline comments to D122540: [X86] Fix handling of maskmovdqu in x32 differently.
Mar 31 2022, 9:12 PM · Restricted Project, Restricted Project
skan added inline comments to D122540: [X86] Fix handling of maskmovdqu in x32 differently.
Mar 31 2022, 7:16 PM · Restricted Project, Restricted Project
skan added inline comments to D122540: [X86] Fix handling of maskmovdqu in x32 differently.
Mar 31 2022, 7:11 PM · Restricted Project, Restricted Project
skan added inline comments to D122540: [X86] Fix handling of maskmovdqu in x32 differently.
Mar 31 2022, 6:40 PM · Restricted Project, Restricted Project

Mar 30 2022

skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Ping

Mar 30 2022, 8:03 PM · Restricted Project, Restricted Project
skan added inline comments to D122540: [X86] Fix handling of maskmovdqu in x32 differently.
Mar 30 2022, 8:02 PM · Restricted Project, Restricted Project
skan added a reviewer for D122540: [X86] Fix handling of maskmovdqu in x32 differently: skan.
Mar 30 2022, 8:00 PM · Restricted Project, Restricted Project
skan abandoned D122448: Revert "[X86] Fix handling of maskmovdqu in X32".

Abandon this b/c the author wants to fix it himself in D122540

Mar 30 2022, 7:44 PM · Restricted Project, Restricted Project
skan abandoned D122537: [X86] Support maskmovdqu,vmaskmovdqu in X32.

Abandon this b/c the author wants to fix it himself in D122540

Mar 30 2022, 7:43 PM · Restricted Project, Restricted Project
skan updated the summary of D122217: [X86] Remove TB_NO_REVERSE for 2 memory folding entries.
Mar 30 2022, 7:38 PM · Restricted Project, Restricted Project
skan updated the diff for D122217: [X86] Remove TB_NO_REVERSE for 2 memory folding entries.

Rebase

Mar 30 2022, 7:37 PM · Restricted Project, Restricted Project
skan updated the diff for D122449: [X86][test] Add encoding/decoding tests for VEX instruction w/ address-size prefix.

move vpsubq to the bottom in disasm test

Mar 30 2022, 7:12 PM · Restricted Project, Restricted Project
skan added a reviewer for D122449: [X86][test] Add encoding/decoding tests for VEX instruction w/ address-size prefix: RKSimon.
Mar 30 2022, 6:52 PM · Restricted Project, Restricted Project

Mar 28 2022

skan added a comment to D122540: [X86] Fix handling of maskmovdqu in x32 differently.

I believe you can come up this patch independently. But I did make some suggestion about potential solutions in D103427 and prove it in D122537. Would you mind adding me as the co-author and reviewer?

Mar 28 2022, 6:53 PM · Restricted Project, Restricted Project

Mar 26 2022

skan added inline comments to D103427: [X86] Fix handling of maskmovdqu in X32.
Mar 26 2022, 9:21 PM · Restricted Project, Restricted Project
skan added inline comments to D103427: [X86] Fix handling of maskmovdqu in X32.
Mar 26 2022, 9:02 PM · Restricted Project, Restricted Project
skan added inline comments to D103427: [X86] Fix handling of maskmovdqu in X32.
Mar 26 2022, 8:57 PM · Restricted Project, Restricted Project
skan added a comment to D103427: [X86] Fix handling of maskmovdqu in X32.

@hvdijk D122448 + D122537 can fix both bugs.

Mar 26 2022, 8:44 PM · Restricted Project, Restricted Project
skan requested review of D122537: [X86] Support maskmovdqu,vmaskmovdqu in X32.
Mar 26 2022, 8:41 PM · Restricted Project, Restricted Project
skan added inline comments to D103427: [X86] Fix handling of maskmovdqu in X32.
Mar 26 2022, 8:19 PM · Restricted Project, Restricted Project
skan committed rG4a4874292258: [X86][tablgen] Extract common functions in X86EVEX2VEXTablesEmitter.cpp and… (authored by skan).
[X86][tablgen] Extract common functions in X86EVEX2VEXTablesEmitter.cpp and…
Mar 26 2022, 5:47 PM · Restricted Project, Restricted Project
skan committed rG460e1bd66e57: [X86][tablgen] Remove PointerLikeRegClass from isRegisterOperand b/c… (authored by skan).
[X86][tablgen] Remove PointerLikeRegClass from isRegisterOperand b/c…
Mar 26 2022, 4:40 PM · Restricted Project, Restricted Project
skan committed rG3e4191798425: [X86][tablgen] Remove useless check in X86FoldTablesEmitter.cpp. NFC (authored by skan).
[X86][tablgen] Remove useless check in X86FoldTablesEmitter.cpp. NFC
Mar 26 2022, 9:10 AM · Restricted Project, Restricted Project
skan committed rGa86cd3be1c43: [X86][tablgen] Rename some fields for RecognizableInstrBase to align with… (authored by skan).
[X86][tablgen] Rename some fields for RecognizableInstrBase to align with…
Mar 26 2022, 8:35 AM · Restricted Project, Restricted Project
skan committed rGdc68ca3eff60: [X86][tablgen] Rename field hasREX_WPrefix to hasREX_W for X86Inst. NFC (authored by skan).
[X86][tablgen] Rename field hasREX_WPrefix to hasREX_W for X86Inst. NFC
Mar 26 2022, 8:21 AM · Restricted Project, Restricted Project
skan committed rG271e8d2495e2: [X86][tablgen] Refine the class RecognizableInstr. NFCI (authored by skan).
[X86][tablgen] Refine the class RecognizableInstr. NFCI
Mar 26 2022, 7:42 AM · Restricted Project, Restricted Project
skan committed rGc8ea7329377f: [X86][tablgen] Set ShouldBeEmitted to false when isAsmParserOnly is true. NFCI (authored by skan).
[X86][tablgen] Set ShouldBeEmitted to false when isAsmParserOnly is true. NFCI
Mar 26 2022, 4:11 AM · Restricted Project, Restricted Project
skan committed rG5f543cb0efc9: [X86][tablgen] Use initializer list for some fields of RecognizableInstr*. NFC (authored by skan).
[X86][tablgen] Use initializer list for some fields of RecognizableInstr*. NFC
Mar 26 2022, 3:07 AM · Restricted Project, Restricted Project
skan committed rG7a94fa58c4fb: [X86][tablgen] Move fields Name, Is64Bit, Is32Bit, Operands from… (authored by skan).
[X86][tablgen] Move fields Name, Is64Bit, Is32Bit, Operands from…
Mar 26 2022, 1:50 AM · Restricted Project, Restricted Project

Mar 25 2022

skan updated the summary of D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.
Mar 25 2022, 11:16 PM · Restricted Project, Restricted Project
skan updated the summary of D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.
Mar 25 2022, 10:58 PM · Restricted Project, Restricted Project
skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Do you intend to replace the other cases that use NotMemoryFoldable in the .td file which was how we used to fix this issue. See the multiple cases already in X86InstrVMX.td

I can see you added them in https://reviews.llvm.org/rG66572df76eb9acf5c6b84c573541065cb29ce2ff
I think most of NotMemoryFoldable can be saved by checking the SchedRW is not WriteNop or WriteSystem. Do you mind I do it in another NFC patch?

As I said I was primarily asking about the ones in X86InstrVMX.td that are the exact same issue as VMXON and SENDUIPI. I just want us to solve the same problems in the same way.

Okay, I will update the patch soon.

Maybe it's not InstrVMX that has the overlap. But I remember something overlapped. It might be TPAUSE and CLWB

Mar 25 2022, 10:53 PM · Restricted Project, Restricted Project
skan updated the diff for D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Remove redundant NotMemoryFoldable

Mar 25 2022, 10:53 PM · Restricted Project, Restricted Project
skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Do you intend to replace the other cases that use NotMemoryFoldable in the .td file which was how we used to fix this issue. See the multiple cases already in X86InstrVMX.td

I can see you added them in https://reviews.llvm.org/rG66572df76eb9acf5c6b84c573541065cb29ce2ff
I think most of NotMemoryFoldable can be saved by checking the SchedRW is not WriteNop or WriteSystem. Do you mind I do it in another NFC patch?

As I said I was primarily asking about the ones in X86InstrVMX.td that are the exact same issue as VMXON and SENDUIPI. I just want us to solve the same problems in the same way.

Mar 25 2022, 10:43 PM · Restricted Project, Restricted Project
skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Do you intend to replace the other cases that use NotMemoryFoldable in the .td file which was how we used to fix this issue. See the multiple cases already in X86InstrVMX.td

I can see you added them in https://reviews.llvm.org/rG66572df76eb9acf5c6b84c573541065cb29ce2ff
I think most of NotMemoryFoldable can be saved by checking the SchedRW is not WriteNop or WriteSystem. Do you mind I do it in another NFC patch?

Mar 25 2022, 10:41 PM · Restricted Project, Restricted Project
skan updated the diff for D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Rebase and fix typo

Mar 25 2022, 10:33 PM · Restricted Project, Restricted Project
skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Do you intend to replace the other cases that use NotMemoryFoldable in the .td file which was how we used to fix this issue. See the multiple cases already in X86InstrVMX.td

Mar 25 2022, 10:31 PM · Restricted Project, Restricted Project
skan committed rGbf11ed293abf: [X86][tablgen] Add class RecognizableInstrBase to simplify X86 code, NFCI (authored by skan).
[X86][tablgen] Add class RecognizableInstrBase to simplify X86 code, NFCI
Mar 25 2022, 10:03 PM · Restricted Project, Restricted Project
skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Should this diff be split into two: one with adding getMnemonic (NFC), and the other with changes to X86FoldTablesEmitter?

Mar 25 2022, 7:08 PM · Restricted Project, Restricted Project
skan updated the diff for D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

Rebase

Mar 25 2022, 7:08 PM · Restricted Project, Restricted Project
skan committed rGe13faa40cf0a: [X86][tablgen] Add interface getMnemonic to namespace X86Disassembler, NFCI (authored by skan).
[X86][tablgen] Add interface getMnemonic to namespace X86Disassembler, NFCI
Mar 25 2022, 6:56 PM · Restricted Project, Restricted Project
skan added a comment to D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.

As craig says, there is already a big test coverage hole on the hand-written memory folding tables. To make something easier, I have the following plan:

Mar 25 2022, 6:23 AM · Restricted Project, Restricted Project
skan requested review of D122477: [X86][tablgen] Consider the mnemonic when auto-generating memory folding table.
Mar 25 2022, 6:09 AM · Restricted Project, Restricted Project

Mar 24 2022

skan added inline comments to D103427: [X86] Fix handling of maskmovdqu in X32.
Mar 24 2022, 9:37 PM · Restricted Project, Restricted Project