[llvm] [X86] Remove X86ISelDAGToDAG.h (PR #206372)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 28 13:54:33 PDT 2026
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/206372
For all the other passes, we have just been putting them inside X86.h, and this is also what I plan to do for other targets. A separate header does not make much sense.
>From 575b60cab0a246b5b936d1fb004d7cb092af944f Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sun, 28 Jun 2026 20:53:14 +0000
Subject: [PATCH] [X86] Remove X86ISelDAGToDAG.h
For all the other passes, we have just been putting them inside X86.h,
and this is also what I plan to do for other targets. A separate header
does not make much sense.
---
llvm/lib/Target/X86/X86.h | 6 +++++
llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp | 1 -
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 1 -
llvm/lib/Target/X86/X86ISelDAGToDAG.h | 25 -------------------
4 files changed, 6 insertions(+), 27 deletions(-)
delete mode 100644 llvm/lib/Target/X86/X86ISelDAGToDAG.h
diff --git a/llvm/lib/Target/X86/X86.h b/llvm/lib/Target/X86/X86.h
index 3ecc7a6ec498b..48dedd9d2a758 100644
--- a/llvm/lib/Target/X86/X86.h
+++ b/llvm/lib/Target/X86/X86.h
@@ -15,6 +15,7 @@
#define LLVM_LIB_TARGET_X86_X86_H
#include "llvm/CodeGen/MachineFunctionAnalysisManager.h"
+#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/IR/Analysis.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
@@ -33,6 +34,11 @@ class X86TargetMachine;
/// This pass converts a legalized DAG into a X86-specific DAG, ready for
/// instruction scheduling.
+class X86ISelDAGToDAGPass : public SelectionDAGISelPass {
+public:
+ X86ISelDAGToDAGPass(X86TargetMachine &TM);
+};
+
FunctionPass *createX86ISelDag(X86TargetMachine &TM, CodeGenOptLevel OptLevel);
/// This pass initializes a global base register for PIC on x86-32.
diff --git a/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp b/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
index bb389b6756a52..e1762de764671 100644
--- a/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+++ b/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
@@ -12,7 +12,6 @@
#include "X86.h"
#include "X86AsmPrinter.h"
-#include "X86ISelDAGToDAG.h"
#include "X86TargetMachine.h"
#include "llvm/CodeGen/AtomicExpand.h"
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 211534157fead..b794567f6a047 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -11,7 +11,6 @@
//
//===----------------------------------------------------------------------===//
-#include "X86ISelDAGToDAG.h"
#include "X86.h"
#include "X86MachineFunctionInfo.h"
#include "X86Subtarget.h"
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.h b/llvm/lib/Target/X86/X86ISelDAGToDAG.h
deleted file mode 100644
index 1f30c25b502fc..0000000000000
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//===-- X86ISelDAGToDAG.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIB_TARGET_X86_X86ISELDAGTODAG_H
-#define LLVM_LIB_TARGET_X86_X86ISELDAGTODAG_H
-
-#include "llvm/CodeGen/SelectionDAGISel.h"
-
-namespace llvm {
-
-class X86TargetMachine;
-
-class X86ISelDAGToDAGPass : public SelectionDAGISelPass {
-public:
- X86ISelDAGToDAGPass(X86TargetMachine &TM);
-};
-
-} // namespace llvm
-
-#endif // LLVM_LIB_TARGET_X86_X86ISELDAGTODAG_H
More information about the llvm-commits
mailing list