Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Nov 14, 2025

After the base branch was moved to main, this somehow ended up
adding a second definition of RTLCI, instead of modifying the
existing one.

Also fix other build error with gcc bots.

Copy link
Contributor Author

arsenm commented Nov 14, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm marked this pull request as ready for review November 14, 2025 19:48
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:codegen IR generation bugs: mangling, exceptions, etc. llvm:codegen labels Nov 14, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 14, 2025

@llvm/pr-subscribers-clang-codegen

Author: Matt Arsenault (arsenm)

Changes

After the base branch was moved to main, this somehow ended up
adding a second definition of RTLCI, instead of modifying the
existing one.

Also fix other build error with gcc bots.


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

4 Files Affected:

  • (modified) clang/lib/CodeGen/BackendUtil.cpp (+9-9)
  • (modified) llvm/include/llvm/Target/TargetOptions.h (+1-1)
  • (modified) llvm/lib/CodeGen/CommandFlags.cpp (+1-1)
  • (modified) llvm/tools/opt/optdriver.cpp (-5)
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index f1e20403ad668..6f63e6470270e 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -483,31 +483,31 @@ static bool initTargetOptions(const CompilerInstance &CI,
 
   switch (CodeGenOpts.getVecLib()) {
   case llvm::driver::VectorLibrary::NoLibrary:
-    Options.VectorLibrary = llvm::VectorLibrary::NoLibrary;
+    Options.VecLib = llvm::VectorLibrary::NoLibrary;
     break;
   case llvm::driver::VectorLibrary::Accelerate:
-    Options.VectorLibrary = llvm::VectorLibrary::Accelerate;
+    Options.VecLib = llvm::VectorLibrary::Accelerate;
     break;
   case llvm::driver::VectorLibrary::Darwin_libsystem_m:
-    Options.VectorLibrary = llvm::VectorLibrary::DarwinLibSystemM;
+    Options.VecLib = llvm::VectorLibrary::DarwinLibSystemM;
     break;
   case llvm::driver::VectorLibrary::LIBMVEC:
-    Options.VectorLibrary = llvm::VectorLibrary::LIBMVEC;
+    Options.VecLib = llvm::VectorLibrary::LIBMVEC;
     break;
   case llvm::driver::VectorLibrary::MASSV:
-    Options.VectorLibrary = llvm::VectorLibrary::MASSV;
+    Options.VecLib = llvm::VectorLibrary::MASSV;
     break;
   case llvm::driver::VectorLibrary::SVML:
-    Options.VectorLibrary = llvm::VectorLibrary::SVML;
+    Options.VecLib = llvm::VectorLibrary::SVML;
     break;
   case llvm::driver::VectorLibrary::SLEEF:
-    Options.VectorLibrary = llvm::VectorLibrary::SLEEFGNUABI;
+    Options.VecLib = llvm::VectorLibrary::SLEEFGNUABI;
     break;
   case llvm::driver::VectorLibrary::ArmPL:
-    Options.VectorLibrary = llvm::VectorLibrary::ArmPL;
+    Options.VecLib = llvm::VectorLibrary::ArmPL;
     break;
   case llvm::driver::VectorLibrary::AMDLIBM:
-    Options.VectorLibrary = llvm::VectorLibrary::AMDLIBM;
+    Options.VecLib = llvm::VectorLibrary::AMDLIBM;
     break;
   }
 
diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h
index b9258c0fee692..0312515d11798 100644
--- a/llvm/include/llvm/Target/TargetOptions.h
+++ b/llvm/include/llvm/Target/TargetOptions.h
@@ -411,7 +411,7 @@ class TargetOptions {
   DebuggerKind DebuggerTuning = DebuggerKind::Default;
 
   /// Vector math library to use.
-  VectorLibrary VectorLibrary = VectorLibrary::NoLibrary;
+  VectorLibrary VecLib = VectorLibrary::NoLibrary;
 
 private:
   /// Flushing mode to assume in default FP environment.
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp
index 02a6bb9357ad0..8f92ee30e221a 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -632,7 +632,7 @@ codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) {
   Options.EnableTLSDESC =
       getExplicitEnableTLSDESC().value_or(TheTriple.hasDefaultTLSDESC());
   Options.ExceptionModel = getExceptionModel();
-  Options.VectorLibrary = getVectorLibrary();
+  Options.VecLib = getVectorLibrary();
   Options.EmitStackSizeSection = getEnableStackSizeSection();
   Options.EnableMachineFunctionSplitter = getEnableMachineFunctionSplitter();
   Options.EnableStaticDataPartitioning = getEnableStaticDataPartitioning();
diff --git a/llvm/tools/opt/optdriver.cpp b/llvm/tools/opt/optdriver.cpp
index c65cae54b9530..d24c8abef31d0 100644
--- a/llvm/tools/opt/optdriver.cpp
+++ b/llvm/tools/opt/optdriver.cpp
@@ -680,11 +680,6 @@ optMain(int argc, char **argv,
                                    "", // FIXME: Get ABI name from MCOptions
                                    VecLib);
 
-  // FIXME: Get ABI name from MCOptions
-  RTLIB::RuntimeLibcallsInfo RTLCI(ModuleTriple, codegen::getExceptionModel(),
-                                   codegen::getFloatABIForCalls(),
-                                   codegen::getEABIVersion());
-
   // The -disable-simplify-libcalls flag actually disables all builtin optzns.
   if (DisableSimplifyLibCalls)
     TLII.disableAllFunctions();

@llvmbot
Copy link
Member

llvmbot commented Nov 14, 2025

@llvm/pr-subscribers-clang

Author: Matt Arsenault (arsenm)

Changes

After the base branch was moved to main, this somehow ended up
adding a second definition of RTLCI, instead of modifying the
existing one.

Also fix other build error with gcc bots.


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

4 Files Affected:

  • (modified) clang/lib/CodeGen/BackendUtil.cpp (+9-9)
  • (modified) llvm/include/llvm/Target/TargetOptions.h (+1-1)
  • (modified) llvm/lib/CodeGen/CommandFlags.cpp (+1-1)
  • (modified) llvm/tools/opt/optdriver.cpp (-5)
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index f1e20403ad668..6f63e6470270e 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -483,31 +483,31 @@ static bool initTargetOptions(const CompilerInstance &CI,
 
   switch (CodeGenOpts.getVecLib()) {
   case llvm::driver::VectorLibrary::NoLibrary:
-    Options.VectorLibrary = llvm::VectorLibrary::NoLibrary;
+    Options.VecLib = llvm::VectorLibrary::NoLibrary;
     break;
   case llvm::driver::VectorLibrary::Accelerate:
-    Options.VectorLibrary = llvm::VectorLibrary::Accelerate;
+    Options.VecLib = llvm::VectorLibrary::Accelerate;
     break;
   case llvm::driver::VectorLibrary::Darwin_libsystem_m:
-    Options.VectorLibrary = llvm::VectorLibrary::DarwinLibSystemM;
+    Options.VecLib = llvm::VectorLibrary::DarwinLibSystemM;
     break;
   case llvm::driver::VectorLibrary::LIBMVEC:
-    Options.VectorLibrary = llvm::VectorLibrary::LIBMVEC;
+    Options.VecLib = llvm::VectorLibrary::LIBMVEC;
     break;
   case llvm::driver::VectorLibrary::MASSV:
-    Options.VectorLibrary = llvm::VectorLibrary::MASSV;
+    Options.VecLib = llvm::VectorLibrary::MASSV;
     break;
   case llvm::driver::VectorLibrary::SVML:
-    Options.VectorLibrary = llvm::VectorLibrary::SVML;
+    Options.VecLib = llvm::VectorLibrary::SVML;
     break;
   case llvm::driver::VectorLibrary::SLEEF:
-    Options.VectorLibrary = llvm::VectorLibrary::SLEEFGNUABI;
+    Options.VecLib = llvm::VectorLibrary::SLEEFGNUABI;
     break;
   case llvm::driver::VectorLibrary::ArmPL:
-    Options.VectorLibrary = llvm::VectorLibrary::ArmPL;
+    Options.VecLib = llvm::VectorLibrary::ArmPL;
     break;
   case llvm::driver::VectorLibrary::AMDLIBM:
-    Options.VectorLibrary = llvm::VectorLibrary::AMDLIBM;
+    Options.VecLib = llvm::VectorLibrary::AMDLIBM;
     break;
   }
 
diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h
index b9258c0fee692..0312515d11798 100644
--- a/llvm/include/llvm/Target/TargetOptions.h
+++ b/llvm/include/llvm/Target/TargetOptions.h
@@ -411,7 +411,7 @@ class TargetOptions {
   DebuggerKind DebuggerTuning = DebuggerKind::Default;
 
   /// Vector math library to use.
-  VectorLibrary VectorLibrary = VectorLibrary::NoLibrary;
+  VectorLibrary VecLib = VectorLibrary::NoLibrary;
 
 private:
   /// Flushing mode to assume in default FP environment.
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp
index 02a6bb9357ad0..8f92ee30e221a 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -632,7 +632,7 @@ codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) {
   Options.EnableTLSDESC =
       getExplicitEnableTLSDESC().value_or(TheTriple.hasDefaultTLSDESC());
   Options.ExceptionModel = getExceptionModel();
-  Options.VectorLibrary = getVectorLibrary();
+  Options.VecLib = getVectorLibrary();
   Options.EmitStackSizeSection = getEnableStackSizeSection();
   Options.EnableMachineFunctionSplitter = getEnableMachineFunctionSplitter();
   Options.EnableStaticDataPartitioning = getEnableStaticDataPartitioning();
diff --git a/llvm/tools/opt/optdriver.cpp b/llvm/tools/opt/optdriver.cpp
index c65cae54b9530..d24c8abef31d0 100644
--- a/llvm/tools/opt/optdriver.cpp
+++ b/llvm/tools/opt/optdriver.cpp
@@ -680,11 +680,6 @@ optMain(int argc, char **argv,
                                    "", // FIXME: Get ABI name from MCOptions
                                    VecLib);
 
-  // FIXME: Get ABI name from MCOptions
-  RTLIB::RuntimeLibcallsInfo RTLCI(ModuleTriple, codegen::getExceptionModel(),
-                                   codegen::getFloatABIForCalls(),
-                                   codegen::getEABIVersion());
-
   // The -disable-simplify-libcalls flag actually disables all builtin optzns.
   if (DisableSimplifyLibCalls)
     TLII.disableAllFunctions();

After the base branch was moved to main, this somehow ended up
adding a second definition of RTLCI, instead of modifying the
existing one.

Also fix other build error with gcc bots.
@arsenm arsenm force-pushed the users/arsenm/build-fix-167996 branch from cac3e7b to 9f6826a Compare November 14, 2025 19:54
@arsenm arsenm merged commit 862d346 into main Nov 14, 2025
5 of 9 checks passed
@arsenm arsenm deleted the users/arsenm/build-fix-167996 branch November 14, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:codegen IR generation bugs: mangling, exceptions, etc. clang Clang issues not falling into any other category llvm:codegen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants