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
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
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL(
return true;
}
+void LoongArchPreRAExpandPseudo::annotateTableJump(
+MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) {
+ MachineFunction *MF = MBB.getParent();
+ MachineRegisterInfo &MR
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL(
return true;
}
+void LoongArchPreRAExpandPseudo::annotateTableJump(
+MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) {
+ MachineFunction *MF = MBB.getParent();
+ MachineRegisterInfo &MR
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?
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL(
return true;
}
+void LoongArchPreRAExpandPseudo::annotateTableJump(
+MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) {
+ MachineFunction *MF = MBB.getParent();
+ MachineRegisterInfo &MR
@@ -601,6 +612,44 @@ bool LoongArchPreRAExpandPseudo::expandFunctionCALL(
return true;
}
+void LoongArchPreRAExpandPseudo::annotateTableJump(
+MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI) {
+ MachineFunction *MF = MBB.getParent();
+ MachineRegisterInfo &MR
@@ -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
@@ -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
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
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?
@@ -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
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
@@ -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
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-
@@ -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
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
@@ -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
heiher wrote:
```llvm
define void @switch_4_arms(i32 %in, ptr %out) nounwind {
entry:
switch i32 %in, label %exit [
i32 1, label %bb1
@@ -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
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?
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/
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
23 matches
Mail list logo