[llvm-branch-commits] [llvm] CodeGen: Move ABI option enums to support (PR #142912)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Jun 8 19:35:56 PDT 2025
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/142912
>From 8450d9c1fbd55a916bc34aa6944c4d78e2dd1aff Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Thu, 5 Jun 2025 16:08:26 +0900
Subject: [PATCH] CodeGen: Move ABI option enums to support
Move these out of TargetOptions and into Support to avoid
the dependency on Target. There are similar ABI options
already in Support/CodeGen.h.
---
llvm/include/llvm/Support/CodeGen.h | 16 ++++++++++++++++
llvm/include/llvm/Target/TargetOptions.h | 17 +----------------
2 files changed, 17 insertions(+), 16 deletions(-)
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
More information about the llvm-branch-commits
mailing list