Skip to content

Conversation

@nikic
Copy link
Contributor

@nikic nikic commented Sep 1, 2025

This removes the LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS cmake option and the -treat-scalable-fixed-error-as-warning opt flag.

We stopped treating these as warnings by default a long time ago (62f09d7), so I don't think it makes sense to retain these options at this point. Accessing a scalable TypeSize as fixed should always result in an error.

This removes the `LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS` cmake
option and the `-treat-scalable-fixed-error-as-warning` opt flag.

We stopped treating these as warnings by default a long time ago
(62f09d7), so I don't think it
makes sense to retain these options at this point. Accessing a
scalable TypeSize as fixed should always result in an error.
@llvmbot llvmbot added cmake Build system in general and CMake in particular backend:AArch64 llvm:support labels Sep 1, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 1, 2025

@llvm/pr-subscribers-backend-amdgpu

@llvm/pr-subscribers-llvm-support

Author: Nikita Popov (nikic)

Changes

This removes the LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS cmake option and the -treat-scalable-fixed-error-as-warning opt flag.

We stopped treating these as warnings by default a long time ago (62f09d7), so I don't think it makes sense to retain these options at this point. Accessing a scalable TypeSize as fixed should always result in an error.


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

10 Files Affected:

  • (modified) llvm/CMakeLists.txt (-12)
  • (modified) llvm/cmake/modules/HandleLLVMOptions.cmake (-4)
  • (modified) llvm/include/llvm/CodeGen/ValueTypes.h (+1-1)
  • (modified) llvm/include/llvm/CodeGenTypes/LowLevelType.h (+1-1)
  • (modified) llvm/include/llvm/CodeGenTypes/MachineValueType.h (+1-1)
  • (modified) llvm/include/llvm/Support/TypeSize.h (-4)
  • (modified) llvm/lib/Support/CommandLine.cpp (-1)
  • (modified) llvm/lib/Support/DebugOptions.h (-1)
  • (modified) llvm/lib/Support/TypeSize.cpp (+2-38)
  • (modified) llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir (+1-1)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index a90be4f6235e6..3eb695665130d 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -706,18 +706,6 @@ endif()
 
 option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)
 
-# While adding scalable vector support to LLVM, we temporarily want to
-# allow an implicit conversion of TypeSize to uint64_t, and to allow
-# code to get the fixed number of elements from a possibly scalable vector.
-# This CMake flag enables a more strict mode where it asserts that the type
-# is not a scalable vector type.
-#
-# Enabling this flag makes it easier to find cases where the compiler makes
-# assumptions on the size being 'fixed size', when building tests for
-# SVE/SVE2 or other scalable vector architectures.
-option(LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS
-       "Enable assertions that type is not scalable in implicit conversion from TypeSize to uint64_t and calls to getNumElements" OFF)
-
 set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
   "Enable abi-breaking checks.  Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")
 
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 97aa1317bc218..a67543cdb668f 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -201,10 +201,6 @@ if (LLVM_USES_LIBSTDCXX)
   endif()
 endif()
 
-if (LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS)
-  add_compile_definitions(STRICT_FIXED_SIZE_VECTORS)
-endif()
-
 string(TOUPPER "${LLVM_ABI_BREAKING_CHECKS}" uppercase_LLVM_ABI_BREAKING_CHECKS)
 
 if( uppercase_LLVM_ABI_BREAKING_CHECKS STREQUAL "WITH_ASSERTS" )
diff --git a/llvm/include/llvm/CodeGen/ValueTypes.h b/llvm/include/llvm/CodeGen/ValueTypes.h
index 2a91cdc3ab134..43aaa2bcfc222 100644
--- a/llvm/include/llvm/CodeGen/ValueTypes.h
+++ b/llvm/include/llvm/CodeGen/ValueTypes.h
@@ -332,7 +332,7 @@ namespace llvm {
       assert(isVector() && "Invalid vector type!");
 
       if (isScalableVector())
-        llvm::reportInvalidSizeRequest(
+        llvm::reportFatalInternalError(
             "Possible incorrect use of EVT::getVectorNumElements() for "
             "scalable vector. Scalable flag may be dropped, use "
             "EVT::getVectorElementCount() instead");
diff --git a/llvm/include/llvm/CodeGenTypes/LowLevelType.h b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
index d8e0848aff84d..4c1fe13790011 100644
--- a/llvm/include/llvm/CodeGenTypes/LowLevelType.h
+++ b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
@@ -159,7 +159,7 @@ class LLT {
   /// vector types.
   constexpr uint16_t getNumElements() const {
     if (isScalable())
-      llvm::reportInvalidSizeRequest(
+      llvm::reportFatalInternalError(
           "Possible incorrect use of LLT::getNumElements() for "
           "scalable vector. Scalable flag may be dropped, use "
           "LLT::getElementCount() instead");
diff --git a/llvm/include/llvm/CodeGenTypes/MachineValueType.h b/llvm/include/llvm/CodeGenTypes/MachineValueType.h
index b8e91a022ec5e..389bae209f406 100644
--- a/llvm/include/llvm/CodeGenTypes/MachineValueType.h
+++ b/llvm/include/llvm/CodeGenTypes/MachineValueType.h
@@ -294,7 +294,7 @@ namespace llvm {
 
     unsigned getVectorNumElements() const {
       if (isScalableVector())
-        llvm::reportInvalidSizeRequest(
+        llvm::reportFatalInternalError(
             "Possible incorrect use of MVT::getVectorNumElements() for "
             "scalable vector. Scalable flag may be dropped, use "
             "MVT::getVectorElementCount() instead");
diff --git a/llvm/include/llvm/Support/TypeSize.h b/llvm/include/llvm/Support/TypeSize.h
index 96425291aaedb..b6926e6fdeeb6 100644
--- a/llvm/include/llvm/Support/TypeSize.h
+++ b/llvm/include/llvm/Support/TypeSize.h
@@ -26,10 +26,6 @@
 
 namespace llvm {
 
-/// Reports a diagnostic message to indicate an invalid size request has been
-/// done on a scalable vector. This function may not return.
-LLVM_ABI void reportInvalidSizeRequest(const char *Msg);
-
 /// StackOffset holds a fixed and a scalable offset in bytes.
 class StackOffset {
   int64_t Fixed = 0;
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 8491633df97e8..be232f5bff587 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -2671,7 +2671,6 @@ static void initCommonOptions() {
   initSignalsOptions();
   initStatisticOptions();
   initTimerOptions();
-  initTypeSizeOptions();
   initWithColorOptions();
   initDebugOptions();
   initRandomSeedOptions();
diff --git a/llvm/lib/Support/DebugOptions.h b/llvm/lib/Support/DebugOptions.h
index db727d5a584cb..6c3382e8f858d 100644
--- a/llvm/lib/Support/DebugOptions.h
+++ b/llvm/lib/Support/DebugOptions.h
@@ -24,7 +24,6 @@ void initGraphWriterOptions();
 void initSignalsOptions();
 void initStatisticOptions();
 void initTimerOptions();
-void initTypeSizeOptions();
 void initWithColorOptions();
 void initDebugOptions();
 void initRandomSeedOptions();
diff --git a/llvm/lib/Support/TypeSize.cpp b/llvm/lib/Support/TypeSize.cpp
index 43346b81cd676..3dbb00880faca 100644
--- a/llvm/lib/Support/TypeSize.cpp
+++ b/llvm/lib/Support/TypeSize.cpp
@@ -7,49 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/TypeSize.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/ManagedStatic.h"
-#include "llvm/Support/WithColor.h"
-
-#include "DebugOptions.h"
+#include "llvm/Support/Error.h"
 
 using namespace llvm;
 
-#ifndef STRICT_FIXED_SIZE_VECTORS
-namespace {
-struct CreateScalableErrorAsWarning {
-  /// The ScalableErrorAsWarning is a temporary measure to suppress errors from
-  /// using the wrong interface on a scalable vector.
-  static void *call() {
-    return new cl::opt<bool>(
-        "treat-scalable-fixed-error-as-warning", cl::Hidden,
-        cl::desc(
-            "Treat issues where a fixed-width property is requested from a "
-            "scalable type as a warning, instead of an error"));
-  }
-};
-} // namespace
-static ManagedStatic<cl::opt<bool>, CreateScalableErrorAsWarning>
-    ScalableErrorAsWarning;
-void llvm::initTypeSizeOptions() { *ScalableErrorAsWarning; }
-#else
-void llvm::initTypeSizeOptions() {}
-#endif
-
-void llvm::reportInvalidSizeRequest(const char *Msg) {
-#ifndef STRICT_FIXED_SIZE_VECTORS
-  if (*ScalableErrorAsWarning) {
-    WithColor::warning() << "Invalid size request on a scalable vector; " << Msg
-                         << "\n";
-    return;
-  }
-#endif
-  report_fatal_error("Invalid size request on a scalable vector.");
-}
-
 TypeSize::operator TypeSize::ScalarTy() const {
   if (isScalable()) {
-    reportInvalidSizeRequest(
+    reportFatalInternalError(
         "Cannot implicitly convert a scalable size to a fixed-width size in "
         "`TypeSize::operator ScalarTy()`");
     return getKnownMinValue();
diff --git a/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir b/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir
index 4d8067e16b964..61e3c73a3ee53 100644
--- a/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir
+++ b/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir
@@ -1,4 +1,4 @@
-# RUN: llc --verify-machineinstrs -mtriple=aarch64 -o - %s -mcpu=a64fx -aarch64-enable-pipeliner -pipeliner-max-mii=100 -pipeliner-enable-copytophi=0 -debug-only=pipeliner -run-pass=pipeliner -treat-scalable-fixed-error-as-warning 2>&1 | FileCheck %s
+# RUN: llc --verify-machineinstrs -mtriple=aarch64 -o - %s -mcpu=a64fx -aarch64-enable-pipeliner -pipeliner-max-mii=100 -pipeliner-enable-copytophi=0 -debug-only=pipeliner -run-pass=pipeliner 2>&1 | FileCheck %s
 
 # REQUIRES: asserts
 

@llvmbot
Copy link
Member

llvmbot commented Sep 1, 2025

@llvm/pr-subscribers-backend-aarch64

Author: Nikita Popov (nikic)

Changes

This removes the LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS cmake option and the -treat-scalable-fixed-error-as-warning opt flag.

We stopped treating these as warnings by default a long time ago (62f09d7), so I don't think it makes sense to retain these options at this point. Accessing a scalable TypeSize as fixed should always result in an error.


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

10 Files Affected:

  • (modified) llvm/CMakeLists.txt (-12)
  • (modified) llvm/cmake/modules/HandleLLVMOptions.cmake (-4)
  • (modified) llvm/include/llvm/CodeGen/ValueTypes.h (+1-1)
  • (modified) llvm/include/llvm/CodeGenTypes/LowLevelType.h (+1-1)
  • (modified) llvm/include/llvm/CodeGenTypes/MachineValueType.h (+1-1)
  • (modified) llvm/include/llvm/Support/TypeSize.h (-4)
  • (modified) llvm/lib/Support/CommandLine.cpp (-1)
  • (modified) llvm/lib/Support/DebugOptions.h (-1)
  • (modified) llvm/lib/Support/TypeSize.cpp (+2-38)
  • (modified) llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir (+1-1)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index a90be4f6235e6..3eb695665130d 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -706,18 +706,6 @@ endif()
 
 option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)
 
-# While adding scalable vector support to LLVM, we temporarily want to
-# allow an implicit conversion of TypeSize to uint64_t, and to allow
-# code to get the fixed number of elements from a possibly scalable vector.
-# This CMake flag enables a more strict mode where it asserts that the type
-# is not a scalable vector type.
-#
-# Enabling this flag makes it easier to find cases where the compiler makes
-# assumptions on the size being 'fixed size', when building tests for
-# SVE/SVE2 or other scalable vector architectures.
-option(LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS
-       "Enable assertions that type is not scalable in implicit conversion from TypeSize to uint64_t and calls to getNumElements" OFF)
-
 set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
   "Enable abi-breaking checks.  Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")
 
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 97aa1317bc218..a67543cdb668f 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -201,10 +201,6 @@ if (LLVM_USES_LIBSTDCXX)
   endif()
 endif()
 
-if (LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS)
-  add_compile_definitions(STRICT_FIXED_SIZE_VECTORS)
-endif()
-
 string(TOUPPER "${LLVM_ABI_BREAKING_CHECKS}" uppercase_LLVM_ABI_BREAKING_CHECKS)
 
 if( uppercase_LLVM_ABI_BREAKING_CHECKS STREQUAL "WITH_ASSERTS" )
diff --git a/llvm/include/llvm/CodeGen/ValueTypes.h b/llvm/include/llvm/CodeGen/ValueTypes.h
index 2a91cdc3ab134..43aaa2bcfc222 100644
--- a/llvm/include/llvm/CodeGen/ValueTypes.h
+++ b/llvm/include/llvm/CodeGen/ValueTypes.h
@@ -332,7 +332,7 @@ namespace llvm {
       assert(isVector() && "Invalid vector type!");
 
       if (isScalableVector())
-        llvm::reportInvalidSizeRequest(
+        llvm::reportFatalInternalError(
             "Possible incorrect use of EVT::getVectorNumElements() for "
             "scalable vector. Scalable flag may be dropped, use "
             "EVT::getVectorElementCount() instead");
diff --git a/llvm/include/llvm/CodeGenTypes/LowLevelType.h b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
index d8e0848aff84d..4c1fe13790011 100644
--- a/llvm/include/llvm/CodeGenTypes/LowLevelType.h
+++ b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
@@ -159,7 +159,7 @@ class LLT {
   /// vector types.
   constexpr uint16_t getNumElements() const {
     if (isScalable())
-      llvm::reportInvalidSizeRequest(
+      llvm::reportFatalInternalError(
           "Possible incorrect use of LLT::getNumElements() for "
           "scalable vector. Scalable flag may be dropped, use "
           "LLT::getElementCount() instead");
diff --git a/llvm/include/llvm/CodeGenTypes/MachineValueType.h b/llvm/include/llvm/CodeGenTypes/MachineValueType.h
index b8e91a022ec5e..389bae209f406 100644
--- a/llvm/include/llvm/CodeGenTypes/MachineValueType.h
+++ b/llvm/include/llvm/CodeGenTypes/MachineValueType.h
@@ -294,7 +294,7 @@ namespace llvm {
 
     unsigned getVectorNumElements() const {
       if (isScalableVector())
-        llvm::reportInvalidSizeRequest(
+        llvm::reportFatalInternalError(
             "Possible incorrect use of MVT::getVectorNumElements() for "
             "scalable vector. Scalable flag may be dropped, use "
             "MVT::getVectorElementCount() instead");
diff --git a/llvm/include/llvm/Support/TypeSize.h b/llvm/include/llvm/Support/TypeSize.h
index 96425291aaedb..b6926e6fdeeb6 100644
--- a/llvm/include/llvm/Support/TypeSize.h
+++ b/llvm/include/llvm/Support/TypeSize.h
@@ -26,10 +26,6 @@
 
 namespace llvm {
 
-/// Reports a diagnostic message to indicate an invalid size request has been
-/// done on a scalable vector. This function may not return.
-LLVM_ABI void reportInvalidSizeRequest(const char *Msg);
-
 /// StackOffset holds a fixed and a scalable offset in bytes.
 class StackOffset {
   int64_t Fixed = 0;
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 8491633df97e8..be232f5bff587 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -2671,7 +2671,6 @@ static void initCommonOptions() {
   initSignalsOptions();
   initStatisticOptions();
   initTimerOptions();
-  initTypeSizeOptions();
   initWithColorOptions();
   initDebugOptions();
   initRandomSeedOptions();
diff --git a/llvm/lib/Support/DebugOptions.h b/llvm/lib/Support/DebugOptions.h
index db727d5a584cb..6c3382e8f858d 100644
--- a/llvm/lib/Support/DebugOptions.h
+++ b/llvm/lib/Support/DebugOptions.h
@@ -24,7 +24,6 @@ void initGraphWriterOptions();
 void initSignalsOptions();
 void initStatisticOptions();
 void initTimerOptions();
-void initTypeSizeOptions();
 void initWithColorOptions();
 void initDebugOptions();
 void initRandomSeedOptions();
diff --git a/llvm/lib/Support/TypeSize.cpp b/llvm/lib/Support/TypeSize.cpp
index 43346b81cd676..3dbb00880faca 100644
--- a/llvm/lib/Support/TypeSize.cpp
+++ b/llvm/lib/Support/TypeSize.cpp
@@ -7,49 +7,13 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/TypeSize.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/ManagedStatic.h"
-#include "llvm/Support/WithColor.h"
-
-#include "DebugOptions.h"
+#include "llvm/Support/Error.h"
 
 using namespace llvm;
 
-#ifndef STRICT_FIXED_SIZE_VECTORS
-namespace {
-struct CreateScalableErrorAsWarning {
-  /// The ScalableErrorAsWarning is a temporary measure to suppress errors from
-  /// using the wrong interface on a scalable vector.
-  static void *call() {
-    return new cl::opt<bool>(
-        "treat-scalable-fixed-error-as-warning", cl::Hidden,
-        cl::desc(
-            "Treat issues where a fixed-width property is requested from a "
-            "scalable type as a warning, instead of an error"));
-  }
-};
-} // namespace
-static ManagedStatic<cl::opt<bool>, CreateScalableErrorAsWarning>
-    ScalableErrorAsWarning;
-void llvm::initTypeSizeOptions() { *ScalableErrorAsWarning; }
-#else
-void llvm::initTypeSizeOptions() {}
-#endif
-
-void llvm::reportInvalidSizeRequest(const char *Msg) {
-#ifndef STRICT_FIXED_SIZE_VECTORS
-  if (*ScalableErrorAsWarning) {
-    WithColor::warning() << "Invalid size request on a scalable vector; " << Msg
-                         << "\n";
-    return;
-  }
-#endif
-  report_fatal_error("Invalid size request on a scalable vector.");
-}
-
 TypeSize::operator TypeSize::ScalarTy() const {
   if (isScalable()) {
-    reportInvalidSizeRequest(
+    reportFatalInternalError(
         "Cannot implicitly convert a scalable size to a fixed-width size in "
         "`TypeSize::operator ScalarTy()`");
     return getKnownMinValue();
diff --git a/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir b/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir
index 4d8067e16b964..61e3c73a3ee53 100644
--- a/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir
+++ b/llvm/test/CodeGen/AArch64/sms-order-physreg-deps.mir
@@ -1,4 +1,4 @@
-# RUN: llc --verify-machineinstrs -mtriple=aarch64 -o - %s -mcpu=a64fx -aarch64-enable-pipeliner -pipeliner-max-mii=100 -pipeliner-enable-copytophi=0 -debug-only=pipeliner -run-pass=pipeliner -treat-scalable-fixed-error-as-warning 2>&1 | FileCheck %s
+# RUN: llc --verify-machineinstrs -mtriple=aarch64 -o - %s -mcpu=a64fx -aarch64-enable-pipeliner -pipeliner-max-mii=100 -pipeliner-enable-copytophi=0 -debug-only=pipeliner -run-pass=pipeliner 2>&1 | FileCheck %s
 
 # REQUIRES: asserts
 

nikic added a commit to nikic/llvm-zorg that referenced this pull request Sep 1, 2025
This is already the default, and I'm dropping this option in
llvm/llvm-project#156336.
@DavidSpickett
Copy link
Collaborator

Linaro has buildbots using this option, for example https://github.com/llvm/llvm-zorg/blob/2b44506b85cf6d604d36e8b8c882a35cbf508d3f/buildbot/osuosl/master/config/builders.py#L481.

We did so at the request of Arm, so if the reviewers here agree with this change I will do the changes for llvm-zorg.

I would appreciate it if we could get the buildbot changes live first (as this takes a few days usually) and then merge this change.

A very small point in favour of this change, it would remove a ton of warnings from the buildbots. Since we get a lot of "option unused" when doing linking via. clang.

@DavidSpickett
Copy link
Collaborator

Oh and I see you just posted a zorg PR :) Thanks!

Copy link
Collaborator

@sdesmalen-arm sdesmalen-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how scalable vector support has matured in LLVM over the past few years and that Clang has stopped demoting these errors for a while now, it makes sense for this code to be removed.

nikic added a commit to llvm/llvm-zorg that referenced this pull request Sep 1, 2025
@nikic
Copy link
Contributor Author

nikic commented Sep 2, 2025

I believe the buildbot changes should be deployed now (though the buildbots are broken for an unrelated reason). We can revert this if I'm wrong about that...

@nikic nikic merged commit 8f59a94 into llvm:main Sep 2, 2025
10 checks passed
@nikic nikic deleted the remove-type-size-opt branch September 2, 2025 07:10
nikic added a commit that referenced this pull request Sep 2, 2025
#156336)"

This reverts commit 8f59a94.

Failed on clang-aarch64-sve-vls-2stage, which still uses the option.
@nikic
Copy link
Contributor Author

nikic commented Sep 2, 2025

I believe the buildbot changes should be deployed now (though the buildbots are broken for an unrelated reason). We can revert this if I'm wrong about that...

And reverted. I assumed the fact that buildbot was down all of yesterday would surely require a restart, but apparently that was not right. How can you find out which configuration buildbot currently uses?

@DavidSpickett
Copy link
Collaborator

That was my first thought too but I suspect it's got some sort of staging branch in case of problems with main.

The bot is currently configuring stage 2 with:

cmake -G Ninja ../llvm/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=True '-DLLVM_LIT_ARGS='"'"'-v'"'"'' -DCMAKE_INSTALL_PREFIX=../stage2.install '-DCMAKE_C_FLAGS='"'"'-mcpu=neoverse-512tvb -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' '-DCMAKE_CXX_FLAGS='"'"'-mcpu=neoverse-512tvb -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false'"'"'' -DLLVM_ENABLE_LLD=True -DMLIR_INCLUDE_INTEGRATION_TESTS=True -DMLIR_RUN_ARM_SVE_TESTS=True '-DLLVM_ENABLE_PROJECTS=flang;mlir;clang;clang-tools-extra;lld;llvm' '-DLLVM_ENABLE_RUNTIMES=compiler-rt;flang-rt' -DCMAKE_C_COMPILER=/home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/stage1.install/bin/clang -DCMAKE_CXX_COMPILER=/home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/stage1.install/bin/clang++

https://lab.llvm.org/buildbot/#/builders/41/builds/8602/steps/10/logs/stdio

Which includes the flag.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 2, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building llvm at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/20838

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/2/12 (3651 of 3660)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/4/12 (3652 of 3660)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/5/12 (3653 of 3660)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/6/12 (3654 of 3660)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/7/12 (3655 of 3660)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/8/12 (3656 of 3660)
PASS: lldb-unit :: ValueObject/./LLDBValueObjectTests/9/12 (3657 of 3660)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/1/2 (3658 of 3660)
PASS: lldb-unit :: tools/lldb-server/tests/./LLDBServerTests/0/2 (3659 of 3660)
TIMEOUT: lldb-api :: tools/lldb-dap/module/TestDAP_module.py (3660 of 3660)
******************** TEST 'lldb-api :: tools/lldb-dap/module/TestDAP_module.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --cmake-build-type Release /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/module -p TestDAP_module.py
--
Exit Code: -9
Timeout: Reached timeout of 600 seconds

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 8f59a946740bf8dbe2574b33eaa431fde3ce9204)
  clang revision 8f59a946740bf8dbe2574b33eaa431fde3ce9204
  llvm revision 8f59a946740bf8dbe2574b33eaa431fde3ce9204

--
Command Output (stderr):
--
========= DEBUG ADAPTER PROTOCOL LOGS =========
1756802794.284048080 (stdio) --> {"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true,"supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"$__lldb_sourceInitFile":false},"seq":1}
1756802794.284218788 (stdio) queued (command=initialize seq=1)
1756802794.288219213 (stdio) <-- {"body":{"$__lldb_version":"lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 8f59a946740bf8dbe2574b33eaa431fde3ce9204)\n  clang revision 8f59a946740bf8dbe2574b33eaa431fde3ce9204\n  llvm revision 8f59a946740bf8dbe2574b33eaa431fde3ce9204","completionTriggerCharacters":["."," ","\t"],"exceptionBreakpointFilters":[{"description":"C++ Catch","filter":"cpp_catch","label":"C++ Catch","supportsCondition":true},{"description":"C++ Throw","filter":"cpp_throw","label":"C++ Throw","supportsCondition":true},{"description":"Objective-C Catch","filter":"objc_catch","label":"Objective-C Catch","supportsCondition":true},{"description":"Objective-C Throw","filter":"objc_throw","label":"Objective-C Throw","supportsCondition":true}],"supportTerminateDebuggee":true,"supportsBreakpointLocationsRequest":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionFilterOptions":true,"supportsExceptionInfoRequest":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsModuleSymbolsRequest":true,"supportsModulesRequest":true,"supportsReadMemoryRequest":true,"supportsSetVariable":true,"supportsSteppingGranularity":true,"supportsValueFormattingOptions":true,"supportsWriteMemoryRequest":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
1756802794.288690090 (stdio) --> {"command":"launch","type":"request","arguments":{"program":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/module/TestDAP_module.test_compile_units/a.out","initCommands":["settings clear --all","settings set symbols.enable-external-lookup false","settings set target.inherit-tcc true","settings set target.disable-aslr false","settings set target.detach-on-error false","settings set target.auto-apply-fixits false","settings set plugin.process.gdb-remote.packet-timeout 60","settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"","settings set use-color false","settings set show-statusline false"],"disableASLR":false,"enableAutoVariableSummaries":false,"enableSyntheticChildDebugging":false,"displayExtendedBacktrace":false},"seq":2}
1756802794.288743019 (stdio) queued (command=launch seq=2)
1756802794.289165974 (stdio) <-- {"body":{"category":"console","output":"Running initCommands:\n"},"event":"output","seq":0,"type":"event"}
1756802794.289210558 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings clear --all\n"},"event":"output","seq":0,"type":"event"}
1756802794.289224386 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set symbols.enable-external-lookup false\n"},"event":"output","seq":0,"type":"event"}
1756802794.289237738 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.inherit-tcc true\n"},"event":"output","seq":0,"type":"event"}
1756802794.289250612 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.disable-aslr false\n"},"event":"output","seq":0,"type":"event"}
1756802794.289263010 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.detach-on-error false\n"},"event":"output","seq":0,"type":"event"}
1756802794.289275408 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set target.auto-apply-fixits false\n"},"event":"output","seq":0,"type":"event"}
1756802794.289306641 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n"},"event":"output","seq":0,"type":"event"}
1756802794.289320946 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n"},"event":"output","seq":0,"type":"event"}
1756802794.289335728 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set use-color false\n"},"event":"output","seq":0,"type":"event"}
1756802794.289347649 (stdio) <-- {"body":{"category":"console","output":"(lldb) settings set show-statusline false\n"},"event":"output","seq":0,"type":"event"}
1756802795.008482218 (stdio) <-- {"command":"launch","request_seq":2,"seq":0,"success":true,"type":"response"}
1756802795.009196520 (stdio) <-- {"event":"initialized","seq":0,"type":"event"}
1756802795.011866570 (stdio) --> {"command":"setBreakpoints","type":"request","arguments":{"source":{"path":"main.cpp"},"sourceModified":false,"lines":[5],"breakpoints":[{"line":5}]},"seq":3}
1756802795.012874126 (stdio) <-- {"body":{"module":{"addressRange":"0xf13d8000","debugInfoSize":"983.3KB","id":"253BA35E-436C-EC85-2949-CBD09E38AFEE-11B460BF","name":"ld-linux-armhf.so.3","path":"/usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3","symbolFilePath":"/usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3","symbolStatus":"Symbols loaded."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1756802795.013911963 (stdio) queued (command=setBreakpoints seq=3)

@DavidSpickett
Copy link
Collaborator

We also need llvm/llvm-zorg#586 to correct a different problem, so I've emailed Galina to ask for a restart that includes that and your zorg change. This may take longer than usual depending on what the problem behind the scenes was.

@DavidSpickett
Copy link
Collaborator

You can reland this now, the bots have updated.

nikic added a commit that referenced this pull request Sep 3, 2025
#156336)

Reapplying now that buildbot has picked up the new configuration
that does not use -treat-scalable-fixed-error-as-warning.

-----

This removes the `LLVM_ENABLE_STRICT_FIXED_SIZE_VECTORS` cmake option
and the `-treat-scalable-fixed-error-as-warning` opt flag.

We stopped treating these as warnings by default a long time ago
(62f09d7), so I don't think it makes
sense to retain these options at this point. Accessing a scalable
TypeSize as fixed should always result in an error.
nikic added a commit to nikic/llvm-project that referenced this pull request Sep 8, 2025
After llvm#156336 this cast operator has become trivial, so inline it
into the header. This is a minor compile-time improvement.
nikic added a commit that referenced this pull request Sep 8, 2025
After #156336 this cast operator has become trivial, so inline it into
the header. This is a minor compile-time improvement.
vvereschaka pushed a commit to vvereschaka/llvm-zorg that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:AArch64 backend:AMDGPU cmake Build system in general and CMake in particular llvm:support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants