[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 07:49:20 PDT 2024
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 f1b76c53b6312a10d2ee4219e980498e7cbe5d53 6f6eea486dd514fff4a4ce200481d6e1a71f6d5c --extensions h,cpp,c -- clang/include/clang/CodeGen/CGFunctionInfo.h clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/Targets/SystemZ.cpp clang/test/CodeGen/SystemZ/systemz-abi-vector.c clang/test/CodeGen/SystemZ/systemz-abi.c clang/test/CodeGen/SystemZ/systemz-abi.cpp llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/include/llvm/CodeGen/TargetCallingConv.h llvm/include/llvm/CodeGen/TargetLowering.h llvm/lib/AsmParser/LLLexer.cpp llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/lib/Target/SystemZ/SystemZISelLowering.cpp llvm/lib/Transforms/Utils/CodeExtractor.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/CodeGen/CGFunctionInfo.h b/clang/include/clang/CodeGen/CGFunctionInfo.h
index 6a163ef592..ee3863d20b 100644
--- a/clang/include/clang/CodeGen/CGFunctionInfo.h
+++ b/clang/include/clang/CodeGen/CGFunctionInfo.h
@@ -135,10 +135,9 @@ private:
public:
ABIArgInfo(Kind K = Direct)
: TypeData(nullptr), PaddingType(nullptr), DirectAttr{0, 0}, TheKind(K),
- PaddingInReg(false), InAllocaSRet(false),
- InAllocaIndirect(false), IndirectByVal(false), IndirectRealign(false),
- SRetAfterThis(false), InReg(false), CanBeFlattened(false),
- SignExt(false), ZeroExt(false) {}
+ PaddingInReg(false), InAllocaSRet(false), InAllocaIndirect(false),
+ IndirectByVal(false), IndirectRealign(false), SRetAfterThis(false),
+ InReg(false), CanBeFlattened(false), SignExt(false), ZeroExt(false) {}
static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
llvm::Type *Padding = nullptr,
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 1150657df2..54e90c9dd1 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2589,7 +2589,7 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
RetAttrs.addAttribute(llvm::Attribute::ZExt);
else
RetAttrs.addAttribute(llvm::Attribute::NoExt);
- [[fallthrough]];
+ [[fallthrough]];
case ABIArgInfo::Direct:
if (RetAI.getInReg())
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 41dc67f1f4..eba0708ee5 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -2205,7 +2205,6 @@ SystemZTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv,
const SDLoc &DL, SelectionDAG &DAG) const {
MachineFunction &MF = DAG.getMachineFunction();
-
// Integer args <=32 bits should have an extension attribute.
if (!MF.getFunction().hasLocalLinkage() && Subtarget.isTargetELF())
CheckNarrowIntegerArgs(const_cast<SmallVectorImpl<ISD::OutputArg> &>(Outs));
``````````
</details>
https://github.com/llvm/llvm-project/pull/100757
More information about the llvm-commits
mailing list