mrkajetanp wrote:
> If you are soliciting reviews, you could also use the "Reviewers" box on the
> top right of this page
I would, but I do not currently have the right permissions to use the box.
Hence the ccs - I need someone else to do it.
https://github.com/llvm/llvm-project/pull/132801
mrkajetanp wrote:
cc @tblah @DavidTruby
https://github.com/llvm/llvm-project/pull/132801
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mrkajetanp created
https://github.com/llvm/llvm-project/pull/132801
Add -f[no-]slp-vectorize to the flang driver.
Add corresponding -fvectorize-slp to the flang frontend.
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mo
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/132801
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 24 Mar 2025 17:28:03 +
Subject: [PATCH 1/2] [flang] Add -f[no-]slp-vectorize flags
Add -f[no-]sl
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/132801
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 24 Mar 2025 17:28:03 +
Subject: [PATCH 1/3] [flang] Add -f[no-]slp-vectorize flags
Add -f[no-]sl
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/132801
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 24 Mar 2025 17:28:03 +
Subject: [PATCH 1/2] [flang] Add -f[no-]slp-vectorize flags
Add -f[no-]sl
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/132801
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 24 Mar 2025 17:28:03 +
Subject: [PATCH 1/3] [flang] Add -f[no-]slp-vectorize flags
Add -f[no-]sl
mrkajetanp wrote:
> This patch might partially address the issue raised in
> https://github.com/llvm/llvm-project/issues/73180
Certainly, I tracked a regression in a workload down to flang not running the
slp vectorizer. Hence this patch.
https://github.com/llvm/llvm-project/pull/132801
_
mrkajetanp wrote:
> Is this buildbot failure related:
> [https://lab.llvm.org/buildbot/#/builders/89/builds/19482](https://lab.llvm.org/buildbot/#/builders/89/builds/19482)?
Ah yes, sorry about that! Just a missing -o /dev/null, I'll post a fix in a
moment.
https://github.com/llvm/llvm-proje
mrkajetanp wrote:
The buildbot failure fix is here:
https://github.com/llvm/llvm-project/pull/133128
https://github.com/llvm/llvm-project/pull/132801
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
mrkajetanp wrote:
> Apart from the docstrings, this looks good. Thanks for the changes :-)
Done, thanks a lot for the review! :)
https://github.com/llvm/llvm-project/pull/132801
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/132801
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 24 Mar 2025 17:28:03 +
Subject: [PATCH 1/5] [flang] Add -f[no-]slp-vectorize flags
Add -f[no-]sl
mrkajetanp wrote:
I tested it, working as expected for me. Very nice!
https://github.com/llvm/llvm-project/pull/130788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/132801
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 24 Mar 2025 17:28:03 +
Subject: [PATCH 1/4] [flang] Add -f[no-]slp-vectorize flags
Add -f[no-]sl
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/132801
>From d9b2a86d01688b69b8f116f6b52caeec8cd6e756 Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 24 Mar 2025 17:28:03 +
Subject: [PATCH 1/4] [flang] Add -f[no-]slp-vectorize flags
Add -f[no-]sl
@@ -1,10 +1,15 @@
! RUN: %flang -### -S -fslp-vectorize %s 2>&1 | FileCheck
-check-prefix=CHECK-SLP-VECTORIZE %s
! RUN: %flang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck
-check-prefix=CHECK-NO-SLP-VECTORIZE %s
+! RUN: %flang -### -S -O0 %s 2>&1 | FileCheck
-check-prefix=C
mrkajetanp wrote:
For more details on the above, the problem happens once the loop vectorizer
transforms a loop with this metadata that's inside an openmp block. The dbg
metadata becomes incorrectly attached and as a result verifyFunction returns a
failure.
```
!dbg attachment points at wrong
https://github.com/mrkajetanp created
https://github.com/llvm/llvm-project/pull/150269
Both clang and gfortran support the -fopenmp-simd flag, which enables OpenMP
support only for simd constructs, while disabling the rest of OpenMP.
Add a new SimdOnly flang OpenMP IR pass which rewrites gener
@@ -952,6 +954,9 @@ void Flang::ConstructJob(Compilation &C, const JobAction
&JA,
<< A->getSpelling() << A->getValue();
break;
}
+ } else {
+Args.AddLastArg(CmdArgs, options::OPT_fopenmp_simd,
mrkajetanp wrote:
Yes, that's correct. If
@@ -3706,14 +3706,19 @@ def fopenmp_relocatable_target : Flag<["-"],
"fopenmp-relocatable-target">,
def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
Group, Flags<[NoArgumentUnused, HelpHidden]>,
Visibility<[ClangOption, CC1Option]>;
-def fope
mrkajetanp wrote:
> Is there a reason why we are preferring to generate constructs and then
> removing non-simd ones, as opposed to simply generating only simd?
I think both approaches have benefits and drawbacks, as usual. The current one
keeps all the logic closer together as opposed to havi
@@ -0,0 +1,360 @@
+#include "flang/Optimizer/Builder/FIRBuilder.h"
+#include "flang/Optimizer/Transforms/Utils.h"
+#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
+#include "mlir/IR/
@@ -0,0 +1,360 @@
+#include "flang/Optimizer/Builder/FIRBuilder.h"
+#include "flang/Optimizer/Transforms/Utils.h"
+#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
+#include "mlir/IR/
@@ -3706,14 +3706,19 @@ def fopenmp_relocatable_target : Flag<["-"],
"fopenmp-relocatable-target">,
def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
Group, Flags<[NoArgumentUnused, HelpHidden]>,
Visibility<[ClangOption, CC1Option]>;
-def fope
@@ -0,0 +1,360 @@
+#include "flang/Optimizer/Builder/FIRBuilder.h"
+#include "flang/Optimizer/Transforms/Utils.h"
+#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
+#include "mlir/IR/
@@ -0,0 +1,360 @@
+#include "flang/Optimizer/Builder/FIRBuilder.h"
+#include "flang/Optimizer/Transforms/Utils.h"
+#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
+#include "mlir/IR/
@@ -0,0 +1,360 @@
+#include "flang/Optimizer/Builder/FIRBuilder.h"
+#include "flang/Optimizer/Transforms/Utils.h"
+#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
+#include "mlir/IR/
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/150269
>From 2e2b2cafe661604237f6a867459cfa1db8db5f6f Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 30 Jun 2025 16:00:08 +
Subject: [PATCH 1/2] [flang][OpenMP] Add -f[no]-openmp-simd
Both clang an
https://github.com/mrkajetanp updated
https://github.com/llvm/llvm-project/pull/150269
>From 2e2b2cafe661604237f6a867459cfa1db8db5f6f Mon Sep 17 00:00:00 2001
From: Kajetan Puchalski
Date: Mon, 30 Jun 2025 16:00:08 +
Subject: [PATCH 1/2] [flang][OpenMP] Add -f[no]-openmp-simd
Both clang an
mrkajetanp wrote:
> Have you considered handling this in the prescanning/parsing, semantics or
> lowering stages? If semantics sees all OpenMP constructs, wouldn't it issue
> errors if there is a semantic error in a non-simd construct?
We could add checks to ignore semantic errors if the flag
@@ -3706,14 +3706,19 @@ def fopenmp_relocatable_target : Flag<["-"],
"fopenmp-relocatable-target">,
def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
Group, Flags<[NoArgumentUnused, HelpHidden]>,
Visibility<[ClangOption, CC1Option]>;
-def fope
@@ -3706,14 +3706,19 @@ def fopenmp_relocatable_target : Flag<["-"],
"fopenmp-relocatable-target">,
def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
Group, Flags<[NoArgumentUnused, HelpHidden]>,
Visibility<[ClangOption, CC1Option]>;
-def fope
@@ -0,0 +1,401 @@
+//===-- SimdOnly.cpp
--===//
+//
+// 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: Ap
@@ -0,0 +1,401 @@
+//===-- SimdOnly.cpp
--===//
+//
+// 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: Ap
34 matches
Mail list logo