diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/lib/TableGen/Record.cpp @@ -27,7 +27,6 @@ #include "llvm/Support/SMLoc.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TableGen/Error.h" -#include "llvm/TableGen/Record.h" #include #include #include diff --git a/llvm/lib/TableGen/TableGenBackendSkeleton.cpp b/llvm/lib/TableGen/TableGenBackendSkeleton.cpp --- a/llvm/lib/TableGen/TableGenBackendSkeleton.cpp +++ b/llvm/lib/TableGen/TableGenBackendSkeleton.cpp @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/DenseMapInfo.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/TableGen/TableGenBackend.h" #define DEBUG_TYPE "skeleton-emitter" diff --git a/llvm/utils/TableGen/GICombinerEmitter.cpp b/llvm/utils/TableGen/GICombinerEmitter.cpp --- a/llvm/utils/TableGen/GICombinerEmitter.cpp +++ b/llvm/utils/TableGen/GICombinerEmitter.cpp @@ -25,6 +25,7 @@ #include "GlobalISel/CodeExpander.h" #include "GlobalISel/CodeExpansions.h" #include "GlobalISel/GIMatchDag.h" +#include "GlobalISel/GIMatchDagPredicate.h" #include "GlobalISel/GIMatchTree.h" #include diff --git a/llvm/utils/TableGen/GlobalISel/CodeExpander.h b/llvm/utils/TableGen/GlobalISel/CodeExpander.h --- a/llvm/utils/TableGen/GlobalISel/CodeExpander.h +++ b/llvm/utils/TableGen/GlobalISel/CodeExpander.h @@ -15,10 +15,10 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/SMLoc.h" namespace llvm { class CodeExpansions; +class SMLoc; class raw_ostream; /// Emit the given code with all '${foo}' placeholders expanded to their diff --git a/llvm/utils/TableGen/GlobalISel/CodeExpander.cpp b/llvm/utils/TableGen/GlobalISel/CodeExpander.cpp --- a/llvm/utils/TableGen/GlobalISel/CodeExpander.cpp +++ b/llvm/utils/TableGen/GlobalISel/CodeExpander.cpp @@ -12,7 +12,6 @@ #include "CodeExpander.h" #include "CodeExpansions.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TableGen/Error.h" diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchDag.h b/llvm/utils/TableGen/GlobalISel/GIMatchDag.h --- a/llvm/utils/TableGen/GlobalISel/GIMatchDag.h +++ b/llvm/utils/TableGen/GlobalISel/GIMatchDag.h @@ -16,7 +16,6 @@ #include "GIMatchDagPredicateDependencyEdge.h" namespace llvm { -class GIMatchDag; /// This class manages lifetimes for data associated with the GIMatchDag object. class GIMatchDagContext { diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchDagEdge.cpp b/llvm/utils/TableGen/GlobalISel/GIMatchDagEdge.cpp --- a/llvm/utils/TableGen/GlobalISel/GIMatchDagEdge.cpp +++ b/llvm/utils/TableGen/GlobalISel/GIMatchDagEdge.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "GIMatchDagEdge.h" +#include "GIMatchDagOperands.h" #include "GIMatchDagInstr.h" #include "llvm/Support/raw_ostream.h" diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.h b/llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.h --- a/llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.h +++ b/llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.h @@ -9,11 +9,14 @@ #ifndef LLVM_UTILS_TABLEGEN_GIMATCHDAGINSTR_H #define LLVM_UTILS_TABLEGEN_GIMATCHDAGINSTR_H -#include "GIMatchDagOperands.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/raw_ostream.h" namespace llvm { +class CodeGenInstruction; class GIMatchDag; +class GIMatchDagOperandList; /// Represents an instruction in the match DAG. This object knows very little /// about the actual instruction to be matched as the bulk of that is in diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h --- a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h +++ b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h @@ -10,7 +10,11 @@ #define LLVM_UTILS_TABLEGEN_GIMATCHDAGPREDICATE_H #include "llvm/ADT/StringRef.h" -#include "GIMatchDag.h" +#include "llvm/ADT/SmallVector.h" + +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +#include "llvm/Support/raw_ostream.h" +#endif namespace llvm { class CodeExpansions; diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp --- a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp +++ b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp @@ -10,7 +10,7 @@ #include "llvm/TableGen/Record.h" -#include "GIMatchDagOperands.h" +#include "GIMatchDag.h" #include "../CodeGenInstruction.h" using namespace llvm; diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.h b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.h --- a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.h +++ b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.h @@ -9,12 +9,14 @@ #ifndef LLVM_UTILS_TABLEGEN_GIMATCHDAGPREDICATEEDGE_H #define LLVM_UTILS_TABLEGEN_GIMATCHDAGPREDICATEEDGE_H -#include "GIMatchDagOperands.h" +#include "llvm/Support/Compiler.h" namespace llvm { -class GIMatchDag; class GIMatchDagInstr; class GIMatchDagPredicate; +class GIMatchDagOperand; + +class raw_ostream; /// Represents a dependency that must be met to evaluate a predicate. /// diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.cpp b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.cpp --- a/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.cpp +++ b/llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.cpp @@ -9,6 +9,7 @@ #include "GIMatchDagPredicateDependencyEdge.h" #include "GIMatchDagInstr.h" +#include "GIMatchDagOperands.h" #include "GIMatchDagPredicate.h" #include "llvm/Support/raw_ostream.h" diff --git a/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp b/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp --- a/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp +++ b/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "GIMatchTree.h" +#include "GIMatchDagPredicate.h" #include "../CodeGenInstruction.h"