https://github.com/tarunprabhu closed
https://github.com/llvm/llvm-project/pull/143418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mcinally wrote:
> Thanks for the changes, Cameron. LGTM.
Thanks! Would you mind merging yet again? I still don't have access yet.
https://github.com/llvm/llvm-project/pull/143418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
https://github.com/tarunprabhu approved this pull request.
Thanks for the changes, Cameron. LGTM.
https://github.com/llvm/llvm-project/pull/143418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
https://github.com/mcinally updated
https://github.com/llvm/llvm-project/pull/143418
>From f4812aacb17aaf535f454c82e4ef29c5c9950a12 Mon Sep 17 00:00:00 2001
From: Cameron McInally
Date: Mon, 9 Jun 2025 11:19:36 -0700
Subject: [PATCH 1/2] [flang] Add support for -mrecip[=]
This patch adds suppo
@@ -2636,6 +2636,11 @@ void
ModuleImport::processFunctionAttributes(llvm::Function *func,
funcOp.setTargetFeaturesAttr(
LLVM::TargetFeaturesAttr::get(context, attr.getValueAsString()));
+ if (llvm::Attribute attr = func->getFnAttribute("reciprocal-estimates");
+
@@ -1549,6 +1549,9 @@ LogicalResult
ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
if (auto tuneCpu = func.getTuneCpu())
llvmFunc->addFnAttr("tune-cpu", *tuneCpu);
+ if (auto reciprocalEstimates = func.getReciprocalEstimates())
tarunprabhu wr
@@ -2636,6 +2636,11 @@ void
ModuleImport::processFunctionAttributes(llvm::Function *func,
funcOp.setTargetFeaturesAttr(
LLVM::TargetFeaturesAttr::get(context, attr.getValueAsString()));
+ if (llvm::Attribute attr = func->getFnAttribute("reciprocal-estimates");
+
@@ -0,0 +1,27 @@
+! Test that -mrecip[=] works as expected.
+
tarunprabhu wrote:
Since you have added both `FlangOption` and `FC1Option` in `Options.td`, could
we test that the option is recognized by the main driver as well, not just
`-fc1`?
https://github.co
@@ -0,0 +1,9 @@
+; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s
+
+; CHECK-LABEL: llvm.func @reciprocal_estimates()
+; CHECK-SAME: reciprocal_estimates = "all"
+define void @reciprocal_estimates() #0 {
+ ret void
+}
+
+attributes #0 = { "reciprocal-estimat
@@ -1549,6 +1549,9 @@ LogicalResult
ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
if (auto tuneCpu = func.getTuneCpu())
llvmFunc->addFnAttr("tune-cpu", *tuneCpu);
+ if (auto reciprocalEstimates = func.getReciprocalEstimates())
mcinally wrote
@@ -0,0 +1,9 @@
+; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s
+
+; CHECK-LABEL: llvm.func @reciprocal_estimates()
+; CHECK-SAME: reciprocal_estimates = "all"
+define void @reciprocal_estimates() #0 {
+ ret void
+}
+
+attributes #0 = { "reciprocal-estimat
@@ -1549,6 +1549,9 @@ LogicalResult
ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
if (auto tuneCpu = func.getTuneCpu())
llvmFunc->addFnAttr("tune-cpu", *tuneCpu);
+ if (auto reciprocalEstimates = func.getReciprocalEstimates())
tarunprabhu wr
@@ -2636,6 +2636,11 @@ void
ModuleImport::processFunctionAttributes(llvm::Function *func,
funcOp.setTargetFeaturesAttr(
LLVM::TargetFeaturesAttr::get(context, attr.getValueAsString()));
+ if (llvm::Attribute attr = func->getFnAttribute("reciprocal-estimates");
+
https://github.com/tarunprabhu edited
https://github.com/llvm/llvm-project/pull/143418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -56,6 +56,9 @@ class CodeGenOptions : public CodeGenOptionsBase {
// The prefered vector width, if requested by -mprefer-vector-width.
std::string PreferVectorWidth;
+ // List of reciprocal estimate sub-options.
tarunprabhu wrote:
Should this be a doc
@@ -3189,3 +3189,144 @@ StringRef
tools::ParseMPreferVectorWidthOption(clang::DiagnosticsEngine &Diags,
return Value;
}
+
+// This is a helper function for validating the optional refinement step
+// parameter in reciprocal argument strings. Return false if there is an erro
https://github.com/tarunprabhu commented:
Thanks for this. Just some minor comments.
https://github.com/llvm/llvm-project/pull/143418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vzakhari approved this pull request.
Looks great! Thank you, Cameron!
https://github.com/llvm/llvm-project/pull/143418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
llvmbot wrote:
@llvm/pr-subscribers-flang-driver
Author: Cameron McInally (mcinally)
Changes
This patch adds support for the -mrecip command line option. The parsing of
this options is equivalent to Clang's and it is implemented by setting the
"reciprocal-estimates" function attribute.
llvmbot wrote:
@llvm/pr-subscribers-mlir
Author: Cameron McInally (mcinally)
Changes
This patch adds support for the -mrecip command line option. The parsing of
this options is equivalent to Clang's and it is implemented by setting the
"reciprocal-estimates" function attribute.
Also mov
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Cameron McInally (mcinally)
Changes
This patch adds support for the -mrecip command line option. The parsing of
this options is equivalent to Clang's and it is implemented by setting the
"reciprocal-estimates" function attribute.
Also mo
https://github.com/mcinally created
https://github.com/llvm/llvm-project/pull/143418
This patch adds support for the -mrecip command line option. The parsing of
this options is equivalent to Clang's and it is implemented by setting the
"reciprocal-estimates" function attribute.
Also move the
22 matches
Mail list logo