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
@@ -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))
+
@@ -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))
+
@@ -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))
+
@@ -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))
+
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
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
@@ -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))
+
@@ -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))
+
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
@@ -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:/
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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))
+
@@ -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))
+
@@ -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))
+
@@ -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))
+
@@ -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))
+
@@ -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))
+
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
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
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
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
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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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?
@@ -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))
+
@@ -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
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
@@ -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
_
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
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.
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.
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
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
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
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
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.
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
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
@@ -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
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
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
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://
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-
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
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
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
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
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
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
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
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
@@ -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"
+//
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
@@ -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
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
@@ -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
@@ -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
@@ -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
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
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
@@ -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
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
@@ -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
@@ -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
---
@@ -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
---
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
@@ -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 (!
@@ -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"
+//
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
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
@@ -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 (!
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
@@ -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
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
@@ -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 (!
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
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
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
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
@@ -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
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 - 100 of 116 matches
Mail list logo