syzaara wrote:
> I'm seeing test failures locally when compiling with
> `LLVM_REVERSE_ITERATION=ON`. I'm surprised this hasn't failed on buildbot.
>
> ```
> clang/test/Driver/toc-conf.c:22:18: error: CHECK-EQCONF: expected string not
> found in input
> // CHECK-EQCONF: "-mtocdata=g3,g4"
>
@@ -404,6 +404,15 @@ class CodeGenOptions : public CodeGenOptionsBase {
/// List of pass builder callbacks.
std::vector> PassBuilderCallbacks;
+ /// List of global variables explicitly specified by the user as toc-data.
+ std::vector TocDataVarsUserSpecified;
+
+ ///
syzaara wrote:
> This is broken by the patch
> https://lab.llvm.org/buildbot/#/builders/5/builds/41773/steps/9/logs/stdio
Should be fixed by
[00ba2a6](https://github.com/llvm/llvm-project/commit/00ba2a6f1e7bbb6fa6f3d50ad87a4a528af87ef5)
https://github.com/llvm/llvm-project/pull/67999
vitalybuka wrote:
This is broken by the patch
https://lab.llvm.org/buildbot/#/builders/5/builds/41773/steps/9/logs/stdio
https://github.com/llvm/llvm-project/pull/67999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -404,6 +404,15 @@ class CodeGenOptions : public CodeGenOptionsBase {
/// List of pass builder callbacks.
std::vector> PassBuilderCallbacks;
+ /// List of global variables explicitly specified by the user as toc-data.
+ std::vector TocDataVarsUserSpecified;
+
+ ///
https://github.com/syzaara closed
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/syzaara updated
https://github.com/llvm/llvm-project/pull/67999
>From d7536fb557b254454b9944c4bef4d552e117190a Mon Sep 17 00:00:00 2001
From: Zaara Syeda
Date: Thu, 28 Sep 2023 15:01:56 -0400
Subject: [PATCH 1/9] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This
https://github.com/syzaara updated
https://github.com/llvm/llvm-project/pull/67999
>From 841345a110db787920ca8acbc08801436f2b36db Mon Sep 17 00:00:00 2001
From: Zaara Syeda
Date: Thu, 28 Sep 2023 15:01:56 -0400
Subject: [PATCH 1/9] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This
https://github.com/amy-kwan 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/amy-kwan approved this pull request.
Two minor nits but also LGTM.
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,62 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true);
}
+void AIXTargetCodeGenInfo::setTargetAttributes(
+const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule ) const {
@@ -82,8 +82,7 @@ void MCSectionXCOFF::printSwitchToSection(const MCAsmInfo
, const Triple ,
}
if (isCsect() && getMappingClass() == XCOFF::XMC_TD) {
-assert((getKind().isBSSExtern() || getKind().isBSSLocal()) &&
- "Unexepected section kind for toc-data");
@@ -172,6 +172,30 @@ bool PPCSubtarget::enableSubRegLiveness() const {
return UseSubRegLiveness;
}
+void PPCSubtarget::tocDataChecks(unsigned PointerSize,
+ const GlobalVariable *GV) const {
+ // TODO: These asserts should be updated as more
syzaara wrote:
Ping.
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/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/8] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This
@@ -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",
+
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/7] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This
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/6] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This
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
@@ -245,6 +245,30 @@ class PPCSubtarget : public PPCGenSubtargetInfo {
/// True if the GV will be accessed via an indirect symbol.
bool isGVIndirectSymbol(const GlobalValue *GV) const;
+ bool tocDataChecks(unsigned PointerSize, const GlobalVariable *GV) const {
@@ -245,6 +245,30 @@ class PPCSubtarget : public PPCGenSubtargetInfo {
/// True if the GV will be accessed via an indirect symbol.
bool isGVIndirectSymbol(const GlobalValue *GV) const;
+ bool tocDataChecks(unsigned PointerSize, const GlobalVariable *GV) const {
@@ -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 ) const {
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/4] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX
This
@@ -0,0 +1,16 @@
+; RUN: not --crash llc -mtriple powerpc-ibm-aix-xcoff < %s 2>&1 | FileCheck %s
--check-prefix CHECK-ERROR
+; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck
%s --check-prefix CHECK-ERROR
+
+@a = global [5 x i16] zeroinitializer,
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 4c1745207665262380e9bff65201816a966339d0
f23461ad86202ae37947c5ad1099e301b23b3589 --
@@ -0,0 +1,69 @@
+// REQUIRES: powerpc-registered-target
+// RUN: %clang_cc1 %s -triple=powerpc-ibm-aix-xcoff -S
-mtocdata=h,g,f,e,d,c,b,a,globalOneWithAlias,globalTwoWithAlias,ll,t3 -verify
-emit-llvm -o - | FileCheck %s -check-prefix=CHECK --match-full-lines
+// RUN:
@@ -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/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
@@ -0,0 +1,29 @@
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s --check-prefix
CHECK
+; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s --check-prefix
CHECK
+
diggerlin wrote:
also need to add test scenario `--filetype=obj`
stephenpeckham wrote:
> 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.
There are no ABI implications. Using -mtocdata removes
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
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 %s -triple powerpc-unknown-aix -S -mtocdata=g1,g2,g3
-emit-llvm -o - | FileCheck %s -check-prefix=CHECK-MIX --match-full-lines
diggerlin wrote:
I am not sure the purpose of the test case, I think all the test scenario have
@@ -0,0 +1,16 @@
+; RUN: not --crash llc -mtriple powerpc-ibm-aix-xcoff < %s 2>&1 | FileCheck %s
--check-prefix CHECK-ERROR
+; RUN: not --crash llc -mtriple powerpc64-ibm-aix-xcoff < %s 2>&1 | FileCheck
%s --check-prefix CHECK-ERROR
+
+@a = global [5 x i16] zeroinitializer,
@@ -0,0 +1,69 @@
+// REQUIRES: powerpc-registered-target
+// RUN: %clang_cc1 %s -triple=powerpc-ibm-aix-xcoff -S
-mtocdata=h,g,f,e,d,c,b,a,globalOneWithAlias,globalTwoWithAlias,ll,t3 -verify
-emit-llvm -o - | FileCheck %s -check-prefix=CHECK --match-full-lines
+// RUN:
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S
-mtocdata=a4,a5,a8,a9,b,c,d,e,v -emit-llvm -o - 2>&1 \
+// RUN: | FileCheck %s -check-prefixes=CHECK32 --match-full-lines
+// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -S -mtocdata
@@ -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 ) const {
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
,
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 to
@@ -421,13 +421,102 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList
,
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 to
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,63 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true);
}
+void AIXTargetCodeGenInfo::setTargetAttributes(
+const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule ) const {
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,63 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable(
return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true);
}
+void AIXTargetCodeGenInfo::setTargetAttributes(
+const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule ) const {
@@ -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 ) const {
@@ -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 ) const {
@@ -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 ) const {
@@ -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
46 matches
Mail list logo