Skip to content

CodeGen: Move ABI option enums to support #142912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: users/arsenm/dag/move-runtime-libcalls-predicate-setting
Choose a base branch
from

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Jun 5, 2025

Move these out of TargetOptions and into Support to avoid
the dependency on Target. There are similar ABI options
already in Support/CodeGen.h.

Copy link
Contributor Author

arsenm commented Jun 5, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

@llvmbot
Copy link
Member

llvmbot commented Jun 5, 2025

@llvm/pr-subscribers-llvm-support

Author: Matt Arsenault (arsenm)

Changes

Move these out of TargetOptions and into Support to avoid
the dependency on Target. There are similar ABI options
already in Support/CodeGen.h.


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

2 Files Affected:

  • (modified) llvm/include/llvm/Support/CodeGen.h (+16)
  • (modified) llvm/include/llvm/Target/TargetOptions.h (+1-16)
diff --git a/llvm/include/llvm/Support/CodeGen.h b/llvm/include/llvm/Support/CodeGen.h
index 0e42789ba932e..b7896ae5d0f83 100644
--- a/llvm/include/llvm/Support/CodeGen.h
+++ b/llvm/include/llvm/Support/CodeGen.h
@@ -50,6 +50,22 @@ namespace llvm {
     };
   }
 
+  namespace FloatABI {
+  enum ABIType {
+    Default, // Target-specific (either soft or hard depending on triple, etc).
+    Soft,    // Soft float.
+    Hard     // Hard float.
+  };
+  }
+
+  enum class EABI {
+    Unknown,
+    Default, // Default means not specified
+    EABI4,   // Target-specific (either 4, 5 or gnu depending on triple).
+    EABI5,
+    GNU
+  };
+
   /// Code generation optimization level.
   enum class CodeGenOptLevel {
     None = 0,      ///< -O0
diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h
index fd8dad4f6f791..08d6aa36e19d8 100644
--- a/llvm/include/llvm/Target/TargetOptions.h
+++ b/llvm/include/llvm/Target/TargetOptions.h
@@ -16,6 +16,7 @@
 
 #include "llvm/ADT/FloatingPointMode.h"
 #include "llvm/MC/MCTargetOptions.h"
+#include "llvm/Support/CodeGen.h"
 
 #include <memory>
 
@@ -24,14 +25,6 @@ namespace llvm {
   class MachineFunction;
   class MemoryBuffer;
 
-  namespace FloatABI {
-    enum ABIType {
-      Default, // Target-specific (either soft or hard depending on triple, etc).
-      Soft,    // Soft float.
-      Hard     // Hard float.
-    };
-  }
-
   namespace FPOpFusion {
     enum FPOpFusionMode {
       Fast,     // Enable fusion of FP ops wherever it's profitable.
@@ -70,14 +63,6 @@ namespace llvm {
     None    // Do not use Basic Block Sections.
   };
 
-  enum class EABI {
-    Unknown,
-    Default, // Default means not specified
-    EABI4,   // Target-specific (either 4, 5 or gnu depending on triple).
-    EABI5,
-    GNU
-  };
-
   /// Identify a debugger for "tuning" the debug info.
   ///
   /// The "debugger tuning" concept allows us to present a more intuitive

@arsenm arsenm force-pushed the users/arsenm/dag/move-runtime-libcalls-predicate-setting branch from 0b14727 to a3cb3a4 Compare June 6, 2025 00:53
@arsenm arsenm force-pushed the users/arsenm/codegen/move-float-abi-eabi-to-support branch 2 times, most recently from f8721bd to d8f0999 Compare June 6, 2025 06:44
@arsenm arsenm force-pushed the users/arsenm/dag/move-runtime-libcalls-predicate-setting branch from a3cb3a4 to 25d7dd2 Compare June 6, 2025 06:44
@arsenm arsenm force-pushed the users/arsenm/dag/move-runtime-libcalls-predicate-setting branch from 25d7dd2 to b7f272a Compare June 6, 2025 07:18
@arsenm arsenm force-pushed the users/arsenm/codegen/move-float-abi-eabi-to-support branch from d8f0999 to 652f127 Compare June 6, 2025 07:18
Move these out of TargetOptions and into Support to avoid
the dependency on Target. There are similar ABI options
already in Support/CodeGen.h.
@arsenm arsenm force-pushed the users/arsenm/dag/move-runtime-libcalls-predicate-setting branch from b7f272a to e245a54 Compare June 6, 2025 14:09
@arsenm arsenm force-pushed the users/arsenm/codegen/move-float-abi-eabi-to-support branch from 652f127 to 2168b66 Compare June 6, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants