summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJosef Melcr <josef.melcr@suse.com>2025-11-20 23:57:57 +0100
committerJosef Melcr <josef.melcr@suse.com>2025-11-21 09:17:26 +0100
commitf9c01c47f8e5451e41a5df78f044d7b1e7b3d5d6 (patch)
tree0e764a6ee9a20c39c44b12431513ada4d5f24387 /libgomp
parent0343c45a3387ac5e1e365c97e56ea8305ba67016 (diff)
ipa: Remove LTO requirement for builtin callback carriers.
Due to the if statement in ipa_compute_jump_functions_for_bb, callback edges were never constructed for builtin functions unless LTO was enabled. This patch corrects this behavior, allowing GCC to optimize callbacks more broadly. It also extends our testing capabilities. gcc/ChangeLog: * attr-callback.cc (callback_edge_callee_has_attr): New function. * attr-callback.h (callback_edge_callee_has_attr): New function decl. * ipa-prop.cc (ipa_compute_jump_functions_for_bb): Don't skip callback carriers when calculating jump functions. libgomp/ChangeLog: * testsuite/libgomp.c/ipcp-cb-spec1.c: Remove LTO requirement. * testsuite/libgomp.c/ipcp-cb-spec2.c: Likewise. * testsuite/libgomp.c/ipcp-cb1.c: Likewise. Signed-off-by: Josef Melcr <josef.melcr@suse.com>
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c5
-rw-r--r--libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c3
-rw-r--r--libgomp/testsuite/libgomp.c/ipcp-cb1.c7
3 files changed, 6 insertions, 9 deletions
diff --git a/libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c b/libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c
index a85e62300f9..ff82f4c2f29 100644
--- a/libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c
+++ b/libgomp/testsuite/libgomp.c/ipcp-cb-spec1.c
@@ -1,9 +1,8 @@
/* Test that GOMP_task is special cased when cpyfn is NULL. */
/* { dg-do run } */
-/* { dg-options "-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details" } */
+/* { dg-options "-O3 -fopenmp -std=gnu99 -fdump-ipa-cp-details" } */
/* { dg-require-effective-target fopenmp } */
-/* { dg-require-effective-target lto } */
void test(int c) {
for (int i = 0; i < c; i++)
@@ -16,4 +15,4 @@ int main() {
return 0;
}
-/* { dg-final { scan-wpa-ipa-dump "Creating a specialized node of main._omp_fn" "cp" } } */
+/* { dg-final { scan-ipa-dump "Creating a specialized node of main._omp_fn" "cp" } } */
diff --git a/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c b/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c
index 01d7425c99f..30894d7d748 100644
--- a/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c
+++ b/libgomp/testsuite/libgomp.c/ipcp-cb-spec2.c
@@ -2,9 +2,8 @@
NULL. */
/* { dg-do run } */
-/* { dg-options "-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details" } */
+/* { dg-options "-O3 -fopenmp -std=gnu99 -fdump-ipa-cp-details" } */
/* { dg-require-effective-target fopenmp } */
-/* { dg-require-effective-target lto } */
void test(int *a) {
for (int i = 0; i < 100; i++) {
diff --git a/libgomp/testsuite/libgomp.c/ipcp-cb1.c b/libgomp/testsuite/libgomp.c/ipcp-cb1.c
index 3418b5dedab..e390f04d8cf 100644
--- a/libgomp/testsuite/libgomp.c/ipcp-cb1.c
+++ b/libgomp/testsuite/libgomp.c/ipcp-cb1.c
@@ -2,9 +2,8 @@
This tests the underlying callback attribute and its related edges. */
/* { dg-do run } */
-/* { dg-options "-O3 -fopenmp -flto -std=gnu99 -fdump-ipa-cp-details" } */
+/* { dg-options "-O3 -fopenmp -std=gnu99 -fdump-ipa-cp-details" } */
/* { dg-require-effective-target fopenmp } */
-/* { dg-require-effective-target lto } */
int a[100];
void test(int c) {
@@ -21,5 +20,5 @@ int main() {
return a[5] - 5;
}
-/* { dg-final { scan-wpa-ipa-dump "Creating a specialized node of test._omp_fn" "cp" } } */
-/* { dg-final { scan-wpa-ipa-dump "Aggregate replacements: 0\\\[0]=100\\(by_ref\\)" "cp" } } */
+/* { dg-final { scan-ipa-dump "Creating a specialized node of test._omp_fn" "cp" } } */
+/* { dg-final { scan-ipa-dump "Aggregate replacements: 0\\\[0]=100\\(by_ref\\)" "cp" } } */