[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
https://github.com/wangleiat closed https://github.com/llvm/llvm-project/pull/102411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
https://github.com/heiher approved this pull request. LGTM, Thanks. https://github.com/llvm/llvm-project/pull/102411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
https://github.com/wangleiat updated https://github.com/llvm/llvm-project/pull/102411 >From 7bcf5ebc9444e7cb98746ef0d182cbd4b60196e2 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 8 Aug 2024 09:41:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL( return true; } +void LoongArchPreRAExpandPseudo::annotateTableJump( +MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) { + MachineFunction *MF = MBB.getParent(); + MachineRegisterInfo &MR

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -5340,6 +5340,10 @@ def mno_lasx : Flag<["-"], "mno-lasx">, Group, def msimd_EQ : Joined<["-"], "msimd=">, Group, Flags<[TargetSpecific]>, HelpText<"Select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'.">; +def mannotate_tablejump : Flag

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
@@ -5340,6 +5340,10 @@ def mno_lasx : Flag<["-"], "mno-lasx">, Group, def msimd_EQ : Joined<["-"], "msimd=">, Group, Flags<[TargetSpecific]>, HelpText<"Select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'.">; +def mannotate_tablejump : Flag

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
https://github.com/wangleiat edited https://github.com/llvm/llvm-project/pull/102411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
https://github.com/wangleiat updated https://github.com/llvm/llvm-project/pull/102411 >From 7bcf5ebc9444e7cb98746ef0d182cbd4b60196e2 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 8 Aug 2024 09:41:25 +0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-13 Thread via cfe-commits
@@ -167,6 +169,39 @@ bool LoongArchPreRAExpandPseudo::expandMI( case LoongArch::PseudoTAIL_MEDIUM: case LoongArch::PseudoTAIL_LARGE: return expandFunctionCALL(MBB, MBBI, NextMBBI, /*IsTailCall=*/true); + case LoongArch::PseudoBRIND: { +// If the PseudoBRIND is used

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-13 Thread via cfe-commits
wangleiat wrote: > > Is this expected? Thank you very much. I didn't take into account the situation where a basic block belongs to multiple `MachineJumpTableEntry`. It seems that traversing the entire `MF` would provide a more accurate output. https://github.com/llvm/llvm-project/pull/10241

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-12 Thread Lu Weining via cfe-commits
@@ -5340,6 +5340,10 @@ def mno_lasx : Flag<["-"], "mno-lasx">, Group, def msimd_EQ : Joined<["-"], "msimd=">, Group, Flags<[TargetSpecific]>, HelpText<"Select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'.">; +def mannotate_tablejump : Flag

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-12 Thread Lu Weining via cfe-commits
https://github.com/SixWeining commented: Better to add gcc's links to commit message to let people know the background. https://github.com/llvm/llvm-project/pull/102411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-12 Thread Lu Weining via cfe-commits
@@ -1888,6 +1888,14 @@ void Clang::AddLoongArchTargetArgs(const ArgList &Args, CmdArgs.push_back("-tune-cpu"); CmdArgs.push_back(Args.MakeArgString(TuneCPU)); } + + if (Arg *A = Args.getLastArg(options::OPT_mannotate_tablejump, + options

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-12 Thread Lu Weining via cfe-commits
https://github.com/SixWeining edited https://github.com/llvm/llvm-project/pull/102411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-12 Thread Lu Weining via cfe-commits
@@ -5340,6 +5340,10 @@ def mno_lasx : Flag<["-"], "mno-lasx">, Group, def msimd_EQ : Joined<["-"], "msimd=">, Group, Flags<[TargetSpecific]>, HelpText<"Select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'.">; +def mannotate_tablejump : Flag

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-11 Thread via cfe-commits
heiher wrote: ```llvm define void @switch_4_arms(i32 %in, ptr %out) nounwind { entry: switch i32 %in, label %exit [ i32 1, label %bb1

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-11 Thread via cfe-commits
@@ -167,6 +169,39 @@ bool LoongArchPreRAExpandPseudo::expandMI( case LoongArch::PseudoTAIL_MEDIUM: case LoongArch::PseudoTAIL_LARGE: return expandFunctionCALL(MBB, MBBI, NextMBBI, /*IsTailCall=*/true); + case LoongArch::PseudoBRIND: { +// If the PseudoBRIND is used

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-08-20 Thread via cfe-commits
https://github.com/wangleiat updated https://github.com/llvm/llvm-project/pull/102411 >From 7bcf5ebc9444e7cb98746ef0d182cbd4b60196e2 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 8 Aug 2024 09:41:25 +0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: wanglei (wangleiat) Changes draft pr. --- Full diff: https://github.com/llvm/llvm-project/pull/102411.diff 6 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+4) - (modified) clang/lib/Driver/ToolChains/

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-08-07 Thread via cfe-commits
https://github.com/wangleiat created https://github.com/llvm/llvm-project/pull/102411 draft pr. >From 7bcf5ebc9444e7cb98746ef0d182cbd4b60196e2 Mon Sep 17 00:00:00 2001 From: wanglei Date: Thu, 8 Aug 2024 09:41:25 +0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia