Page MenuHomePhabricator

StephenFan (luxufan)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 14 2020, 5:33 AM (97 w, 3 d)

Recent Activity

Yesterday

StephenFan added a comment to D126403: [RISCV] reorganize getFrameIndexReference to reduce code duplication [nfc].

Thanks for refactoring it! I think it's fully NFC.

Thu, May 26, 7:16 AM · Restricted Project, Restricted Project

Tue, May 24

StephenFan added inline comments to D126088: [RISCV] Add clarifying asserts to getFrameIndexReference [NFC].
Tue, May 24, 10:14 PM · Restricted Project, Restricted Project
StephenFan accepted D126278: [RISCV] Replace untested code with assert.
Tue, May 24, 9:04 AM · Restricted Project, Restricted Project

Mon, May 23

StephenFan added inline comments to D126088: [RISCV] Add clarifying asserts to getFrameIndexReference [NFC].
Mon, May 23, 11:24 PM · Restricted Project, Restricted Project
StephenFan added inline comments to D126181: [RISCV] Add ISD::EH_DWARF_CFA.
Mon, May 23, 12:10 AM · Restricted Project, Restricted Project

Sun, May 22

StephenFan added inline comments to D126181: [RISCV] Add ISD::EH_DWARF_CFA.
Sun, May 22, 10:35 PM · Restricted Project, Restricted Project

Sat, May 21

StephenFan accepted D125787: [RISCV] Fix RVV stack frame alignment bugs.

And I also worried that if the size of RVV padding is big enough, the size of the local scalar variable field is out of the range of 12 bits signed number. If it is necessary to add an extra scavenger spill slot for it?

We already reserve a scavenger slot if there are any RVV objects at all in the frame - I believe that this one reg is sufficient to cover this eventuality. I don't think there's anything special about RVV padding compared with just the number of scalar local variables being too large for a 12-bit int in the "regular" case.

Sat, May 21, 6:24 AM · Restricted Project, Restricted Project
StephenFan added inline comments to D126088: [RISCV] Add clarifying asserts to getFrameIndexReference [NFC].
Sat, May 21, 1:29 AM · Restricted Project, Restricted Project

Fri, May 20

StephenFan accepted D125973: [RISCV] Ensure the entire stack is aligned to the RVV stack alignment.

LGTM.

Fri, May 20, 7:56 AM · Restricted Project, Restricted Project
StephenFan added a comment to D125787: [RISCV] Fix RVV stack frame alignment bugs.

And I also worried that if the size of RVV padding is big enough, the size of the local scalar variable field is out of the range of 12 bits signed number. If it is necessary to add an extra scavenger spill slot for it?

Fri, May 20, 7:32 AM · Restricted Project, Restricted Project
StephenFan added inline comments to D125787: [RISCV] Fix RVV stack frame alignment bugs.
Fri, May 20, 7:04 AM · Restricted Project, Restricted Project
StephenFan added a comment to D125787: [RISCV] Fix RVV stack frame alignment bugs.
Fri, May 20, 7:02 AM · Restricted Project, Restricted Project

Mon, May 16

StephenFan committed rG63c81b23bebe: [RISCV] Support getHostCpuName for sifive-u74 (authored by StephenFan).
[RISCV] Support getHostCpuName for sifive-u74
Mon, May 16, 11:37 PM · Restricted Project, Restricted Project
StephenFan closed D123978: [RISCV] Support getHostCpuName for sifive-u74.
Mon, May 16, 11:37 PM · Restricted Project, Restricted Project

Sat, Apr 30

StephenFan committed rGe098281c278c: [RISCV] Don't getDebugLoc for the end node of MBB iterator (authored by StephenFan).
[RISCV] Don't getDebugLoc for the end node of MBB iterator
Sat, Apr 30, 10:17 AM · Restricted Project, Restricted Project
StephenFan closed D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator.
Sat, Apr 30, 10:17 AM · Restricted Project, Restricted Project

Thu, Apr 28

StephenFan updated the diff for D123978: [RISCV] Support getHostCpuName for sifive-u74.
  1. Replace std::string to StringRef
  2. Remove size value for SmallVector
Thu, Apr 28, 7:41 PM · Restricted Project, Restricted Project

Apr 23 2022

StephenFan updated the diff for D123978: [RISCV] Support getHostCpuName for sifive-u74.

Thanks for confirming it! @kito-cheng

Apr 23 2022, 10:35 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator.

Use update_mir_test_checks.py to autogenerate check lines

Apr 23 2022, 8:39 PM · Restricted Project, Restricted Project

Apr 22 2022

StephenFan added a comment to D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator.

The fix looks fine.

Can you please clean up the Clang cruft from the MIR test file? And give it a meaningful name?
Shouldn't we also check the result of the pass?

If it helps, here's an automatically reduced test file, for reference:

|
  %struct.a = type { i32 }
  define i32 @b(%struct.a* %c) {
    %ab2 = getelementptr inbounds %struct.a, %struct.a* %c, i64 0, i32 0
    %1 = load i32, i32* %ab2, !tbaa !1
    br label %e.epilog
  e.epilog:
    %a.0.g = phi i32 [ 1, %e.epilog]
    br label %cleanup
  cleanup:
    %f.0 = phi i32 [ %a.0.g, %e.epilog ]
    ret i32 %f.0}
  !1 = !{}
Apr 22 2022, 3:16 AM · Restricted Project, Restricted Project
StephenFan updated the diff for D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator.
  1. rename test file to pr53662.mir
  2. reduce pr53662.mir test file
Apr 22 2022, 2:05 AM · Restricted Project, Restricted Project

Apr 21 2022

StephenFan added a comment to D124161: [RISCV][AsmParser] Fix parsing of the components of the vtype immediate of vsetvli.

Thanks for fixing it! @rogfer01

Apr 21 2022, 9:14 AM · Restricted Project, Restricted Project

Apr 20 2022

StephenFan abandoned D122490: [RISCV] Generate EF_RISCV_RVC when .option rvc.
Apr 20 2022, 8:16 PM · Restricted Project, Restricted Project
StephenFan added a comment to D122490: [RISCV] Generate EF_RISCV_RVC when .option rvc.

I think this patch can be abandoned now?
Thanks for providing D123515 as an alternative.

Apr 20 2022, 8:16 PM · Restricted Project, Restricted Project
StephenFan added inline comments to D123978: [RISCV] Support getHostCpuName for sifive-u74.
Apr 20 2022, 8:15 PM · Restricted Project, Restricted Project

Apr 19 2022

StephenFan added a reviewer for D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator: jmorse.
Apr 19 2022, 8:48 PM · Restricted Project, Restricted Project
StephenFan added inline comments to D123978: [RISCV] Support getHostCpuName for sifive-u74.
Apr 19 2022, 8:47 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator.

ChangeLog:

  1. Rewrite .ll test as MIR test
  2. Add '-run-pass=prologepilog' argument to test RUN line
  3. Add a CHECK line.
Apr 19 2022, 8:43 PM · Restricted Project, Restricted Project

Apr 18 2022

StephenFan requested review of D123978: [RISCV] Support getHostCpuName for sifive-u74.
Apr 18 2022, 8:46 PM · Restricted Project, Restricted Project
StephenFan added a comment to D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator.

ping

Apr 18 2022, 7:54 PM · Restricted Project, Restricted Project

Apr 17 2022

StephenFan added a comment to D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

Thanks @MaskRay, @asb !

Apr 17 2022, 8:17 PM · Restricted Project, Restricted Project
StephenFan committed rG429cbac03906: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified (authored by StephenFan).
[RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified
Apr 17 2022, 8:17 PM · Restricted Project, Restricted Project
StephenFan closed D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.
Apr 17 2022, 8:17 PM · Restricted Project, Restricted Project

Apr 16 2022

StephenFan added a comment to D123264: [RISCV] Pre-RA expand pseudos pass.
Apr 16 2022, 10:10 AM · Restricted Project, Restricted Project

Apr 15 2022

StephenFan added inline comments to D123264: [RISCV] Pre-RA expand pseudos pass.
Apr 15 2022, 9:56 AM · Restricted Project, Restricted Project

Apr 13 2022

StephenFan requested review of D123679: [RISCV] Don't getDebugLoc for the end node of MBB iterator.
Apr 13 2022, 6:53 AM · Restricted Project, Restricted Project

Apr 11 2022

StephenFan requested review of D123515: [RISCV] Support '.option arch' directive.
Apr 11 2022, 7:53 AM · Restricted Project, Restricted Project

Mar 31 2022

StephenFan added a comment to D122490: [RISCV] Generate EF_RISCV_RVC when .option rvc.

@StephenFan do you or other PLCT folks could help on implement that for LLVM?

I will implement this for LLVM.

Mar 31 2022, 7:41 PM · Restricted Project, Restricted Project
StephenFan added inline comments to D122236: [RISCV] Fix crash for initial section alignment with .option norvc.
Mar 31 2022, 8:33 AM · Restricted Project, Restricted Project
StephenFan added a comment to D122236: [RISCV] Fix crash for initial section alignment with .option norvc.

This patch makes sense to me and I think it is a correct fix.
In LLVM MC, the STI's feature bits is not mutable, it was determined by the command line before parsing the file. And to deal with directives like .option rvc, the Parser maintains an STI and replaces it with a new STI when the subtarget extensions were enabled or disabled. So we need to use MCAlignFragment's STI which is generated using the replaced STI by the parser. Is my understanding correct?

Mar 31 2022, 8:28 AM · Restricted Project, Restricted Project

Mar 29 2022

StephenFan added inline comments to D122556: [RISCV] Add definitions for Xiangshan processors..
Mar 29 2022, 5:53 AM · Restricted Project, Restricted Project, Restricted Project

Mar 28 2022

StephenFan committed rGa5900401b147: [RISCV][test] Make PATH empty when testing --gcc-toolchain is… (authored by StephenFan).
[RISCV][test] Make PATH empty when testing --gcc-toolchain is…
Mar 28 2022, 11:52 PM · Restricted Project, Restricted Project
StephenFan closed D122588: [RISCV][test] Make PATH empty when testing --gcc-toolchain is multilib_riscv_elf_sdk.
Mar 28 2022, 11:52 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

Address @MaskRay 's comments.

  1. explicit default-argument to avoid error-prone
  2. change riscv64 test to test the case when -mno-relax -mrelax specified.
Mar 28 2022, 8:45 PM · Restricted Project, Restricted Project
StephenFan retitled D122588: [RISCV][test] Make PATH empty when testing --gcc-toolchain is multilib_riscv_elf_sdk from [RISCV] Make PATH empty when testing --gcc-toolchain is multilib_riscv_elf_sdk to [RISCV][test] Make PATH empty when testing --gcc-toolchain is multilib_riscv_elf_sdk.
Mar 28 2022, 8:12 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D122588: [RISCV][test] Make PATH empty when testing --gcc-toolchain is multilib_riscv_elf_sdk.

Address @MaskRay 's comments

Mar 28 2022, 8:11 PM · Restricted Project, Restricted Project
StephenFan added a comment to D122490: [RISCV] Generate EF_RISCV_RVC when .option rvc.

What about the attributes? I thought that the attributes were basically a more flexible and extensible version of the Flags. But with this behavior we get RVC in Flags but not in Tag_RISCV_arch. That seems a bit confusing and maybe error-prone, although it does also match the GNU behavior.

Yeah, the attributes were missing in this patch. I will update it.

I'm not even sure in what cases this matters. Flags is documented as being "used by the linker to disallow linking ELF files with incompatible ABIs together" but C and non-C are always compatible with each other, assuming the target does support C.

RISC-V psabi says "When linking objects which specify EF_RISCV_RVC, the linker is permitted to use RVC instructions such as C.JAL in the relaxation process".

To be clear, if no one else has any opinion about this I think I'd still be in favor of merging this, as we would match the GNU tools and I don't see much downside, but this seems like a weird and non-ideal corner case, whichever way we slice it.

I am still confused about when do we need the RVC flag ? For example, if we have both .option rvc and option norvc in an assembly file, should RVC flag be emitted ? Or if we use command line -mattr=+c to assemble file, but option norvc is specified in assembly file, should RVC flag be emitted ?

Mar 28 2022, 7:42 PM · Restricted Project, Restricted Project
StephenFan requested review of D122588: [RISCV][test] Make PATH empty when testing --gcc-toolchain is multilib_riscv_elf_sdk.
Mar 28 2022, 8:41 AM · Restricted Project, Restricted Project

Mar 25 2022

StephenFan added a comment to D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

@jrtc27, @kito-cheng Do you have any other comments ? :)

Mar 25 2022, 11:05 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

Grammatical fix

Mar 25 2022, 11:03 PM · Restricted Project, Restricted Project
StephenFan requested review of D122490: [RISCV] Generate EF_RISCV_RVC when .option rvc.
Mar 25 2022, 9:42 AM · Restricted Project, Restricted Project

Mar 23 2022

StephenFan committed rG5800fb41a6b9: [RISCV] Remove check and update test file in D121183 (authored by StephenFan).
[RISCV] Remove check and update test file in D121183
Mar 23 2022, 9:50 AM · Restricted Project
StephenFan committed rG227496dc09cf: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute (authored by StephenFan).
[RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute
Mar 23 2022, 9:50 AM · Restricted Project
StephenFan closed D122290: [RISCV] Remove check and update test file in D121183.
Mar 23 2022, 9:50 AM · Restricted Project, Restricted Project
StephenFan closed D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.
Mar 23 2022, 9:50 AM · Restricted Project, Restricted Project

Mar 22 2022

StephenFan added inline comments to D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.
Mar 22 2022, 11:18 PM · Restricted Project, Restricted Project
StephenFan requested review of D122290: [RISCV] Remove check and update test file in D121183.
Mar 22 2022, 11:14 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.

rebase and fix warning

Mar 22 2022, 11:08 PM · Restricted Project, Restricted Project
StephenFan added a comment to D122212: [RISCV] Add zbkb feature for zext.h Instruction.

Looks like a test is missing?

Mar 22 2022, 8:42 AM · Restricted Project, Restricted Project

Mar 21 2022

StephenFan requested review of D122208: [RISCV] Optimize (select Cond, X, 0) --> and (sext Cond), X.
Mar 21 2022, 8:51 PM · Restricted Project, Restricted Project

Mar 17 2022

StephenFan added a comment to D121073: [RISCV] Remove RISCVFeatures::validate function.

Ping. :)

Mar 17 2022, 12:02 AM · Restricted Project, Restricted Project
StephenFan added a comment to D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

Ping :)

Mar 17 2022, 12:01 AM · Restricted Project, Restricted Project

Mar 15 2022

StephenFan updated the diff for D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.

Address @khchen 's comments.

Mar 15 2022, 8:38 PM · Restricted Project, Restricted Project
StephenFan added inline comments to D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.
Mar 15 2022, 8:16 PM · Restricted Project, Restricted Project
StephenFan abandoned D121692: [RISCV] Add MachineMemOperand when codegen PseudoLA.
Mar 15 2022, 6:30 AM · Restricted Project, Restricted Project
StephenFan added a reviewer for D121692: [RISCV] Add MachineMemOperand when codegen PseudoLA: jrtc27.
Mar 15 2022, 6:18 AM · Restricted Project, Restricted Project
StephenFan updated the summary of D121692: [RISCV] Add MachineMemOperand when codegen PseudoLA.
Mar 15 2022, 6:10 AM · Restricted Project, Restricted Project
StephenFan requested review of D121692: [RISCV] Add MachineMemOperand when codegen PseudoLA.
Mar 15 2022, 6:09 AM · Restricted Project, Restricted Project

Mar 11 2022

StephenFan added a comment to D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

Ping.

Mar 11 2022, 9:27 PM · Restricted Project, Restricted Project

Mar 10 2022

StephenFan added a comment to D121073: [RISCV] Remove RISCVFeatures::validate function.

ping.

Mar 10 2022, 6:32 PM · Restricted Project, Restricted Project
StephenFan added inline comments to D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.
Mar 10 2022, 6:31 PM · Restricted Project, Restricted Project

Mar 9 2022

StephenFan accepted D117946: [JITLink][RISCV] Refactor range checking and alignment checking.

LGTM

Mar 9 2022, 3:02 AM · Restricted Project, Restricted Project

Mar 8 2022

StephenFan added inline comments to D117946: [JITLink][RISCV] Refactor range checking and alignment checking.
Mar 8 2022, 11:36 PM · Restricted Project, Restricted Project
StephenFan added inline comments to D117946: [JITLink][RISCV] Refactor range checking and alignment checking.
Mar 8 2022, 11:17 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

Address @kito-cheng 's comments

Mar 8 2022, 5:22 AM · Restricted Project, Restricted Project

Mar 7 2022

StephenFan updated the summary of D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.
Mar 7 2022, 10:48 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.

fix

Mar 7 2022, 10:26 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.

remove the content in patch D121073

Mar 7 2022, 10:08 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D121073: [RISCV] Remove RISCVFeatures::validate function.

undo

Mar 7 2022, 9:46 PM · Restricted Project, Restricted Project
StephenFan requested review of D121183: [RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute.
Mar 7 2022, 9:35 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D121073: [RISCV] Remove RISCVFeatures::validate function.

[RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute

Mar 7 2022, 9:31 PM · Restricted Project, Restricted Project

Mar 6 2022

StephenFan retitled D121073: [RISCV] Remove RISCVFeatures::validate function from [RISCV] Remove feature validate function to [RISCV] Remove RISCVFeatures::validate function.
Mar 6 2022, 7:23 AM · Restricted Project, Restricted Project
StephenFan requested review of D121073: [RISCV] Remove RISCVFeatures::validate function.
Mar 6 2022, 6:46 AM · Restricted Project, Restricted Project

Mar 1 2022

StephenFan abandoned D120702: [RISCV] emit .option directive when generate assembly file.
Mar 1 2022, 7:07 AM · Restricted Project
StephenFan updated the diff for D120702: [RISCV] emit .option directive when generate assembly file.

add test file

Mar 1 2022, 1:10 AM · Restricted Project
StephenFan requested review of D120702: [RISCV] emit .option directive when generate assembly file.
Mar 1 2022, 1:03 AM · Restricted Project

Feb 28 2022

StephenFan committed rG3362f54d086b: [JITLink] Add R_RISCV_SUB6 relocation (authored by StephenFan).
[JITLink] Add R_RISCV_SUB6 relocation
Feb 28 2022, 9:47 AM
StephenFan closed D120001: [JITLink] Add R_RISCV_SUB6 relocation.
Feb 28 2022, 9:46 AM · Restricted Project

Feb 27 2022

StephenFan updated the diff for D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

Address @jrtc27 's comments

Feb 27 2022, 8:25 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.

fix typo

Feb 27 2022, 7:07 PM · Restricted Project, Restricted Project
StephenFan requested review of D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified.
Feb 27 2022, 7:02 PM · Restricted Project, Restricted Project
StephenFan updated the diff for D120001: [JITLink] Add R_RISCV_SUB6 relocation.

Address @fourdim 's comments

Feb 27 2022, 8:33 AM · Restricted Project

Feb 24 2022

StephenFan requested review of D120497: [JITLink] Add platform and runtime support for Linux riscv64.
Feb 24 2022, 9:22 AM · Restricted Project, Restricted Project

Feb 22 2022

StephenFan updated the diff for D120001: [JITLink] Add R_RISCV_SUB6 relocation.

mask off the upper 2 bits of the value at the address and truncate the Value

Feb 22 2022, 3:09 AM · Restricted Project

Feb 17 2022

StephenFan added inline comments to D120001: [JITLink] Add R_RISCV_SUB6 relocation.
Feb 17 2022, 7:40 AM · Restricted Project

Feb 16 2022

StephenFan accepted D117975: [JITLink][RISCV] fix the extractBits behavior and add R_RISCV_JAL relocation..
Feb 16 2022, 9:18 PM · Restricted Project
StephenFan requested review of D120001: [JITLink] Add R_RISCV_SUB6 relocation.
Feb 16 2022, 7:44 PM · Restricted Project

Feb 6 2022

StephenFan committed rG9920943ea201: [JITLink] Fix the incorrect relocation behavior for R_RISCV_BRANCH (authored by StephenFan).
[JITLink] Fix the incorrect relocation behavior for R_RISCV_BRANCH
Feb 6 2022, 10:39 PM
StephenFan closed D118151: [JITLink] Fix the incorrect relocation behavior for R_RISCV_BRANCH and extractBits function.
Feb 6 2022, 10:39 PM · Restricted Project
StephenFan updated the diff for D118151: [JITLink] Fix the incorrect relocation behavior for R_RISCV_BRANCH and extractBits function.

clang-format and rebase

Feb 6 2022, 10:32 PM · Restricted Project