[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-12-07 Thread Lu Weining via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb89b42b31c45: [tsan] Add tsan support for loongarch64 (authored by tangyouling, committed by SixWeining). Repository: rG LLVM Github Monorepo CHA

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-12-05 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 480044. tangyouling added a comment. Use C-style one-line comments //. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489 Files: clang/lib/Driver/ToolChains/Linux.

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-12-05 Thread Dmitry Vyukov via Phabricator via cfe-commits
dvyukov accepted this revision. dvyukov added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1526 + + /* if ($a0 != 0) + * return $a0; Please use C-style one-line comments // Repository: rG LLVM Github Monorepo

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-12-04 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 479980. tangyouling added a comment. Add glibc version comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489 Files: clang/lib/Driver/ToolChains/Linux.cpp

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-12-04 Thread Lu Weining via Phabricator via cfe-commits
SixWeining accepted this revision. SixWeining added a comment. This revision is now accepted and ready to land. LGTM from the LoongArch side but it's better to wait for others. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:270 +#elif SANITIZER_LOONGAR

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-27 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 478124. tangyouling added a comment. Add the missing $t0-$t8 in internal_clone(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489 Files: clang/lib/Driver/ToolCh

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1543 +"r"(__fn), "r"(__arg), "r"(nr_clone), "i"(__NR_exit) + : "memory"); + return res; xry111 wrote: > xry111 wrote: > > SixWeining wrote: > > > tang

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-25 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1543 +"r"(__fn), "r"(__arg), "r"(nr_clone), "i"(__NR_exit) + : "memory"); + return res; xry111 wrote: > SixWeining wrote: > > tangyouling wrote: > > > Six

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-25 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1543 +"r"(__fn), "r"(__arg), "r"(nr_clone), "i"(__NR_exit) + : "memory"); + return res; SixWeining wrote: > tangyouling wrote: > > SixWeining wrote: > > >

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-25 Thread Youling Tang via Phabricator via cfe-commits
tangyouling updated this revision to Diff 477901. tangyouling added a comment. - Fixed the ThreadDescriptorSize calculation on loongarch64. - Use `__loongarch_lp64` to distinguish loongarch64. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1543 +"r"(__fn), "r"(__arg), "r"(nr_clone), "i"(__NR_exit) + : "memory"); + return res; tangyouling wrote: > SixWeining wrote: > > Shall we list $t0-$

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-23 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:269 val = FIRST_32_SECOND_64(1152, 1776); +#elif SANITIZER_LOONGARCH64 + val = 1936; MaskRay wrote: > We should add new code in this fallback function.

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1513 + + register int res __asm__("$a0"); + register int __flags __asm__("$a0") = flags; SixWeining wrote: > I'm not sure if this is necessary. Maybe `int res;` is

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:269 val = FIRST_32_SECOND_64(1152, 1776); +#elif SANITIZER_LOONGARCH64 + val = 1936; We should add new code in this fallback function. The generic code han

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added inline comments. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.h:80 void internal_sigdelset(__sanitizer_sigset_t *set, int signum); -#if defined(__x86_64__) || defined(__mips__) || defined(__aarch64__) || \ -defined(__powerpc64__) || defined(__s39

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. I haven't check the correctness of `tsan_rtl_loongarch64.S`. Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:1513 + + register int res __asm__("$a0"); + register int __flags __asm__("$a0") = flags; I'm not sure if

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Youling Tang via Phabricator via cfe-commits
tangyouling added a comment. $ make check-tsan -j4 Testing Time: 78.34s Unsupported : 91 Passed : 345 Expectedly Failed: 2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138489/new/ https://reviews.llvm.org/D138489

[PATCH] D138489: [tsan] Add tsan support for loongarch64

2022-11-22 Thread Youling Tang via Phabricator via cfe-commits
tangyouling created this revision. tangyouling added reviewers: vitalybuka, dvyukov, melver, SixWeining, xen0n, xry111, MaskRay, lixing-star, MQ-mengqing, XiaodongLoong. Herald added subscribers: Enna1, StephenFan, s.egerton, simoncook. Herald added a project: All. tangyouling requested review of