https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -372,11 +453,12 @@ Address PPC32_SVR4_ABIInfo::EmitVAArg(CodeGenFunction
, Address VAList,
if (getTarget().getTriple().isOSDarwin()) {
auto TI = getContext().getTypeInfoInChars(Ty);
TI.Align = getParamTypeAlignment(Ty);
+int ArgGPRs = NumArgGPRs;
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +350,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+ uint64_t ) const {
+
+
@@ -271,22 +271,33 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool isComplexInRegABI;
+ // Size of GPR in bits
+ unsigned RLen;
+ static const int NumArgGPRs = 8;
CharUnits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -361,6 +439,9 @@ ABIArgInfo PPC32_SVR4_ABIInfo::classifyReturnType(QualType
RetTy) const {
return ABIArgInfo::getDirect(CoerceTy);
}
}
+ if (isComplexInRegABI && RetTy->isAnyComplexType()) {
amy-kwan wrote:
Braces not needed here.
@@ -223,6 +223,8 @@ CODEGENOPT(MCDCCoverage , 1, 0) ///< Enable MC/DC code
coverage criteria.
/// If -fpcc-struct-return or -freg-struct-return is specified.
ENUM_CODEGENOPT(StructReturnConvention, StructReturnConventionKind, 2,
SRCK_Default)
+ /// If
@@ -2540,6 +2540,10 @@ def ffp_contract : Joined<["-"], "ffp-contract=">,
Group,
HelpText<"Form fused FP ops (e.g. FMAs)">,
Values<"fast,on,off,fast-honor-pragmas">;
+def fcomplex_ppc_gnu_abi : Flag<["-"], "fcomplex-ppc-gnu-abi">,
Group, Visibility<[ClangOption,
@@ -271,22 +271,33 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool isComplexInRegABI;
+ // Size of GPR in bits
amy-kwan wrote:
```suggestion
bool IsComplexInRegABI;
// Size
@@ -337,12 +350,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+ uint64_t ) const {
+
+
https://github.com/amy-kwan commented:
I think the braces can also be omitted on the conditions within the `clang/*`
files.
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/amy-kwan edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +350,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+ uint64_t ) const {
+
+
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,12 +350,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+ uint64_t ) const {
+
+
@@ -337,12 +350,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+ uint64_t ) const {
+
+
@@ -337,12 +350,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+ uint64_t ) const {
+
+
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -271,22 +271,33 @@ namespace {
class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
bool IsSoftFloatABI;
bool IsRetSmallStructInRegABI;
+ bool isComplexInRegABI;
+ // Size of GPR in bits
+ unsigned RLen;
diggerlin wrote:
`RLen` is too short to
@@ -184,11 +184,13 @@ createTargetCodeGenInfo(CodeGenModule ) {
bool IsSoftFloat =
CodeGenOpts.FloatABI == "soft" || Target.hasFeature("spe");
-return createPPC32TargetCodeGenInfo(CGM, IsSoftFloat);
+unsigned RLen = Target.getPointerWidth(LangAS::Default);
@@ -184,11 +184,13 @@ createTargetCodeGenInfo(CodeGenModule ) {
bool IsSoftFloat =
CodeGenOpts.FloatABI == "soft" || Target.hasFeature("spe");
-return createPPC32TargetCodeGenInfo(CGM, IsSoftFloat);
+unsigned RLen = Target.getPointerWidth(LangAS::Default);
@@ -337,12 +350,77 @@ CharUnits
PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const {
return CharUnits::fromQuantity(4);
}
+ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty,
+ uint64_t ) const {
+
@@ -486,7 +486,8 @@ std::unique_ptr
createAIXTargetCodeGenInfo(CodeGenModule , bool Is64Bit);
std::unique_ptr
-createPPC32TargetCodeGenInfo(CodeGenModule , bool SoftFloatABI);
+createPPC32TargetCodeGenInfo(CodeGenModule , bool SoftFloatABI,
+
nemanjai wrote:
My review is not complete, I just submitted what I have so far so at least we
can get started on answering the questions I have so far.
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
@@ -486,7 +486,8 @@ std::unique_ptr
createAIXTargetCodeGenInfo(CodeGenModule , bool Is64Bit);
std::unique_ptr
-createPPC32TargetCodeGenInfo(CodeGenModule , bool SoftFloatABI);
+createPPC32TargetCodeGenInfo(CodeGenModule , bool SoftFloatABI,
+
@@ -78,6 +78,13 @@ class CodeGenOptions : public CodeGenOptionsBase {
SRCK_InRegs// Small structs in registers (-freg-struct-return).
};
+ enum ComplexArgumentConventionKind {
+CMPLX_Default,
+CMPLX_OnStack,
+CMPLX_OnGPR, // if ppc32
@@ -2540,6 +2540,10 @@ def ffp_contract : Joined<["-"], "ffp-contract=">,
Group,
HelpText<"Form fused FP ops (e.g. FMAs)">,
Values<"fast,on,off,fast-honor-pragmas">;
+def fcomplex_ppc_gnu_abi : Flag<["-"], "fcomplex-ppc-gnu-abi">,
Group, Visibility<[ClangOption,
chmeeedalf wrote:
> ping! @chmeeedalf @nemanjai
I know nothing about the complex ABI, so all I can say is the code looks okay
from a structural point, can't say anything to the logic.
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits
Long5hot wrote:
ping! @chmeeedalf @nemanjai
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From 6a209fb25b7923228a7f4e2a8e2accbc31988622 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Wed, 24 Jan 2024 13:14:03 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/Long5hot updated
https://github.com/llvm/llvm-project/pull/77732
>From ec05087b89af829247879c2e860f9d93f548c7a1 Mon Sep 17 00:00:00 2001
From: Kishan Parmar
Date: Wed, 17 Jan 2024 10:29:34 +0530
Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU
for
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Long5hot edited
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 164f85db876e61cf4a3c34493ed11e8f5820f968
f79b66cb6eb624c6e06c447a7f9d6824dc1628d5 --
Long5hot wrote:
Following up with this patch : https://reviews.llvm.org/D146942
https://github.com/llvm/llvm-project/pull/77732
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-driver
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-codegen
Author: Kishan Parmar (Long5hot)
Changes
Fixes : https://github.com/llvm/llvm-project/issues/56023
https://godbolt.org/z/1bsW1sKMs
newFlag :
https://github.com/Long5hot created
https://github.com/llvm/llvm-project/pull/77732
Fixes : https://github.com/llvm/llvm-project/issues/56023
https://godbolt.org/z/1bsW1sKMs
newFlag : -fcomplex-ppc-gnu-abi
GNU uses GPRs for complex parameters and return values
101 - 154 of 154 matches
Mail list logo