Page MenuHomePhabricator

HsiangKai (Hsiangkai Wang)
Kai

Projects

User does not belong to any projects.

User Details

User Since
May 4 2016, 7:01 PM (204 w, 5 d)

Recent Activity

Thu, Apr 2

HsiangKai updated the diff for D69987: [RISCV] Assemble/Disassemble v-ext instructions..
  • Fix clang-format errors.
  • Rename variables according to LLVM Coding Standards.
Thu, Apr 2, 6:27 PM · Restricted Project
HsiangKai updated the diff for D69987: [RISCV] Assemble/Disassemble v-ext instructions..
  • Rebase on master branch.
  • Fix validInstruction() bugs.
  • Update test cases.
Thu, Apr 2, 6:28 AM · Restricted Project

Wed, Apr 1

HsiangKai committed rG501522b5b2a1: [RISCV] Support RISC-V ELF attributes sections in llvm-readobj. (authored by HsiangKai).
[RISCV] Support RISC-V ELF attributes sections in llvm-readobj.
Wed, Apr 1, 7:08 AM
HsiangKai closed D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Wed, Apr 1, 7:08 AM · Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Wed, Apr 1, 5:30 AM · Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Wed, Apr 1, 2:16 AM · Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.

Use reportError() to handle error messages.

Wed, Apr 1, 12:30 AM · Restricted Project

Tue, Mar 31

HsiangKai committed rG581ba35291a6: [RISCV] ELF attribute section for RISC-V. (authored by HsiangKai).
[RISCV] ELF attribute section for RISC-V.
Tue, Mar 31, 1:37 AM
HsiangKai closed D74023: [RISCV] ELF attribute section for RISC-V.
Tue, Mar 31, 1:37 AM · Restricted Project, Restricted Project

Mon, Mar 30

HsiangKai added inline comments to D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Mon, Mar 30, 8:46 PM · Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Mon, Mar 30, 7:00 AM · Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Mon, Mar 30, 4:50 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Mon, Mar 30, 4:50 AM · Restricted Project, Restricted Project
HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

The code generally looks good. For unittests, I think we can either make llvm-readobj -A canonical or the unittests canonical. If we decide to place tests on one place, we should delete most tests on the other side.

My current preference is that we use more of unittests and leave the minimum to test/llvm-readobj/ELF/{ARM,RISCV}/

Mon, Mar 30, 12:30 AM · Restricted Project, Restricted Project

Sat, Mar 28

HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

@MaskRay, do you have any other comments about this patch?

Sat, Mar 28, 6:48 PM · Restricted Project, Restricted Project

Thu, Mar 26

HsiangKai committed rG1a6b7318dddd: [NFC] Clang format for the ELF header and ARM build attributes. (authored by HsiangKai).
[NFC] Clang format for the ELF header and ARM build attributes.
Thu, Mar 26, 7:03 PM
HsiangKai closed D76819: [NFC] Apply clang-format to the ELF header and ARM build attributes files..
Thu, Mar 26, 7:02 PM · Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Thu, Mar 26, 4:50 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Thu, Mar 26, 4:50 AM · Restricted Project
HsiangKai added inline comments to D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Thu, Mar 26, 3:12 AM · Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Thu, Mar 26, 2:07 AM · Restricted Project, Restricted Project

Wed, Mar 25

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Rebase on D76819.

Wed, Mar 25, 7:30 PM · Restricted Project, Restricted Project
HsiangKai added a parent revision for D74023: [RISCV] ELF attribute section for RISC-V: D76819: [NFC] Apply clang-format to the ELF header and ARM build attributes files..
Wed, Mar 25, 7:30 PM · Restricted Project, Restricted Project
HsiangKai added a child revision for D76819: [NFC] Apply clang-format to the ELF header and ARM build attributes files.: D74023: [RISCV] ELF attribute section for RISC-V.
Wed, Mar 25, 7:30 PM · Restricted Project
HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

I create a patch, D76819, to apply clang-format to the ELF header file and ARM build attributes files.

Wed, Mar 25, 7:30 PM · Restricted Project, Restricted Project
HsiangKai created D76819: [NFC] Apply clang-format to the ELF header and ARM build attributes files..
Wed, Mar 25, 6:59 PM · Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Wed, Mar 25, 5:21 PM · Restricted Project, Restricted Project
HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

Harbormaster result:

Unit tests pass. 64040 tests passed, 0 failed and 650 were skipped.
clang-tidy fail. clang-tidy found 1 errors and 18 warnings. 0 of them are added as review comments why?.
clang-format fail. Please format your changes with clang-format by running `git-clang-format HEAD^` or applying this patch.

These errors are caused by formatting in ELF.h, ARMBuildAttributes.h, and ARMBuildAttrs.cpp. Although they are located in the same files this patch modified, they are not related to this patch. These errors could be ignored.

Wed, Mar 25, 3:11 PM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Wed, Mar 25, 9:09 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Wed, Mar 25, 6:59 AM · Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Fix Harbormaster test failures.

Wed, Mar 25, 6:59 AM · Restricted Project, Restricted Project

Tue, Mar 24

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Rebase on master.

Tue, Mar 24, 11:25 PM · Restricted Project, Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Tue, Mar 24, 6:57 AM · Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Tue, Mar 24, 6:57 AM · Restricted Project, Restricted Project
HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

@HsiangKai, have you noticed that there are some test failures according to the harbourmaster bot? They look like they could be related to this somehow.

@jhenderson, yes, I found test failures in harbormaster. The failures are occurred after I rebased my patch on master branch. After digging into error messages, I found the failures are triggered by find_if(). Maybe I misuse find_if() in this patch? Do you have any idea about this?
By the way, I also found some patch, D75015, landed even harbormaster is failed. I am curious about is it a necessary condition to pass harbormaster before landing?

I don't have much understanding of how Harbormaster works, and it may be that the failures are unrelated to anything you did, since I believe it just applies your patch on top of the current HEAD of master, which might not work for various reasons. Still, it's worth reviewing and locally checking the same tests to make sure they aren't failing locally. If you review the logs produced, you might spot an issue. If Harbormaster is failing for a reason related to your patch, your patch will almost certainly cause build bot failures, so in that case, it is necessary to fix the issues (but in other cases, if the issues are unrelated, it isn't).

As for why find_if isn't working, I don't know, and I'd suggest you debug it.

Thanks for your reply. I will try to figure out why Harbormaster is failed.

Tue, Mar 24, 2:07 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Tue, Mar 24, 2:07 AM · Restricted Project, Restricted Project

Mon, Mar 23

HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

@HsiangKai, have you noticed that there are some test failures according to the harbourmaster bot? They look like they could be related to this somehow.

Mon, Mar 23, 9:48 AM · Restricted Project, Restricted Project

Thu, Mar 19

HsiangKai added a parent revision for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj: D74023: [RISCV] ELF attribute section for RISC-V.
Thu, Mar 19, 7:31 AM · Restricted Project
HsiangKai added a child revision for D74023: [RISCV] ELF attribute section for RISC-V: D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Thu, Mar 19, 7:31 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Replace std::find_if with llvm::find_if.

Thu, Mar 19, 7:31 AM · Restricted Project, Restricted Project

Wed, Mar 18

HsiangKai added inline comments to D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Wed, Mar 18, 11:57 PM · Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Wed, Mar 18, 11:57 PM · Restricted Project
HsiangKai added inline comments to D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Wed, Mar 18, 11:57 PM · Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
  • Print out error messages if parsing attribute section error.
  • Add more tests for invalid values in attribute section.
  • Refine comments.
Wed, Mar 18, 11:57 PM · Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Wed, Mar 18, 11:57 PM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Address @jhenderson's comments.

Wed, Mar 18, 7:32 PM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Wed, Mar 18, 7:32 PM · Restricted Project, Restricted Project

Thu, Mar 12

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Fix unit test errors.

Thu, Mar 12, 2:19 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Thu, Mar 12, 1:36 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Thu, Mar 12, 1:36 AM · Restricted Project
HsiangKai added inline comments to D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Thu, Mar 12, 12:52 AM · Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
  • Specify underlying type for AttrType.
  • Update unit tests.
Thu, Mar 12, 12:52 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Thu, Mar 12, 12:09 AM · Restricted Project, Restricted Project

Wed, Mar 11

HsiangKai updated the diff for D69987: [RISCV] Assemble/Disassemble v-ext instructions..
  • Rewrite validateInstruction() in RISCVAsmParser.cpp. Use TSFlags to classify instructions' constraints.
  • Update invalid.s test cases.
Wed, Mar 11, 10:33 PM · Restricted Project

Tue, Mar 10

HsiangKai updated the diff for D69987: [RISCV] Assemble/Disassemble v-ext instructions..

In RISCVRegisterInfo.td, set offset of vector sub-registers to -1.

Tue, Mar 10, 9:12 AM · Restricted Project
HsiangKai added inline comments to D69987: [RISCV] Assemble/Disassemble v-ext instructions..
Tue, Mar 10, 9:12 AM · Restricted Project

Mon, Mar 9

HsiangKai added inline comments to D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Mon, Mar 9, 6:57 AM · Restricted Project

Sun, Mar 8

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Move llvm-readobj changes and tests to D75833.

Sun, Mar 8, 8:14 PM · Restricted Project, Restricted Project
HsiangKai added a comment to D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.

This patch is depended on D74023.

Sun, Mar 8, 8:14 PM · Restricted Project
HsiangKai created D75833: [RISCV] Support RISC-V ELF attribute section in llvm-readobj.
Sun, Mar 8, 8:14 PM · Restricted Project
HsiangKai accepted D75515: [RISCV] Add new SchedRead and SchedWrite.

LGTM.

Sun, Mar 8, 8:14 PM · Restricted Project

Mar 6 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Mar 6 2020, 6:04 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Mar 6 2020, 6:04 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Rebase on D75015. @MaskRay, could you help me to review this update? Thanks.

Mar 6 2020, 1:40 AM · Restricted Project, Restricted Project

Mar 5 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Mar 5 2020, 9:50 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Mar 5 2020, 9:50 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Mar 5 2020, 6:35 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Mar 5 2020, 6:01 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D75515: [RISCV] Add new SchedRead and SchedWrite.
Mar 5 2020, 12:03 AM · Restricted Project

Mar 2 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Update test cases.

Mar 2 2020, 11:09 PM · Restricted Project, Restricted Project

Feb 29 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Use clang-format to tidy up.

Feb 29 2020, 7:42 PM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Remove lld test cases and rebase on master branch.

Feb 29 2020, 7:33 PM · Restricted Project, Restricted Project
HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

I think I have addressed all the comments.
Is there anything I am not aware or any comments I missed out?

Feb 29 2020, 7:53 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 29 2020, 7:35 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Feb 29 2020, 7:35 AM · Restricted Project, Restricted Project

Feb 28 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Feb 28 2020, 6:39 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Use ELFObjectFileBase::getARMFeatures() as reference, return empty feature set when encountering errors and ignore unknown features.d

Feb 28 2020, 6:39 AM · Restricted Project, Restricted Project

Feb 27 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Feb 27 2020, 6:44 PM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 27 2020, 6:35 PM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 27 2020, 9:40 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

More formatting for test cases.

Feb 27 2020, 9:34 AM · Restricted Project, Restricted Project
HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

Hi @MaskRay, I know you have a patch to refactor ARMAttributeParser in D75015.
If you have no other comments in this patch, do you mind let this patch upstream first and refactor ARMAttributeParser based on it?

Feb 27 2020, 9:26 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 27 2020, 9:22 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Formatting.

Feb 27 2020, 9:21 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 27 2020, 8:48 AM · Restricted Project, Restricted Project

Feb 25 2020

HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 25 2020, 12:51 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Feb 25 2020, 12:41 AM · Restricted Project, Restricted Project

Feb 24 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Address @jhenderson's comments.

Feb 24 2020, 11:56 PM · Restricted Project, Restricted Project
HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

Could you add following kind of test:

Negative test:

  • Feed integer value to string type attribute
  • Feed string value to integer type attribute

    Architecture attribute testing:
  • Different/conflict arch between option and attribute, e.g. llvm-mc -mattr=+e but .attribute arch, "rv32i2p0"
    • Expectation is attribute get higher propriety.
  • Arch string without version, e.g. .attribute arch, "rv32imafdc"
    • Expectation is assembler will append it into .attribute arch, "rv32i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
  • Major number is given but minor version ignored, e.g. .attribute arch, "rv32i2"
  • Invalid arch string.
    • Random arch string: .attribute arch, "foo"
    • Arch string not in canonical order .attribute arch, "rv32i2p0_a2p0_m2p0_"

I do not restrict input in canonical order. Output arch string will follow canonical order.

  • Default arch attribute, .attribute arch not given, imply by -mattr option, e.g llvm-mc -triple=riscv32 -mattr=+f result .attribute arch, "rv32i2p0_f2p0"
    • Maybe we should add a option to control this behavior? gas/binutils provide -m[no-]arch-attr to control this.

llvm-mc has no such hook to emit directives according to options. I think it is not a must-have feature. I will not support it in this patch.
If you use llc, you will get correct attribute section according to options. As following code gen test.

Code gen test:

  • Test attribute can emitted by compiler, like llvm/test/CodeGen/ARM/build-attributes.ll
Feb 24 2020, 10:43 PM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Add more test cases.

Feb 24 2020, 10:43 PM · Restricted Project, Restricted Project

Feb 23 2020

HsiangKai added a comment to D74023: [RISCV] ELF attribute section for RISC-V.

ARMAttributeParser has lots of boilerplate code and many untested parsing errors. I think we should improve the existing interface so that the newly added RISCVAttributeParser will not add another sets of untested code paths.

ARMAttributeParser can be simplified a lot by leverating DataExtractor. So I created D75015.

If your patch is accepted, I will rebase this patch based on your improvement.

Feb 23 2020, 9:56 PM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 23 2020, 9:38 PM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Feb 23 2020, 9:29 PM · Restricted Project, Restricted Project

Feb 21 2020

HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 21 2020, 2:11 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.

Address @MaskRay's comments.

Feb 21 2020, 2:11 AM · Restricted Project, Restricted Project
HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Feb 21 2020, 2:11 AM · Restricted Project, Restricted Project

Feb 20 2020

HsiangKai updated the diff for D74023: [RISCV] ELF attribute section for RISC-V.
Feb 20 2020, 9:06 AM · Restricted Project, Restricted Project
HsiangKai added inline comments to D74023: [RISCV] ELF attribute section for RISC-V.
Feb 20 2020, 8:57 AM · Restricted Project, Restricted Project

Feb 19 2020

HsiangKai updated the diff for D69987: [RISCV] Assemble/Disassemble v-ext instructions..
Feb 19 2020, 10:25 PM · Restricted Project
HsiangKai updated the diff for D69987: [RISCV] Assemble/Disassemble v-ext instructions..

Update test cases.

Feb 19 2020, 10:09 PM · Restricted Project