[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 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. SixWeining marked an inline comment as done. Closed by commit rGf62c9252fc0f: [LoongArch] Support -march=native and -mtune= (authored by SixWeining). Repository: rG

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Lu Weining via Phabricator via cfe-commits
SixWeining marked an inline comment as done. SixWeining added inline comments. Comment at: clang/lib/Basic/Targets/LoongArch.cpp:203 + StringRef ArchName = getCPU(); + Builder.defineMacro("__loongarch_arch", Twine("\"") + ArchName + Twine("\"")); + MaskRay

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-08 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 548442. SixWeining marked an inline comment as done. SixWeining added a comment. Address @MaskRay's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/ https://reviews.llvm.org/D155824

[PATCH] D156116: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC behaviour

2023-08-07 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe7a8a7d49776: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC… (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D156116: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC behaviour

2023-08-07 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 547711. SixWeining added a comment. add an extra check for when a candidate from detectFAREligibleStructHelper may not be valid Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156116/new/

[PATCH] D156866: [Clang][LoongArch] Use the ClangBuiltin class to automatically generate support for CBE and CFE

2023-08-03 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. The change is loongarch-specific and it looks goold to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156866/new/

[PATCH] D156866: [Clang][LoongArch] Use the ClangBuiltin class to automatically generate support for CBE and CFE

2023-08-03 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. LGTM except a nit. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:20447 - -Value *CodeGenFunction::EmitLoongArchBuiltinExpr(unsigned BuiltinID, - const CallExpr *E) { The declaration in

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-03 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 546766. SixWeining added a comment. rename the common helper to `postProcessTargetCPUString` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/ https://reviews.llvm.org/D155824 Files:

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-03 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:199-204 + // Handle CPU name is 'native'. + if (CPU == "native") { +CPU = llvm::sys::getHostCPUName(); +if (CPU == "generic") + CPU =

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-03 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 546742. SixWeining marked an inline comment as done. SixWeining added a comment. Add a common helper for `-m{arch,tune}=native` handling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-08-03 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 546730. SixWeining edited the summary of this revision. SixWeining added a comment. - work with `-fno-integrated-cc1` - add mingsing `"`s in macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-31 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D155824#4548677 , @steven_wu wrote: > After another look, I will need to request to revert this because this > implementation doesn't work with `-fno-integrated-cc1` at all. You can't > setCPU/Tune in the driver into a

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/docs/ReleaseNotes.rst:138-143 +- Patchable function entry (``-fpatchable-function-entry``) is now supported + on LoongArch. +- Unaligned memory accesses can be toggled by ``-m[no-]unaligned-access`` or the + aliases

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-25 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 rG92c06114b2ea: [LoongArch] Support -march=native and -mtune= (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 543941. SixWeining added a comment. add missing `.` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/ https://reviews.llvm.org/D155824 Files: clang/docs/ReleaseNotes.rst

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 543919. SixWeining added a comment. Address @xen0n's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/ https://reviews.llvm.org/D155824 Files: clang/docs/ReleaseNotes.rst

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 543902. SixWeining added a comment. update clang release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155824/new/ https://reviews.llvm.org/D155824 Files: clang/docs/ReleaseNotes.rst

[PATCH] D156195: [docs] Add llvm & clang release notes for LoongArch

2023-07-25 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 rG6223050db88b: [docs] Add llvm clang release notes for LoongArch (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D156195: [docs] Add llvm & clang release notes for LoongArch

2023-07-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 543876. SixWeining added a comment. Move sanitizer changes to clang side. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156195/new/ https://reviews.llvm.org/D156195 Files: clang/docs/ReleaseNotes.rst

[PATCH] D156195: [docs] Add llvm & clang release notes for LoongArch

2023-07-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 543867. SixWeining added a comment. Herald added a reviewer: alexander-shaposhnikov. Address @xen0n's comments and add some more recordable updates. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156195/new/

[PATCH] D142327: [clang][RISCV] Fix ABI handling of empty structs with hard FP calling conventions in C++

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/lib/CodeGen/Targets/RISCV.cpp:178 return false; -if (isEmptyRecord(getContext(), Ty, true)) +if (isEmptyRecord(getContext(), Ty, true, true)) return true; asb wrote: > rogfer01 wrote: > >

[PATCH] D156195: [docs] Add llvm & clang release notes for LoongArch

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, xry111, hev, wangleiat. Herald added a project: All. SixWeining requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. @xen0n Do you have any inputs? I think supporting these options can improve compatibility with gcc (although there is no ScheduleModel difference among currently supported processors) and I hope it can be merged into LLVM17. Repository: rG LLVM Github Monorepo

[PATCH] D156089: [Driver][XRay][test] Convert more tests to check 'target=...' after 016785d9316d8c5abc5fdf3cdb86479095bbb677

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining abandoned this revision. SixWeining added a comment. 841ff7c6ca4c6fa9ff3ac6ba93e177462b7d668e addresses this issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D156116: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC behaviour

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D156116#4530365 , @thakis wrote: > This seems to not build: http://45.33.8.238/linux/113405/step_4.txt (?) Thanks, I have reverted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D154931: [LoongArch] Support InlineAsm for LSX and LASX

2023-07-24 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 rGd25c79dc7000: [LoongArch] Support InlineAsm for LSX and LASX (authored by chenli, committed by SixWeining). Repository: rG LLVM Github Monorepo

[PATCH] D156116: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC behaviour

2023-07-24 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 rGc299efbf284f: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC… (authored by SixWeining). Repository: rG LLVM Github

[PATCH] D156114: [Clang][LoongArch] Pre-commit test for D156116

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG669d2bbc837e: [Clang][LoongArch] Pre-commit test for D156116

[PATCH] D156116: [Clang][LoongArch] Fix ABI handling of empty structs in C++ to match GCC behaviour

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xry111, xen0n, hev, wangleiat. Herald added subscribers: luismarques, s.egerton, PkmX, simoncook, arichardson. Herald added a project: All. SixWeining requested review of this revision. Herald added subscribers: cfe-commits, wangpc.

[PATCH] D156114: [Clang][LoongArch] Pre-commit test for Dxxxxxx

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xry111, xen0n, hev, wangleiat. Herald added a project: All. SixWeining requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D156089: [Driver][XRay][test] Convert more tests to check 'target=...' after 016785d9316d8c5abc5fdf3cdb86479095bbb677

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/test/Driver/XRay/xray-ignore-loops-flags.cpp:5 // // RUN: %clang -fxray-instrument -fxray-ignore-loops -target x86_64-linux- -### \ // RUN: -x c++ -emit-llvm -c -o - %s 2>&1 | FileCheck %s `x86_64-linux`

[PATCH] D156089: [Driver][XRay][test] Convert more tests to check 'target=...' after 016785d9316d8c5abc5fdf3cdb86479095bbb677

2023-07-24 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: probinson, MaskRay. Herald added a subscriber: dberris. Herald added a project: All. SixWeining requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. > In GCC I added the numbers for "loongarch64" and "la464" although they are > the same, and GCC does not have "empty". But yes we can do things later here. Ah, I just realize `TuneCPU` is always not empty because: 27 LoongArchSubtarget

[PATCH] D154931: [LoongArch] Support InlineAsm for LSX and LASX

2023-07-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:56 addRegisterClass(MVT::f64, ::FPR64RegClass); + if (Subtarget.hasExtLSX()) { +for (auto VT : {MVT::v4f32, MVT::v2f64, MVT::v16i8, MVT::v8i16, MVT::v4i32,

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D155824#4518597 , @xry111 wrote: > Do we need to convert Xuerui's label alignment change to use the -mtune > framework? How to set the numbers if `TuneCPU` is empty? If there is no differences among `empty`,

[PATCH] D155824: [LoongArch] Support -march=native and -mtune=

2023-07-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, xry111, hev, wangleiat. Herald added a subscriber: hiraditya. Herald added a project: All. SixWeining requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added projects: clang,

[PATCH] D155163: [Triple] Add llvm::Triple::isLoongArch{32,64}

2023-07-17 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 rGa926a2660a7f: [Triple] Add llvm::Triple::isLoongArch{32,64} (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D155163: [Triple] Add llvm::Triple::isLoongArch{32,64}

2023-07-13 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 539915. SixWeining added a comment. Herald added subscribers: cfe-commits, Enna1, hiraditya. Herald added a project: clang. Use the new added `isLoongArch64()` in some places. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-07-07 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. Since `R_LARCH_64_PCREL` has been supported, we can use version 2 xray and the patch summary should be modified accordingly. Comment at: llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp:187 + OutStreamer->emitLabel(EndOfSled); +

[PATCH] D140727: [XRay] Add initial support for loongarch64

2023-06-28 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D140727#4019019 , @SixWeining wrote: > D140725 is abandoned. Let me defer this > change until we support 64bit PC-relative relocation for `SymA - SymB`. Update: R_LARCH_64_PCREL can be

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-26 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf6932007ab4e: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is… (authored by WANG Xuerui g...@xen0n.name, committed by SixWeining). Repository: rG LLVM Github Monorepo

[PATCH] D152671: [doc][LoongArch] Add missed release note about `ual` feature addition

2023-06-25 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 rGd0a32b0273b9: [doc][LoongArch] Add missed release note about `ual` feature addition (authored by SixWeining). Repository: rG LLVM Github Monorepo

[PATCH] D152671: [doc][LoongArch] Add missed release note about `ual` feature addition

2023-06-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 534404. SixWeining added a comment. Address xen0n's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152671/new/ https://reviews.llvm.org/D152671 Files: clang/docs/ReleaseNotes.rst

[PATCH] D152671: [doc][LoongArch] Add missed release note about `ual` feature addition

2023-06-25 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:163 * The ``lp64s`` ABI is supported now and has been tested on Rust bare-matal target. +* An target feature ``ual`` is introduced to allow unaligned memory accesses and + this feature is enabled by

[PATCH] D153707: [Clang][LoongArch] Consume and check -mabi and -mfpu even if -m*-float is present

2023-06-25 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. Thanks. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:64 +// conflicts with the higher-priority settings implied by -m*-float. +if

[PATCH] D152671: [doc][LoongArch] Add missed release note about `ual` feature addition

2023-06-12 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, MaskRay, xry111, peter.smith, wangleiat. Herald added a project: All. SixWeining requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. I meant to fold this

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-06-06 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 rG47601815ec3a: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses` (authored by SixWeining). Repository: rG LLVM Github

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-06-06 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 529164. SixWeining added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149946/new/ https://reviews.llvm.org/D149946 Files: clang/include/clang/Driver/Options.td

[PATCH] D150537: [Clang][LoongArch] Pass the -mabi and -target-abi options to as and cc1as respectively

2023-05-16 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGddb27b187069: [Clang][LoongArch] Pass the -mabi and -target-abi options to as and cc1as… (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150537: [Clang][LoongArch] Pass the -mabi and -target-abi options to as and cc1as respectively

2023-05-14 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, xry111, MaskRay, hev, wangleiat. Herald added a project: All. SixWeining requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change is necessary to set correct EFlags

[PATCH] D136436: [Clang][LoongArch] Add GPR alias handling without `$` prefix

2023-05-12 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0bbf3ddf5fea: [Clang][LoongArch] Add GPR alias handling without `$` prefix (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2023-05-11 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 521541. SixWeining added a comment. Only allow non-prefixed names for GPRs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136436/new/ https://reviews.llvm.org/D136436 Files:

[PATCH] D150089: [LoongArch] Support fcc* (condition flag) registers in inlineasm clobbers

2023-05-09 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG161716a7132d: [LoongArch] Support fcc* (condition flag) registers in inlineasm clobbers (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150089: [LoongArch] Support fcc* (condition flag) registers in inlineasm clobbers

2023-05-07 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. Herald added a project: All. SixWeining requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D150089 Files:

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-05-07 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D149946#4324803 , @xen0n wrote: > From a LoongArch developer's perspective, it may be better to only enable UAL > for LA464 and other supporting models, instead of for the generic > `loongarch64` model too. This is

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-05-05 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. Thanks @rengolin and @peter.smith. I just added a new test to show options remain unused on a target that does not support them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149946/new/

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-05-05 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 520014. SixWeining added a comment. Add a test to show related options remain unused on a target that does not support them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149946/new/

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-05-05 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. TODO: update llvm/clang release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149946/new/ https://reviews.llvm.org/D149946 ___ cfe-commits mailing list

[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

2023-05-05 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, xry111, MaskRay, rengolin, benshi001, wangleiat. Herald added subscribers: hiraditya, kristof.beyls. Herald added a project: All. SixWeining requested review of this revision. Herald added projects: clang, LLVM. Herald added

[PATCH] D136436: [Clang][LoongArch] Add register alias handling without `$` prefix

2023-05-03 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D136436#4314612 , @xen0n wrote: > Hi, any update on this? Given the `$`-less style has been long established at > this time, and present in released GCC versions, it seems we indeed have to > follow suit (and later make

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-24 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG61fee67cd77a: [Clang][Driver] Handle LoongArch multiarch tuples (authored by WANG Xuerui g...@xen0n.name, committed by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-19 Thread Lu Weining via Phabricator via cfe-commits
SixWeining accepted this revision. SixWeining added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/linux-header-search.cpp:247 // +// Check header search on Debian loong64 +// RUN: %clang -### %s -fsyntax-only 2>&1 \

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-04-19 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/test/Driver/linux-header-search.cpp:247 // +// Check header search on Debian loong64 +// RUN: %clang -### %s -fsyntax-only 2>&1 \ Better to use “loongarch64” when talking about debian? Refer

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-03-16 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:66 + default: +return IsLA32 ? "ilp32d" : "lp64d"; + } Better to be `f`? (Probably most 32-bit hardwares do not support double-float? But I'm not sure about

[PATCH] D141785: [Clang][LoongArch] Implement patchable function entry

2023-03-15 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb5dfec9d444: [Clang][LoongArch] Implement patchable function entry (authored by WANG Xuerui g...@xen0n.name, committed by SixWeining). Changed prior to commit:

[PATCH] D141785: [Clang][LoongArch] Implement patchable function entry

2023-02-15 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. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141785/new/ https://reviews.llvm.org/D141785

[PATCH] D143806: [Clang][Test] Add llvm-lto, llvm-lto2 and llvm-profdata to the tool substitutions list

2023-02-14 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82c6e90d6a3d: [Clang][Test] Add llvm-lto, llvm-lto2 and llvm-profdata to the tool… (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D143806: [Clang][Test] Add llvm-lto, llvm-lto2 and llvm-profdata to the tool substitutions list

2023-02-10 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: dblaikie, jansvoboda11. Herald added a subscriber: inglorion. Herald added a project: All. SixWeining requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Similar to issue fixed in

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-01-28 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:41 /// so we provide a rough mapping here. std::string Linux::getMultiarchTriple(const Driver , const llvm::Triple , Missing test.

[PATCH] D141750: [docs] Add llvm & clang release notes for LoongArch

2023-01-17 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 rG64582189b3fc: [docs] Add llvm clang release notes for LoongArch (authored by SixWeining). Changed prior to commit:

[PATCH] D141785: [Clang][LoongArch] Implement patchable function entry

2023-01-15 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. Does anyone know why `patchable-function-entry` is not documented in https://llvm.org/docs/LangRef.html#function-attributes? Comment at: llvm/lib/Target/LoongArch/LoongArchMCInstLower.cpp:150 + .getAsInteger(10, Num)) +return

[PATCH] D141750: [docs] Add llvm & clang release notes for LoongArch

2023-01-14 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D141750#4053473 , @MaskRay wrote: > pip3 install --user recommonmark sphinx # sphinx-automodapi for lldb > > cmake ... > > ninja ... docs-llvm-html Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141750: [docs] Add llvm & clang release notes for LoongArch

2023-01-14 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 489204. SixWeining added a comment. Fix the issue "Title underline too short" reported by sphinx-build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141750/new/ https://reviews.llvm.org/D141750 Files:

[PATCH] D141750: [docs] Add llvm & clang release notes for LoongArch

2023-01-13 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D141750#4053469 , @SixWeining wrote: > I'm not sure if there is any format issue. Is there any way to verify? e.g. > how to generate .html like https://llvm.org/docs/ReleaseNotes.html? Now I find it:

[PATCH] D141750: [docs] Add llvm & clang release notes for LoongArch

2023-01-13 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. I'm not sure if there is any format issue. Is there any way to verify? e.g. how to generate .html like https://llvm.org/docs/ReleaseNotes.html? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141750/new/

[PATCH] D141750: [docs] Add llvm & clang release notes for LoongArch

2023-01-13 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: rengolin, MaskRay, tstellar, xen0n, xry111, wangleiat, lrzlin, tangyouling, lh03061238. Herald added subscribers: yaneury, supersymetrie, Chia-hungDuan, cryptoad. Herald added a project: All. SixWeining requested review of this

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2023-01-13 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3a58e11961d8: [lsan] Add lsan support for loongarch64 (authored by tangyouling, committed by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2023-01-12 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. LGTM. Is there any objection? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139686/new/ https://reviews.llvm.org/D139686 ___ cfe-commits mailing list

[PATCH] D141070: [LoongArch] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP macros

2023-01-05 Thread Lu Weining via Phabricator via cfe-commits
SixWeining accepted this revision. SixWeining added a comment. This matches LoongArch gcc's behavior. So LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141070/new/ https://reviews.llvm.org/D141070

[PATCH] D140527: [LoongArch] Add intrinsics for CACOP instruction

2023-01-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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140527/new/ https://reviews.llvm.org/D140527

[PATCH] D140727: [XRay] Add initial support for loongarch64

2022-12-28 Thread Lu Weining via Phabricator via cfe-commits
SixWeining planned changes to this revision. SixWeining added a comment. D140725 is abandoned. Let me defer this change until we support 64bit PC-relative relocation for `SymA - SymB`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D140727: [XRay] Add initial support for loongarch64

2022-12-28 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: MaskRay, xen0n, xry111. Herald added subscribers: Enna1, StephenFan, hiraditya, dberris. Herald added a project: All. SixWeining requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added

[PATCH] D140690: [compiler-rt][dfsan] Enable loongarch64 and add test support

2022-12-27 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added a comment. In D140690#4017693 , @browneee wrote: > Who will use DFSan on loongarch64? > > Who will maintain DFSan on loongarch64? > > Is there a loongarch64 buildbot? Hi @browneee, I'm the co-author of this patch. Thanks for your

[PATCH] D139987: [Clang][LoongArch] Add intrinsic for rdtime_d, rdtimeh_w and rdtimel_w

2022-12-20 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139987/new/ https://reviews.llvm.org/D139987

[PATCH] D139987: [Clang][LoongArch] Add intrinsic for rdtime_d, rdtimeh_w and rdtimel_w

2022-12-20 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/lib/Headers/larchintrin.h:17-20 +typedef struct drdtime { + unsigned long dvalue; + unsigned long dtimeid; +} __drdtime_t; Should be moved into the belowing `#if __loongarch_grlen == 64`. Repository: rG

[PATCH] D139915: [Clang][LoongArch] Add intrinsic for asrtle, asrtgt, lddir, ldpte and cpucfg

2022-12-20 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 except a small nit. Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.h:91 IOCSRWR_D, + + CPUCFG, Better to leave some comment

[PATCH] D139612: [Clang][LoongArch] Add intrinsic for iocsrrd and iocsrwr

2022-12-09 Thread Lu Weining via Phabricator via cfe-commits
SixWeining accepted this revision. SixWeining added a comment. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139612/new/ https://reviews.llvm.org/D139612 ___ cfe-commits mailing list

[PATCH] D139686: [lsan] Add lsan support for loongarch64

2022-12-09 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: compiler-rt/test/lsan/TestCases/swapcontext.cpp:8 // Missing 'getcontext' and 'makecontext' on Android. -// UNSUPPORTED: arm,aarch64,powerpc64,android +// UNSUPPORTED: arm,aarch64,loongarch64,powerpc64,android Why

[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

[PATCH] D139397: [LoongArch] Add testcases for privileged intrinsic macros

2022-12-07 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139397/new/ https://reviews.llvm.org/D139397

[PATCH] D139288: [Clang][LoongArch] Add intrinsic for csrrd, csrwr and csrxchg

2022-12-06 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139288/new/ https://reviews.llvm.org/D139288

[PATCH] D139288: [Clang][LoongArch] Add intrinsic for csrrd, csrwr and csrxchg

2022-12-04 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/lib/Headers/larchintrin.h:67-96 #define __break(/*ui15*/ _1) __builtin_loongarch_break((_1)) #define __dbar(/*ui15*/ _1) __builtin_loongarch_dbar((_1)) #define __ibar(/*ui15*/ _1) __builtin_loongarch_ibar((_1))

[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

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-04 Thread Lu Weining via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG47edc7086692: [LoongArch] Specify registers used for exception handling (authored by SixWeining). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139177/new/

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-02 Thread Lu Weining via Phabricator via cfe-commits
SixWeining updated this revision to Diff 479553. SixWeining added a comment. Add clang test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139177/new/ https://reviews.llvm.org/D139177 Files: clang/lib/Basic/Targets/LoongArch.h

[PATCH] D139177: [LoongArch] Specify registers used for exception handling

2022-12-02 Thread Lu Weining via Phabricator via cfe-commits
SixWeining created this revision. SixWeining added reviewers: xen0n, xry111, MaskRay, wangleiat. Herald added a subscriber: StephenFan. Herald added a project: All. SixWeining requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. See definition

[PATCH] D138418: [LoongArch] Add remaining intrinsics for CRC check instructions

2022-11-27 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:925 llvm_unreachable("Unexpected Intrinsic."); -case Intrinsic::loongarch_crc_w_d_w: { - Results.push_back(DAG.getNode( - ISD::TRUNCATE, DL,

[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: > > >

[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

[PATCH] D138418: [LoongArch] Add remaining intrinsics for CRC check instructions

2022-11-22 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:925 llvm_unreachable("Unexpected Intrinsic."); -case Intrinsic::loongarch_crc_w_d_w: { - Results.push_back(DAG.getNode( - ISD::TRUNCATE, DL,

  1   2   >