User Details
- User Since
- Mar 8 2022, 3:45 AM (81 w, 3 d)
Fri, Sep 1
I'll see if a similar change is desired for GCC too.
Jul 26 2023
FWIW GNU assembler does not agree with this test case: it complains relocation out of range for baz and quux.
Jul 25 2023
A question: does LLD automatically supports pack-relative-relocs once a new port is added? I'm trying to implement it for LoongArch BFD linker but it seems I don't have enough skill.
Jul 24 2023
The change itself LGTM.
Ooops. These corner cases are really annoying.
Jul 20 2023
Do we need to convert Xuerui's label alignment change to use the -mtune framework?
Jul 19 2023
Jun 27 2023
Ah, in the C standard "reading a volatile variable" is indeed a side effect. I must have been thinking about another definition of "side effect".
But it's puzzling. Is reading a CSR really a side effect?
Jun 17 2023
Jun 16 2023
LGTM.
May 24 2023
If you are really determined to do this, then OK. I'm in a very bad
mood and I don't want to spend my mental strength on debating (esp. on a
corner case unlikely to affect "real" code) anymore.
May 23 2023
Note that we are using the "de-facto" ABI throwing away this empty struct since the first release of GCC supporting LoongArch, and also Clang. So is there an imperative reason we must change it?
Blocking this as it's a deliberate decision made in D132285.
May 17 2023
I guess the most easy way is adding -flifetime-dse{,=1,=2} and -fno-lifetime-dse as no-op into Clang (and we can really implement -flifetime-dse{,=1,=2} in the future). But not sure if it's the "correct" thing to do.
May 16 2023
Hmm, I'd tested the change before creating this but it seems those tests are "UNSUPPORTED" on my system :(.
May 15 2023
May 14 2023
OTOH if the Linux kernel is expected to emulate UAL, -march=generic should be allowed to generate unaligned access instructions for Linux targets. Frankly I prefer this personally, But I'm not sure if it will be a good practice in general...
Added a "depends on" line in the commit msg, so not to puzzle people to wonder why this is landed again w/o change.
With rG626849c71e85d546a004cc91866beab610222194 landed, this should be safe to land now.
Closing as https://reviews.llvm.org/rG626849c71e85d546a004cc91866beab610222194 is already landed and we just need to reopen D150505.
Revised changeset at D150524.
Wow. The problem is clang-tidy using the compile_commands.json file in the build directory as a database for options (because the trivially-destructible.cpp.tmp.cpp file is in the build directory). As trivially-destructible.cpp.tmp.cpp is not really in compile_commands.json, it uses the options for tools/llvm-ar/CMakeFiles/llvm-ar.dir/llvm-ar-driver.cpp.o which is compiled by GCC with -fno-lifetime-dse...
May 13 2023
I'm also investigating.
Thanks @nikic for grammar fix.
Update comment and commit message to fix grammar errors according to suggestion from @nikic.
May 12 2023
May 9 2023
Hmm, I think it's a kernel issue and should be fixed by using -mabi=lp64s instead of -msoft-float for this specific file...
May 7 2023
Apr 19 2023
Lulu said a benchmark should be performed for such a change (via gcc-patches) and I agree, so please hold the change until a benchmark is done.
Apr 18 2023
Hmm, it seems to me setMaxBytesForAlignment sets "the maximum amount of padding allowed for aligning the BB", not the max loop size. Or am I missing something?
Mar 30 2023
We observed a crash in Thunderbird built with Rustc using LLVM 16.0.0 (happens with Rustc 1.68.x built with a system LLVM 16, and Rustc nightly 2023-03-25). See https://bugzilla.mozilla.org/show_bug.cgi?id=1824544.
Mar 16 2023
Mar 14 2023
Mar 8 2023
Mar 7 2023
Feb 13 2023
Jan 21 2023
FWIW, BFD linker handles R_LARCH_PCALA_HI20 by creating a PLT for every R_LARCH_PCALA_HI20 against an undefined symbol. This can be really annoying if someone happens to make a simple typo in a symbol name (causing an runtime crash which is difficult to be diagnosed). And I guess using such an approach in LLD will annoy LLD maintainers.
By the way, using PCALA_LO12 like this means lld will need to peek at the instruction and see if it's a jirl to handle the PCALA_LO12 relocation properly. I guess we'll need to investigate this issue a little. I hope it won't cause too much trouble.
LGTM though I really dislike depending on some undocumented behavior of PCALA_LO12.
Nov 25 2022
Nov 22 2022
And maybe this need to be sequenced after D138481?
Mostly LGTM, I was considering this optimization just before seeing this diff.
Nov 21 2022
LGTM, thanks for fixing my stupid error!
Nov 14 2022
Nov 11 2022
If I read the code correctly, calling __builtin_frame_address with a depth > 0 is only used in tests. Can we disable those tests if __builtin_frame_address cannot handle depth > 0?
Nov 7 2022
GCC documentation claims:
Is it possible to implement __builtin_frame_address for LoongArch then?
Nov 4 2022
-// Kernel ABI... -// syscall number is passed in a7 -// (http://man7.org/linux/man-pages/man2/syscall.2.html) results are return in -// a0 and a1 (http://man7.org/linux/man-pages/man2/syscall.2.html) arguments -// are passed in: a0-a7 (confirmed by inspecting glibc sources). +// Kernel ABI: +// https://lore.kernel.org/loongarch/1f353678-3398-e30b-1c87-6edb278f74db@xen0n.name/T/#m1613bc86c2d7bf5f6da92bd62984302bfd699a2f +// syscall number is placed in a7 +// parameters, if present, are placed in a0-a6 +// upon return: +// the return value is placed in a0 +// t0-t8 should be considered clobbered +// all other registers are preserved
Thanks for fixing another instance of stupid programming errors made by me!
No, a1-a7 are saved by syscall.
Nov 3 2022
Hmm, BFD linker does not support R_LARCH_GOT_PC_{HI12,LO20} with a non-zero addend:
Straightforward enough to me.
Nov 2 2022
Nov 1 2022
Enable ASAN vfork test for loongarch64.
Thanks but how to apply a patch to https://gcc.gnu.org/git/?p=gcc.git 's libasan is a step I missed...
Hmm, should I modify the diff to make git clang-format happy?
@tangyouling I guess this will fix some test failures you've noticed.