@@ -3520,6 +3520,27 @@ def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
MetaVarName<"">,
HelpText<"Load pass plugin from a dynamic shared object file (only with new
pass manager).">,
MarshallingInfoStringVector>;
+defm tocdata : BoolOption<"m","tocdata",
+ CodeGenO
@@ -3520,6 +3520,27 @@ def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
MetaVarName<"">,
HelpText<"Load pass plugin from a dynamic shared object file (only with new
pass manager).">,
MarshallingInfoStringVector>;
+defm tocdata : BoolOption<"m","tocdata",
+ CodeGenO
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin approved this pull request.
LGTM ,Thanks for your efforts.
https://github.com/llvm/llvm-project/pull/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
@@ -510,7 +510,8 @@ SDNode *PPCDAGToDAGISel::getGlobalBaseReg() {
}
// Check if a SDValue has the toc-data attribute.
-static bool hasTocDataAttr(SDValue Val, unsigned PointerSize) {
+static bool hasTocDataAttr(SDValue Val, unsigned PointerSize,
+ con
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/67999
___
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/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2520,7 +2520,9 @@ void PPCAIXAsmPrinter::emitGlobalVariable(const
GlobalVariable *GV) {
// If the Global Variable has the toc-data attribute, it needs to be emitted
// when we emit the .toc section.
if (GV->hasAttribute("toc-data")) {
-TOCDataGlobalVars.push_back
@@ -429,13 +429,101 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
&Args,
llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
}
+// This function processes all the mtocdata options to build the final
+// simplified toc data options to pass
@@ -0,0 +1,69 @@
+// REQUIRES: powerpc-registered-target
diggerlin wrote:
do we need the // REQUIRES: powerpc-registered-target since it cross compile?
https://github.com/llvm/llvm-project/pull/67999
___
cfe-commits m
@@ -265,6 +269,61 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true);
}
+void AIXTargetCodeGenInfo::setTargetAttributes(
+const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const
hubert-reinterpretcast wrote:
> The manual change says "the TOC data transformation will be applied to [...]
> block-scope static variables". But later, you mention "internal linkage",
> which is a bit confusing when you're dealing with C++. Block-scope static
> variables don't have "linkage"
https://github.com/syzaara updated
https://github.com/llvm/llvm-project/pull/67999
>From dced11bd242aba08158a5a0a399b2b0ea7381a69 Mon Sep 17 00:00:00 2001
From: Zaara Syeda
Date: Thu, 28 Sep 2023 15:01:56 -0400
Subject: [PATCH 1/3] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This patc
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/67999
___
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/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -265,6 +269,61 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true);
}
+void AIXTargetCodeGenInfo::setTargetAttributes(
+const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const
@@ -622,6 +622,28 @@ static bool checkAliasedGlobal(
return true;
}
+// Emit a warning if toc-data attribute is requested for global variables that
+// have aliases and remove the toc-data attribute.
+static void checkAliasForTocData(llvm::GlobalVariable *GVar,
+
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
&Args,
llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
}
+// This function processes all the mtocdata options to build the final
+// simplified toc data options to pass
@@ -421,13 +421,101 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
&Args,
llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
}
+// This function processes all the mtocdata options to build the final
+// simplified toc data options to pass
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/67999
___
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/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4016,7 +4016,63 @@ Clang expects the GCC executable "gcc.exe" compiled for
AIX
^^^
+TOC Data Transformation
+"""
+TOC data transformation is off by default (``-mno-tocdata``).
+When ``-mtocdata`` is specified, the TOC data transformation will be applied
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
&Args,
llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
}
+// This function processes all the mtocdata options to build the final
+// simplified toc data options to pass
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S -mtocdata -emit-llvm -o
- 2>&1 | FileCheck %s
+// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S
-mtocdata=n,_ZN11MyNamespace10myVariableE,_ZL1s,_ZZ4testvE7counter -emit-llvm
-o - 2>&1 | FileCheck %s
@@ -265,6 +269,63 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true);
}
+void AIXTargetCodeGenInfo::setTargetAttributes(
+const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const
https://github.com/syzaara updated
https://github.com/llvm/llvm-project/pull/67999
>From b789b57067bfe9df948a6ff2d65bf2381b23d042 Mon Sep 17 00:00:00 2001
From: Zaara Syeda
Date: Thu, 28 Sep 2023 15:01:56 -0400
Subject: [PATCH 1/2] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This patc
@@ -0,0 +1,61 @@
+// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S
-mtocdata=f,g,h,i,j,k,l,m,n,o,p -emit-llvm -o - 2>&1 | FileCheck %s
-check-prefixes=CHECK32 --match-full-lines
+// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S -mtocdata -emit-llvm -o
- 2>&1 | FileC
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
&Args,
llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
}
+// This function processes all the mtocdata options to build the final
+// simplified toc data options to pass
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
&Args,
llvm_unreachable("Unexpected C++ library type; only libc++ is supported.");
}
+// This function processes all the mtocdata options to build the final
+// simplified toc data options to pass
@@ -622,6 +622,28 @@ static bool checkAliasedGlobal(
return true;
}
+// Emit a warning if toc-data attribute is requested for global variables that
+// have aliases and remove the toc-data attribute.
+static void checkAliasForTocData(llvm::GlobalVariable *GVar,
+
@@ -622,6 +622,28 @@ static bool checkAliasedGlobal(
return true;
}
+// Emit a warning if toc-data attribute is requested for global variables that
+// have aliases and remove the toc-data attribute.
+static void checkAliasForTocData(llvm::GlobalVariable *GVar,
+
https://github.com/efriedma-quic commented:
What are the ABI implications here? Do all translation units have to agree on
whether a variable is "tocdata"? The manual change hints there's some sort of
linker fixup, but it's not clear to me how that works.
Specifying the names of global variab
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/67999
___
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/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3426,6 +3426,29 @@ def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
MetaVarName<"">,
HelpText<"Load pass plugin from a dynamic shared object file (only with new
pass manager).">,
MarshallingInfoStringVector>;
+def mtocdata : Flag<["-"], "mtocdata">,
+ Visibilit
@@ -3426,6 +3426,29 @@ def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
MetaVarName<"">,
HelpText<"Load pass plugin from a dynamic shared object file (only with new
pass manager).">,
MarshallingInfoStringVector>;
+def mtocdata : Flag<["-"], "mtocdata">,
+ Visibilit
@@ -93,6 +93,8 @@ def err_fe_backend_error_attr :
def warn_fe_backend_warning_attr :
Warning<"call to '%0' declared with 'warning' attribute: %1">, BackendInfo,
InGroup;
+def warn_toc_unsupported_type : Warning<"The -mtocdata option is ignored "
MaskRay wro
llvmbot wrote:
@llvm/pr-subscribers-mc
Changes
This patch enables support that the XL compiler had for AIX under
-qdatalocal/-qdataimported.
---
Patch is 38.39 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llvm/llvm-project/pull/67999.diff
22 Files Affected:
- (
https://github.com/syzaara created
https://github.com/llvm/llvm-project/pull/67999
This patch enables support that the XL compiler had for AIX under
-qdatalocal/-qdataimported.
>From b789b57067bfe9df948a6ff2d65bf2381b23d042 Mon Sep 17 00:00:00 2001
From: Zaara Syeda
Date: Thu, 28 Sep 2023 15:
40 matches
Mail list logo