[flang-commits] [flang] [Flang] Remove dead -mvscale-{min, max} logic from getVScaleRange. NFCI (PR #78133)

via flang-commits flang-commits at lists.llvm.org
Mon Jan 15 01:28:34 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-driver

Author: Luke Lau (lukel97)

<details>
<summary>Changes</summary>

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.


---
Full diff: https://github.com/llvm/llvm-project/pull/78133.diff


1 Files Affected:

- (modified) flang/lib/Frontend/FrontendActions.cpp (+2-5) 


``````````diff
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;
 }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/78133


More information about the flang-commits mailing list