[flang-commits] [flang] [Flang] Remove dead -mvscale-{min, max} logic from getVScaleRange. NFCI (PR #78133)
Luke Lau via flang-commits
flang-commits at lists.llvm.org
Mon Jan 15 01:28:05 PST 2024
https://github.com/lukel97 created https://github.com/llvm/llvm-project/pull/78133
After #77905, setting -mvscale-min or -mvscale-max on targets other than
AArch64 and RISC-V should be an error now, so we no longer need this
target-agnostic code in getVScaleRange.
>From fb777f4a990f77cad22be43ceff4a871fa9ca0ed Mon Sep 17 00:00:00 2001
From: Luke Lau <luke at igalia.com>
Date: Mon, 15 Jan 2024 16:25:01 +0700
Subject: [PATCH] [Flang] Remove dead -mvscale-{min,max} logic from
getVScaleRange. NFCI
After #77905, setting -mvscale-min or -mvscale-max on targets other than
AArch64 and RISC-V should be an error now, so we no longer need this
target-agnostic code in getVScaleRange.
---
flang/lib/Frontend/FrontendActions.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp
index 8fb1998f01703a..74e3992d5ab62b 100644
--- a/flang/lib/Frontend/FrontendActions.cpp
+++ b/flang/lib/Frontend/FrontendActions.cpp
@@ -769,7 +769,6 @@ getRISCVVScaleRange(CompilerInstance &ci) {
// too much of clang, so for now, replicate the functionality.
static std::optional<std::pair<unsigned, unsigned>>
getVScaleRange(CompilerInstance &ci) {
- const auto &langOpts = ci.getInvocation().getLangOpts();
const llvm::Triple triple(ci.getInvocation().getTargetOpts().triple);
if (triple.isAArch64())
@@ -777,10 +776,8 @@ getVScaleRange(CompilerInstance &ci) {
if (triple.isRISCV())
return getRISCVVScaleRange(ci);
- if (langOpts.VScaleMin || langOpts.VScaleMax)
- return std::pair<unsigned, unsigned>(
- langOpts.VScaleMin ? langOpts.VScaleMin : 1, langOpts.VScaleMax);
-
+ // All other architectures that don't support scalable vectors (i.e. don't
+ // need vscale)
return std::nullopt;
}
More information about the flang-commits
mailing list