[flang-commits] [flang] 219c14a - [Flang] Remove dead -mvscale-{min, max} logic from getVScaleRange. NFCI (#78133)
via flang-commits
flang-commits at lists.llvm.org
Mon Jan 15 09:20:39 PST 2024
Author: Luke Lau
Date: 2024-01-16T00:20:35+07:00
New Revision: 219c14a2609aaced2823f5a1b0a22584559bddad
URL: https://github.com/llvm/llvm-project/commit/219c14a2609aaced2823f5a1b0a22584559bddad
DIFF: https://github.com/llvm/llvm-project/commit/219c14a2609aaced2823f5a1b0a22584559bddad.diff
LOG: [Flang] Remove dead -mvscale-{min,max} logic from getVScaleRange. NFCI (#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.
Added:
Modified:
flang/lib/Frontend/FrontendActions.cpp
Removed:
################################################################################
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