Page MenuHomePhabricator

xry111 (Xi Ruoyao)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 8 2022, 3:45 AM (23 w, 2 d)

Recent Activity

Wed, Jul 27

xry111 added a comment to D129715: [LoongArch] Heuristically load FP immediates by movgr2fr from materialized integer.

I think @xry111's suggestion to make this optimization tunable is reasonable, but it may need more work then. Perhaps this patch could be put on the back burner, we can always come to finish this later after the more essential things. Lots of downstream projects are blocked by availability of LLVM so it may be very worthwhile to shift priorities for now.

Wed, Jul 27, 6:15 AM · Restricted Project, Restricted Project

Tue, Jul 26

xry111 added a comment to D129715: [LoongArch] Heuristically load FP immediates by movgr2fr from materialized integer.

I think some assembly comparison could go a long way, but again, SPEC2006 is *horribly outdated* so actually IMO the argument for 3-instruction threshold would be a lot stronger if you could replicate this result on some more recent or comprehensive benchmark suites. (PTS or newer SPEC are all better than SPEC2006 in this regard.)

Thanks, I will test other benchmark sets.

I used cpu2017(fortran excluded) to test the performance in 5 cases,

  1. using constant pool,
  2. materialized integer with 1 instruction,
  3. materialized integer within 2 instructions,
  4. materialized integer within 3 instructions,
  5. materialized integer within 4 instructions.

(Tests were run three times for each condition and the scores were geometrically averaged).
The results showed no change in the scores for the 5 cases. @xen0n, @xry111, do you have any suggestions?

Tue, Jul 26, 7:31 PM · Restricted Project, Restricted Project

Mon, Jul 25

xry111 added inline comments to D130255: [Clang][LoongArch] Add initial LoongArch target and driver support.
Mon, Jul 25, 2:40 AM · Restricted Project, Restricted Project
xry111 added inline comments to D130255: [Clang][LoongArch] Add initial LoongArch target and driver support.
Mon, Jul 25, 2:27 AM · Restricted Project, Restricted Project

Thu, Jul 21

xry111 added a comment to D130238: [LoongArch] Parse LoongArch base ABI in ObjectYAML and llvm-readobj.

Is https://github.com/loongson/LoongArch-Documentation/pull/47 (using 0x1, 0x2, 0x3 for ILP32S/F/D and use EI_CLASS to distinguish LP64 and ILP32) dead?

Thu, Jul 21, 3:18 AM · Restricted Project, Restricted Project

Jul 19 2022

xry111 added inline comments to D129838: [LoongArch] Optimize the atomic store with amswap_db.[w/d].
Jul 19 2022, 4:18 AM · Restricted Project, Restricted Project

Jul 16 2022

xry111 added a comment to D129715: [LoongArch] Heuristically load FP immediates by movgr2fr from materialized integer.

I'm now feeling guilty because I've raise the suggestion w/o any benchmarking done... When I get some spare time I'll try to implement this for GCC and benchmark it.

Jul 16 2022, 9:10 AM · Restricted Project, Restricted Project

Jul 15 2022

xry111 added a comment to D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

I don't have write access to rG, if you think these two changes are OK please commit it.

Jul 15 2022, 3:23 AM · Restricted Project, Restricted Project
xry111 updated the diff for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

Remove unnecessary check for __loongarch__ before __loongarch_lp64.

Jul 15 2022, 3:20 AM · Restricted Project, Restricted Project
xry111 updated the diff for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

Define __interception::real_vfork as a normal bss object, instead of common symbol.

Jul 15 2022, 3:18 AM · Restricted Project, Restricted Project
xry111 updated the diff for D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.

nit: use one space instead of two after ..

Jul 15 2022, 3:16 AM · Restricted Project, Restricted Project

Jul 13 2022

xry111 added a comment to D129715: [LoongArch] Heuristically load FP immediates by movgr2fr from materialized integer.
Jul 13 2022, 9:34 PM · Restricted Project, Restricted Project
xry111 added a comment to D129715: [LoongArch] Heuristically load FP immediates by movgr2fr from materialized integer.

To other reviewers: we tested this optimization with an internal llvm version (llvm13) on 3A5000, and it shows that SPEC CPU2006 FP score increases 1% in average. 470.lbm score increases 8.9%. But we wonder why other architectures have not done so? Is there any potential issue?

Jul 13 2022, 9:11 PM · Restricted Project, Restricted Project
xry111 updated the diff for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

run git-clang-format

Jul 13 2022, 7:43 PM · Restricted Project, Restricted Project
xry111 updated the diff for D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.

run git-clang-format

Jul 13 2022, 7:23 PM · Restricted Project, Restricted Project
xry111 added inline comments to D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.
Jul 13 2022, 7:12 PM · Restricted Project, Restricted Project
xry111 added a reviewer for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch: vitalybuka.

Seems that currently we can only check the changes by GCC because LoongArch hasn’t been supported by clang.

Not sure whether this change could land. What do others think?

Jul 13 2022, 6:25 AM · Restricted Project, Restricted Project

Jul 11 2022

xry111 updated the diff for D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.

Restore compiler check for sizeof(struct stat).

Jul 11 2022, 5:34 PM · Restricted Project, Restricted Project
xry111 added inline comments to D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.
Jul 11 2022, 5:20 PM · Restricted Project, Restricted Project
xry111 updated the diff for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

Use full diff

Jul 11 2022, 4:19 AM · Restricted Project, Restricted Project
xry111 updated the diff for D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.

Use full diff

Jul 11 2022, 4:18 AM · Restricted Project, Restricted Project
xry111 added a comment to D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

Could you share some detail about how to build and test llvm's sanitizer with GCC's testcase? Thanks. Previouly in llvm8 we only test it with clang itself.

Jul 11 2022, 4:11 AM · Restricted Project, Restricted Project

Jul 10 2022

xry111 updated the diff for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

Keep lexicographic order

Jul 10 2022, 9:30 PM · Restricted Project, Restricted Project
xry111 updated the diff for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

Mark __interceptor::real_vfork with ASM_HIDDEN and use la.local for it.

Jul 10 2022, 8:11 PM · Restricted Project, Restricted Project
xry111 added inline comments to D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.
Jul 10 2022, 8:05 PM · Restricted Project, Restricted Project
xry111 added inline comments to D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.
Jul 10 2022, 9:09 AM · Restricted Project, Restricted Project

Jul 9 2022

xry111 added inline comments to D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.
Jul 9 2022, 1:03 AM · Restricted Project, Restricted Project
xry111 updated the diff for D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.

Remove unnecessary brackets.

Jul 9 2022, 12:37 AM · Restricted Project, Restricted Project
xry111 added inline comments to D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.
Jul 9 2022, 12:24 AM · Restricted Project, Restricted Project
xry111 requested review of D129418: [sanitizer][LoongArch] Port address sanitizer to LoongArch.
Jul 9 2022, 12:22 AM · Restricted Project, Restricted Project

Jul 8 2022

xry111 updated the diff for D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.

Use __loongarch_lp64 instead of __loongarch_grlen == 64 (as an ILP32 environment on LA64 CPU can also report __loongarch_grlen == 64).

Jul 8 2022, 8:31 AM · Restricted Project, Restricted Project
xry111 added inline comments to D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.
Jul 8 2022, 7:49 AM · Restricted Project, Restricted Project
xry111 requested review of D129371: [sanitizer][LoongArch] Port sanitizer_common to LoongArch.
Jul 8 2022, 7:09 AM · Restricted Project, Restricted Project

Jul 6 2022

xry111 added inline comments to D128898: [LoongArch] Add codegen support for handling floating point immediates.
Jul 6 2022, 3:06 AM · Restricted Project, Restricted Project

Jul 5 2022

xry111 added inline comments to D128900: [LoongArch] Add codegen support for converting between unsigned integer and floating-point.
Jul 5 2022, 4:57 AM · Restricted Project, Restricted Project
xry111 added inline comments to D128900: [LoongArch] Add codegen support for converting between unsigned integer and floating-point.
Jul 5 2022, 4:48 AM · Restricted Project, Restricted Project
xry111 added a comment to D129112: [sanitizer] Compare against the alignment of the latter range trying to find consecutive TLS blocks in GetStaticTlsBoundary.

@xry111 Thanks for this! Since the implementation of TLS in glibc may differ in various versions (but should be very constant after ~2.19), is there anything here that depends on the glibc version?

Jul 5 2022, 2:33 AM · Restricted Project, Restricted Project
xry111 requested review of D129112: [sanitizer] Compare against the alignment of the latter range trying to find consecutive TLS blocks in GetStaticTlsBoundary.
Jul 5 2022, 2:11 AM · Restricted Project, Restricted Project

Jul 4 2022

xry111 added inline comments to D128901: [LoongArch] Add codegen support for atomic fence, atomic load and atomic store.
Jul 4 2022, 12:29 AM · Restricted Project, Restricted Project

Jul 2 2022

xry111 added inline comments to D128427: [LoongArch] Add codegen support for load/store operations.
Jul 2 2022, 6:42 PM · Restricted Project, Restricted Project
xry111 added inline comments to D128901: [LoongArch] Add codegen support for atomic fence, atomic load and atomic store.
Jul 2 2022, 4:28 AM · Restricted Project, Restricted Project
xry111 added inline comments to D128427: [LoongArch] Add codegen support for load/store operations.
Jul 2 2022, 4:02 AM · Restricted Project, Restricted Project

Jul 1 2022

xry111 added inline comments to D128427: [LoongArch] Add codegen support for load/store operations.
Jul 1 2022, 7:48 PM · Restricted Project, Restricted Project

Jun 28 2022

xry111 added a comment to D128572: [LoongArch] Add codegen support for division operations.

LGTM, thanks!

(I've checked harder and apparently the weird "erratum" is in fact a wart carried over from MIPS. The MIPS ISA manual contain the very same wording regarding non-canonical inputs to 32-bit division/modulus operations. Let's just hope this gets fixed in future models...)

Jun 28 2022, 3:47 AM · Restricted Project, Restricted Project
xry111 accepted D128572: [LoongArch] Add codegen support for division operations.

I'll submit a patch to change GCC behavior later (after fix PR106096, which is blocking bootstrap).

Jun 28 2022, 3:12 AM · Restricted Project, Restricted Project

Jun 25 2022

xry111 added a comment to D128572: [LoongArch] Add codegen support for division operations.

It seems I can't remove an inline comment...

Jun 25 2022, 1:53 AM · Restricted Project, Restricted Project
xry111 added a comment to D128572: [LoongArch] Add codegen support for division operations.
Jun 25 2022, 1:47 AM · Restricted Project, Restricted Project

Jun 24 2022

xry111 added inline comments to D128572: [LoongArch] Add codegen support for division operations.
Jun 24 2022, 10:45 PM · Restricted Project, Restricted Project

Jun 7 2022

xry111 added a comment to D127199: [LoongArch] Add codegen support for the binary operations.

Does anyone have any idea about "why the CI is failing"? It seems happening for this batch of LoongArch patches and also one MIPS patch I've reviewed today. I guess something is wrong in the CI system or LLVM codebase.

Jun 7 2022, 10:43 AM · Restricted Project, Restricted Project

May 10 2022

xry111 added a comment to D124825: [LoongArch] Check msb is not less than lsb for the bstr{ins/pick}.{w/d} instructions.

Good to me, but as I've only contributed an one-line change to LLVM let's to wait for someone else :).

May 10 2022, 2:54 AM · Restricted Project, Restricted Project

May 3 2022

xry111 added a comment to D124825: [LoongArch] Check msb is not less than lsb for the bstr{ins/pick}.{w/d} instructions.

It seems the CI failed with some tests TIMEOUT. Maybe we need to adjust the test timeout for the CI.

May 3 2022, 5:33 AM · Restricted Project, Restricted Project
xry111 added a comment to D124825: [LoongArch] Check msb is not less than lsb for the bstr{ins/pick}.{w/d} instructions.

It seems the CI failed with some tests TIMEOUT. Maybe we need to adjust the test timeout for the CI.

May 3 2022, 3:48 AM · Restricted Project, Restricted Project

Apr 20 2022

xry111 added inline comments to D123988: [LoongArch] Add basic floating-point instructions definition.
Apr 20 2022, 11:48 PM · Restricted Project, Restricted Project
xry111 added inline comments to D123988: [LoongArch] Add basic floating-point instructions definition.
Apr 20 2022, 2:11 AM · Restricted Project, Restricted Project

Mar 9 2022

xry111 added a comment to D121207: [compiler-rt][mips] Fix the condition to include sanitizer_atomic_clang_mips.h.

@dvyukov Thanks for the review. But I don't have a commit access to llvm-project.

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

Mar 8 2022

xry111 updated the diff for D121207: [compiler-rt][mips] Fix the condition to include sanitizer_atomic_clang_mips.h.
Mar 8 2022, 8:31 PM · Restricted Project, Restricted Project
xry111 added a reviewer for D121207: [compiler-rt][mips] Fix the condition to include sanitizer_atomic_clang_mips.h: dvyukov.
Mar 8 2022, 8:19 PM · Restricted Project, Restricted Project
xry111 added a comment to D121207: [compiler-rt][mips] Fix the condition to include sanitizer_atomic_clang_mips.h.

clang-format is doing strange things, if I removed those two spaces for indent it will then tell me to add them back...

Mar 8 2022, 5:50 AM · Restricted Project, Restricted Project
xry111 updated the diff for D121207: [compiler-rt][mips] Fix the condition to include sanitizer_atomic_clang_mips.h.
Mar 8 2022, 5:20 AM · Restricted Project, Restricted Project
xry111 updated the diff for D121207: [compiler-rt][mips] Fix the condition to include sanitizer_atomic_clang_mips.h.

Satisify clang-format.

Mar 8 2022, 4:51 AM · Restricted Project, Restricted Project
xry111 requested review of D121207: [compiler-rt][mips] Fix the condition to include sanitizer_atomic_clang_mips.h.
Mar 8 2022, 3:49 AM · Restricted Project, Restricted Project