[llvm] [MIPS][ISel] Fix musttail (PR #161860)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 01:10:50 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/lib/Target/Mips/Mips16ISelLowering.cpp llvm/lib/Target/Mips/Mips16ISelLowering.h llvm/lib/Target/Mips/MipsISelLowering.cpp llvm/lib/Target/Mips/MipsISelLowering.h llvm/lib/Target/Mips/MipsSEISelLowering.cpp llvm/lib/Target/Mips/MipsSEISelLowering.h
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/Mips/Mips16ISelLowering.cpp b/llvm/lib/Target/Mips/Mips16ISelLowering.cpp
index 5751bd406..8c387ffc8 100644
--- a/llvm/lib/Target/Mips/Mips16ISelLowering.cpp
+++ b/llvm/lib/Target/Mips/Mips16ISelLowering.cpp
@@ -251,8 +251,8 @@ Mips16TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
}
bool Mips16TargetLowering::isEligibleForTailCallOptimization(
- const CCState &CCInfo, unsigned NextStackOffset,
- const MipsFunctionInfo &FI, bool IsMustTail) const {
+ const CCState &CCInfo, unsigned NextStackOffset, const MipsFunctionInfo &FI,
+ bool IsMustTail) const {
// No tail call optimization for mips16.
return false;
}
diff --git a/llvm/lib/Target/Mips/Mips16ISelLowering.h b/llvm/lib/Target/Mips/Mips16ISelLowering.h
index 8ac40644d..6d0b909b7 100644
--- a/llvm/lib/Target/Mips/Mips16ISelLowering.h
+++ b/llvm/lib/Target/Mips/Mips16ISelLowering.h
@@ -33,8 +33,7 @@ namespace llvm {
private:
bool isEligibleForTailCallOptimization(
const CCState &CCInfo, unsigned NextStackOffset,
- const MipsFunctionInfo &FI,
- bool IsMustTail = false) const override;
+ const MipsFunctionInfo &FI, bool IsMustTail = false) const override;
void setMips16HardFloatLibCalls();
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.h b/llvm/lib/Target/Mips/MipsISelLowering.h
index 3189f9404..c8e0de896 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.h
+++ b/llvm/lib/Target/Mips/MipsISelLowering.h
@@ -595,11 +595,9 @@ class TargetRegisterClass;
/// isEligibleForTailCallOptimization - Check whether the call is eligible
/// for tail call optimization.
- virtual bool
- isEligibleForTailCallOptimization(const CCState &CCInfo,
- unsigned NextStackOffset,
- const MipsFunctionInfo &FI,
- bool IsMustTail = false) const = 0;
+ virtual bool isEligibleForTailCallOptimization(
+ const CCState &CCInfo, unsigned NextStackOffset,
+ const MipsFunctionInfo &FI, bool IsMustTail = false) const = 0;
/// copyByValArg - Copy argument registers which were used to pass a byval
/// argument to the stack. Create a stack frame object for the byval
diff --git a/llvm/lib/Target/Mips/MipsSEISelLowering.cpp b/llvm/lib/Target/Mips/MipsSEISelLowering.cpp
index 10e71df71..ac344f105 100644
--- a/llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsSEISelLowering.cpp
@@ -1190,8 +1190,8 @@ MipsSETargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
}
bool MipsSETargetLowering::isEligibleForTailCallOptimization(
- const CCState &CCInfo, unsigned NextStackOffset,
- const MipsFunctionInfo &FI, bool IsMustTail) const {
+ const CCState &CCInfo, unsigned NextStackOffset, const MipsFunctionInfo &FI,
+ bool IsMustTail) const {
if (!UseMipsTailCalls && !IsMustTail)
return false;
diff --git a/llvm/lib/Target/Mips/MipsSEISelLowering.h b/llvm/lib/Target/Mips/MipsSEISelLowering.h
index 7230e9cff..9a4495702 100644
--- a/llvm/lib/Target/Mips/MipsSEISelLowering.h
+++ b/llvm/lib/Target/Mips/MipsSEISelLowering.h
@@ -65,8 +65,7 @@ class TargetRegisterClass;
private:
bool isEligibleForTailCallOptimization(
const CCState &CCInfo, unsigned NextStackOffset,
- const MipsFunctionInfo &FI,
- bool IsMustTail = false) const override;
+ const MipsFunctionInfo &FI, bool IsMustTail = false) const override;
void
getOpndList(SmallVectorImpl<SDValue> &Ops,
``````````
</details>
https://github.com/llvm/llvm-project/pull/161860
More information about the llvm-commits
mailing list