[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-22 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/153049 >From c562d407468236c0ee31cd32949e7f6a363a798f Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Tue, 9 Sep 2025 19:27:03 + Subject: [PATCH 1/9] accept ifunc attribute on AIX --- clang/include/clang/Basic/Ta

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-22 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-22 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-20 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-20 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { w2yehia wrote: yes, tests are coming soon. https:/

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-20 Thread Wael Yehia via cfe-commits
@@ -1545,6 +1545,8 @@ class TargetInfo : public TransferrableTargetInfo, return true; if (getTriple().getArch() == llvm::Triple::ArchType::avr) return true; +if (getTriple().isOSAIX()) w2yehia wrote: this will have the same logic as in `aix

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-19 Thread Wael Yehia via cfe-commits
@@ -146,26 +146,9 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-bforceimprw"); } - // PGO instrumentation generates symbols belonging to special sections, and - // the linker needs to place all symbols in a particular secti

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-19 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,123 @@ +//===-- PPCPrepareIFuncsOnAIX.cpp - Prepare for ifunc lowering in codegen ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-19 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { w2yehia wrote: done https://github.com/llvm/llvm-p

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-19 Thread Wael Yehia via cfe-commits
@@ -146,26 +146,9 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-bforceimprw"); } - // PGO instrumentation generates symbols belonging to special sections, and - // the linker needs to place all symbols in a particular secti

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-18 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/153049 >From 81a9c979385b5d368fcdcf36332ad506d97e1365 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Wed, 3 Sep 2025 19:22:15 + Subject: [PATCH 1/9] [IR] enable attaching metadata on ifuncs In PR #153049, we have

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-17 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/153049 >From 81a9c979385b5d368fcdcf36332ad506d97e1365 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Wed, 3 Sep 2025 19:22:15 + Subject: [PATCH 1/6] [IR] enable attaching metadata on ifuncs In PR #153049, we have

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-17 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/153049 >From 81a9c979385b5d368fcdcf36332ad506d97e1365 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Wed, 3 Sep 2025 19:22:15 + Subject: [PATCH 1/8] [IR] enable attaching metadata on ifuncs In PR #153049, we have

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-17 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia commented: part 1 group codereview https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-15 Thread Wael Yehia via cfe-commits
@@ -1078,6 +1078,7 @@ void SlotTracker::processModule() { for (const GlobalIFunc &I : TheModule->ifuncs()) { if (!I.hasName()) CreateModuleSlot(&I); +processGlobalObjectMetadata(I); w2yehia wrote: supporting metadata on ifuncs is it's own PR no

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-13 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-13 Thread Wael Yehia via cfe-commits
@@ -1545,6 +1545,8 @@ class TargetInfo : public TransferrableTargetInfo, return true; if (getTriple().getArch() == llvm::Triple::ArchType::avr) return true; +if (getTriple().isOSAIX()) w2yehia wrote: should this be unconditional, in case th

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -4,6 +4,8 @@ // RUN: %clang_cc1 -triple x86_64-apple-macosx -verify -emit-llvm-only %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -verify -emit-llvm-only %s // RUN: %clang_cc1 -triple aarch64-pc-windows-msvcu -verify -emit-llvm-only %s +// RUN: %clang_cc1 -triple powe

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -146,26 +146,9 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-bforceimprw"); } - // PGO instrumentation generates symbols belonging to special sections, and - // the linker needs to place all symbols in a particular secti

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,123 @@ +//===-- PPCPrepareIFuncsOnAIX.cpp - Prepare for ifunc lowering in codegen ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,22 @@ +typedef void* Ptr; +typedef struct { Ptr addr, toc, env; } Descr; +typedef struct { Descr* desc; Ptr (*resolver)(); } IFUNC_PAIR; + +// A zero-length entry in section "ifunc_sec" to satisfy the __start_ifunc_sec +// and __stop_ifunc_sec references in this file, w

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,22 @@ +typedef void* Ptr; +typedef struct { Ptr addr, toc, env; } Descr; +typedef struct { Descr* desc; Ptr (*resolver)(); } IFUNC_PAIR; + +// A zero-length entry in section "ifunc_sec" to satisfy the __start_ifunc_sec +// and __stop_ifunc_sec references in this file, w

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,123 @@ +//===-- PPCPrepareIFuncsOnAIX.cpp - Prepare for ifunc lowering in codegen ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -4,6 +4,8 @@ // RUN: %clang_cc1 -triple x86_64-apple-macosx -verify -emit-llvm-only %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -verify -emit-llvm-only %s // RUN: %clang_cc1 -triple aarch64-pc-windows-msvcu -verify -emit-llvm-only %s +// RUN: %clang_cc1 -triple powe

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -1078,6 +1078,7 @@ void SlotTracker::processModule() { for (const GlobalIFunc &I : TheModule->ifuncs()) { if (!I.hasName()) CreateModuleSlot(&I); +processGlobalObjectMetadata(I); w2yehia wrote: do we need a corresponding ASM reader change?

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,123 @@ +//===-- PPCPrepareIFuncsOnAIX.cpp - Prepare for ifunc lowering in codegen ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-12 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-08-15 Thread Wael Yehia via cfe-commits
@@ -397,6 +399,98 @@ void llvm::embedBufferInModule(Module &M, MemoryBufferRef Buf, appendToCompilerUsed(M, GV); } +void llvm::lowerIFuncsOnAIX(Module &M) { w2yehia wrote: sounds good. Thanks. https://github.com/llvm/llvm-project/pull/153049 _

[clang] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-08-14 Thread Wael Yehia via cfe-commits
w2yehia wrote: I mistakenly thought ifunc can be forward declared with enough information to indicate it's an ifunc, so that all callsites of ifunc can be converted to indirect calls through the function descriptor (which is something that was planned as an immediate next step after this PR or

[clang] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-08-13 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/153049 >From 87cd7b2124ed6e1450f10a53726fcb8db6d7b8e7 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Mon, 11 Aug 2025 15:56:25 + Subject: [PATCH 1/9] Create and implement lowering of two intrinsics: int.ppc.get.

[clang] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-08-11 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/153049 >From 87cd7b2124ed6e1450f10a53726fcb8db6d7b8e7 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Mon, 11 Aug 2025 15:56:25 + Subject: [PATCH 1/4] Create and implement lowering of two intrinsics: int.ppc.get.

[clang] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-08-11 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia created https://github.com/llvm/llvm-project/pull/153049 None >From ed0bc14a65e718aaead6eb9397dad9b289e72c91 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Mon, 11 Aug 2025 15:56:25 + Subject: [PATCH 1/3] Create and implement lowering of two intrinsics: int.pp

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-03-11 Thread Wael Yehia via cfe-commits
w2yehia wrote: @mstorsjo FYI: https://github.com/llvm/llvm-project/commit/9ef7287d425 https://github.com/llvm/llvm-project/pull/127858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9ef7287 - [profile] runtime counter relocation needed on all windows targets (#127858)

2025-03-11 Thread Wael Yehia via cfe-commits
Author: Wael Yehia Date: 2025-03-12T03:13:33Z New Revision: 9ef7287d42526014abb0cf2aa53ac2c3087198be URL: https://github.com/llvm/llvm-project/commit/9ef7287d42526014abb0cf2aa53ac2c3087198be DIFF: https://github.com/llvm/llvm-project/commit/9ef7287d42526014abb0cf2aa53ac2c3087198be.diff LOG: [p

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-03-11 Thread Wael Yehia via cfe-commits
w2yehia wrote: > So I believe this should be generalized to all of Windows (and/or generalized > to check for a COFF object file format?) instead of singling out specifically > MSVC only. Thanks for checking. I can fix the condition but can you please let me know which of the two options you

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-03-11 Thread Wael Yehia via cfe-commits
w2yehia wrote: > Can you summarize the high level use case which didn't work before, and in > which way it used to fail before, which gets fixed by this change? Continuous profiling (that is continuous profile syncing to disk) is an existing feature, which is OFF by default on most platforms.

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-24 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia closed https://github.com/llvm/llvm-project/pull/127858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/127858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-20 Thread Wael Yehia via cfe-commits
@@ -6,6 +6,7 @@ // RUN: %clang --target=powerpc64-ibm-aix -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=RELOC // RUN: %clang --target=x86_64-unknown-fuchsia -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-19 Thread Wael Yehia via cfe-commits
w2yehia wrote: > Doesn't mingw target support it? Sorry I don't know. I was hoping someone familiar with clang on windows to comment. https://github.com/llvm/llvm-project/pull/127858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-19 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/127858 >From 843f78e9826b037a7bfb0913728a11eb249f4181 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Wed, 19 Feb 2025 06:25:16 + Subject: [PATCH 1/2] [profile] runtime counter relocation is needed on windows-msvc

[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)

2025-02-19 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia created https://github.com/llvm/llvm-project/pull/127858 Continuous profiling syncing is [supported on windows,](https://github.com/llvm/llvm-project/pull/124353#issuecomment-2649075857) and it also relies on runtime counter relocation (based on this [test](https://

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-10 Thread Wael Yehia via cfe-commits
w2yehia wrote: > > Just saw this in LLVM weekly. But this is not supported on Windows right? > > Only the UNIX platforms that can mmap? In that case it the limitation needs > > to be documented > > It is supported! We have [an `mmap` implementation for > Windows](https://github.com/llvm/llvm-

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-08 Thread Wael Yehia via cfe-commits
w2yehia wrote: > LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` > running on `suse-gary-m68k-cross` while building `clang` at step 4 "build > stage 1". Unrelated or noise. That buildbot had the exact failure few drivers [earlier](https://lab.llvm.org/buildbot/#/b

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-08 Thread Wael Yehia via cfe-commits
w2yehia wrote: thanks @MaskRay https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-08 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/8] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-08 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia closed https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-08 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/8] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-08 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/8] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-08 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/8] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-07 Thread Wael Yehia via cfe-commits
w2yehia wrote: Thank you to the reviewers. I'll merge this tonight if I get no further feedback. https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [PGO] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-06 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,21 @@ +// 1) test on platforms that (do or do not) require runtime relocation +// +// RUN: %clang -target x86_64-darwin -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=NO_RELOC +// NO_RELOC: "-cc1" {{.*}} "-fprofile-continuous" +//

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-06 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PGO] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-06 Thread Wael Yehia via cfe-commits
@@ -3033,6 +3033,24 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-continuous + + Enables the co

[clang] [PGO] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-02-06 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/7] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia requested changes to this pull request. https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia deleted https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-05 Thread Wael Yehia via cfe-commits
@@ -1120,3 +1120,23 @@ // RUN:-c \ // RUN: | FileCheck --check-prefixes=CHECK-K-UNUSED %s // CHECK-K-UNUSED: clang: warning: -K: 'linker' input unused [-Wunused-command-line-argument] + + +// This test verifies that the linker doesn't include '-latomic' when no sani

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-02-03 Thread Wael Yehia via cfe-commits
w2yehia wrote: I believe all comments have been addressed. friendly ping. @petrhosek any feedback please? https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
@@ -338,6 +338,10 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lpthread"); } const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath()); + + if (Sanitize.hasAnySanitizer() && IsArch32Bit) { w2yehia

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
@@ -239,6 +239,9 @@ append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570 append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors SANITIZER_CFLAGS) +# Suppress -Watomic-alignment warnings by not treating them as errors ---

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
@@ -239,6 +239,9 @@ append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570 append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors SANITIZER_CFLAGS) +# Suppress -Watomic-alignment warnings by not treating them as errors ---

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-30 Thread Wael Yehia via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-30 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,21 @@ +// 1) test on platforms that (do or do not) require runtime relocation +// +// RUN: %clang -target x86_64-darwin -fprofile-generate -fprofile-continuous -### -c %s 2>&1 | FileCheck %s --check-prefix=NO_RELOC +// NO_RELOC: "-cc1" {{.*}} "-fprofile-continuous" +//

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-30 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/5] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-30 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-30 Thread Wael Yehia via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-29 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang %s -S -emit-llvm -fprofile-generate -fprofile-continuous -o - | FileCheck %s --check-prefix=IRPGO w2yehia wrote: In this test, I'm testing both the driver (lines 4,5,8) and the clang codegen (lines 1,2,3,6). Should I split it in

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -133,6 +133,16 @@ std::string getDefaultProfileGenName() { : "default_%m.profraw"; } +// Path and name of file used for profile generation +std::string getProfileGenName(const CodeGenOptions &CodeGenOpts) { w2yehia wrote: sure. FYI I was follo

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/124353 >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH 1/2] [PGO] Add a clang option -fprofile-continuous that enables PGO

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -1886,6 +1886,11 @@ def fprofile_update_EQ : Joined<["-"], "fprofile-update=">, Values<"atomic,prefer-atomic,single">, MetaVarName<"">, HelpText<"Set update method of profile counters">, MarshallingInfoFlag>; +def fprofile_continuous : Flag<["-"], "fprofile-cont

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -3033,6 +3033,14 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-continuous w2

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
@@ -3033,6 +3033,14 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-continuous w2

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
@@ -3033,6 +3033,14 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-continuous w2

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
w2yehia wrote: Follow up PR https://github.com/w2yehia/llvm-project/pull/1 to switch all applicable tests in `compiler-rt/test/profile/ContinuousSyncMode` to use `-fprofile-continuous` https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia created https://github.com/llvm/llvm-project/pull/124353 None >From abef90fe8f46431a5fb8b7fe717c9fb65eb30266 Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Thu, 23 Jan 2025 00:03:15 + Subject: [PATCH] [PGO] Add a clang option -fprofile-continuous that enables P

[clang] [AIX] fix unsupported diff flag on AIX (-strip-trailing-cr) (PR #120276)

2024-12-17 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/120276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FatLTO] output of -ffat-lto-objects -S should be assembly. (PR #79041)

2024-01-24 Thread Wael Yehia via cfe-commits
@@ -12,14 +12,27 @@ // CHECK-CC-S-NOT: -emit-llvm // CHECK-CC-S-NOT: -ffat-lto-objects -/// When LTO is enabled, we expect LLVM IR output and -ffat-lto-objects to be passed to cc1. +/// When fat LTO is enabled with -S, we expect asm output and -ffat-lto-objects to be passed

[clang-tools-extra] [clang] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-22 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia approved this pull request. https://github.com/llvm/llvm-project/pull/78285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >