[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-18 Thread Felix via cfe-commits
@@ -3362,6 +3362,64 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op, return LowerGlobalTLSAddressLinux(Op, DAG); } +/// updateForAIXShLibTLSModelOpt - Helper to initialize TLS model opt settings, +/// and then apply the update. +static void

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-18 Thread Felix via cfe-commits
@@ -3362,6 +3362,64 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op, return LowerGlobalTLSAddressLinux(Op, DAG); } +/// updateForAIXShLibTLSModelOpt - Helper to initialize TLS model opt settings, +/// and then apply the update. +static void

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-18 Thread Felix via cfe-commits
@@ -5019,6 +5019,10 @@ def maix_small_local_exec_tls : Flag<["-"], "maix-small-local-exec-tls">, "where the offset from the TLS base is encoded as an " "immediate operand (AIX 64-bit only). " "This access sequence is not used for variables

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-16 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast commented: See inline comments for rationale re: scoping to LD -> IE only (and not performing IE -> LD). https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-16 Thread Hubert Tong via cfe-commits
@@ -3362,6 +3362,64 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op, return LowerGlobalTLSAddressLinux(Op, DAG); } +/// updateForAIXShLibTLSModelOpt - Helper to initialize TLS model opt settings, +/// and then apply the update. +static void

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-16 Thread Hubert Tong via cfe-commits
@@ -3362,6 +3362,64 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op, return LowerGlobalTLSAddressLinux(Op, DAG); } +/// updateForAIXShLibTLSModelOpt - Helper to initialize TLS model opt settings, +/// and then apply the update. +static void

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-16 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-16 Thread Hubert Tong via cfe-commits
@@ -5019,6 +5019,10 @@ def maix_small_local_exec_tls : Flag<["-"], "maix-small-local-exec-tls">, "where the offset from the TLS base is encoded as an " "immediate operand (AIX 64-bit only). " "This access sequence is not used for variables

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-11 Thread Felix via cfe-commits
orcguru wrote: Since https://github.com/llvm/llvm-project/pull/86641 has been merged, I will continue work on this patch to handle the interactions of these two flags. Mean while I'm waiting for more review comments from experts. Thank you! https://github.com/llvm/llvm-project/pull/84132

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-10 Thread Amy Kwan via cfe-commits
@@ -3362,6 +3362,65 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddress(SDValue Op, return LowerGlobalTLSAddressLinux(Op, DAG); } +/// updateForAIXShLibTLSModelOpt - Helper to initialize TLS model opt settings, +/// and then apply the update. +static void

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-10 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. Thank you for addressing my comment! I think I do not have any further comments, so unless if anyone has any other comments LGTM. https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-10 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-08 Thread Felix via cfe-commits
https://github.com/orcguru deleted https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-08 Thread Felix via cfe-commits
@@ -3369,6 +3369,59 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-08 Thread Felix via cfe-commits
@@ -3369,6 +3369,59 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-02 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,59 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-25 Thread via cfe-commits
github-actions[bot] wrote: :white_check_mark: With the latest revision this PR passed the C/C++ code formatter. https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-25 Thread via cfe-commits
github-actions[bot] wrote: :white_check_mark: With the latest revision this PR passed the Python code formatter. https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-25 Thread Felix via cfe-commits
@@ -329,6 +329,12 @@ def FeatureAIXLocalExecTLS : "Produce a TOC-free local-exec TLS sequence for this function " "for 64-bit AIX">; +def FeatureAIXSharedLibraryTLSModelHeuristic : +

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-25 Thread Felix via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-24 Thread Felix via cfe-commits
@@ -80,6 +80,7 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool IsISA3_0 = false; bool IsISA3_1 = false; bool HasQuadwordAtomics = false; + bool HasAIXShLibTLSModelHeuristic = false; orcguru wrote: Hi Kai, Thank you for

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -848,6 +848,14 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSLE; if (Model == TLSModel::InitialExec) return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSIE; + // On AIX, TLS

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -848,6 +848,14 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSLE; if (Model == TLSModel::InitialExec) return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSIE; + // On AIX, TLS

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -4958,6 +4958,10 @@ def maix_small_local_exec_tls : Flag<["-"], "maix-small-local-exec-tls">, "where the offset from the TLS base is encoded as an " "immediate operand (AIX 64-bit only). " "This access sequence is not used for variables

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -329,6 +329,12 @@ def FeatureAIXLocalExecTLS : "Produce a TOC-free local-exec TLS sequence for this function " "for 64-bit AIX">; +def FeatureAIXSharedLibraryTLSModelHeuristic : +

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -80,6 +80,7 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool IsISA3_0 = false; bool IsISA3_1 = false; bool HasQuadwordAtomics = false; + bool HasAIXShLibTLSModelHeuristic = false; bzEq wrote: This looks redundant. Frontend

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-15 Thread Felix via cfe-commits
https://github.com/orcguru edited https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-15 Thread Felix via cfe-commits
https://github.com/orcguru edited https://github.com/llvm/llvm-project/pull/84132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits