Index: llvm/lib/TableGen/TableGenBackendSkeleton.cpp =================================================================== --- llvm/lib/TableGen/TableGenBackendSkeleton.cpp +++ 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" Index: llvm/utils/TableGen/GICombinerEmitter.cpp =================================================================== --- llvm/utils/TableGen/GICombinerEmitter.cpp +++ llvm/utils/TableGen/GICombinerEmitter.cpp @@ -11,6 +11,12 @@ /// //===----------------------------------------------------------------------===// +#include "CodeGenTarget.h" +#include "GlobalISel/CodeExpander.h" +#include "GlobalISel/CodeExpansions.h" +#include "GlobalISel/GIMatchDag.h" +#include "GlobalISel/GIMatchDagPredicate.h" +#include "GlobalISel/GIMatchTree.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringSet.h" @@ -21,11 +27,6 @@ #include "llvm/TableGen/Error.h" #include "llvm/TableGen/StringMatcher.h" #include "llvm/TableGen/TableGenBackend.h" -#include "CodeGenTarget.h" -#include "GlobalISel/CodeExpander.h" -#include "GlobalISel/CodeExpansions.h" -#include "GlobalISel/GIMatchDag.h" -#include "GlobalISel/GIMatchTree.h" #include using namespace llvm; Index: llvm/utils/TableGen/GlobalISel/CodeExpander.h =================================================================== --- llvm/utils/TableGen/GlobalISel/CodeExpander.h +++ 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 Index: llvm/utils/TableGen/GlobalISel/CodeExpander.cpp =================================================================== --- llvm/utils/TableGen/GlobalISel/CodeExpander.cpp +++ 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" Index: llvm/utils/TableGen/GlobalISel/GIMatchDag.h =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchDag.h +++ 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 { Index: llvm/utils/TableGen/GlobalISel/GIMatchDagEdge.cpp =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchDagEdge.cpp +++ llvm/utils/TableGen/GlobalISel/GIMatchDagEdge.cpp @@ -8,6 +8,7 @@ #include "GIMatchDagEdge.h" #include "GIMatchDagInstr.h" +#include "GIMatchDagOperands.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; Index: llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.h =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchDagInstr.h +++ 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 Index: llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h +++ llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h @@ -9,8 +9,12 @@ #ifndef LLVM_UTILS_TABLEGEN_GIMATCHDAGPREDICATE_H #define LLVM_UTILS_TABLEGEN_GIMATCHDAGPREDICATE_H +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" -#include "GIMatchDag.h" + +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) +#include "llvm/Support/raw_ostream.h" +#endif namespace llvm { class CodeExpansions; Index: llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp +++ llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp @@ -10,8 +10,8 @@ #include "llvm/TableGen/Record.h" -#include "GIMatchDagOperands.h" #include "../CodeGenInstruction.h" +#include "GIMatchDag.h" using namespace llvm; Index: llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.h =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.h +++ 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. /// Index: llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.cpp =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchDagPredicateDependencyEdge.cpp +++ 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" Index: llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp =================================================================== --- llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp +++ llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "GIMatchTree.h" +#include "GIMatchDagPredicate.h" #include "../CodeGenInstruction.h"