From 817a219e4eae625a82f847383a8847632a398d82 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 25 Jun 2020 17:28:41 +0100 Subject: [PATCH] AggressiveInstCombineInternal.h - reduce unnecessary includes to forward declarations. NFC. --- .../AggressiveInstCombineInternal.h | 15 +++++++-------- .../AggressiveInstCombine/TruncInstCombine.cpp | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h b/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h index 44e1c45664e..42bcadfc7dc 100644 --- a/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h +++ b/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h @@ -16,14 +16,8 @@ #define LLVM_LIB_TRANSFORMS_AGGRESSIVEINSTCOMBINE_COMBINEINTERNAL_H #include "llvm/ADT/MapVector.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/BasicAliasAnalysis.h" -#include "llvm/Analysis/ConstantFolding.h" -#include "llvm/Analysis/GlobalsModRef.h" -#include "llvm/Analysis/TargetLibraryInfo.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/Pass.h" +#include "llvm/ADT/SmallVector.h" + using namespace llvm; //===----------------------------------------------------------------------===// @@ -47,7 +41,12 @@ using namespace llvm; namespace llvm { class DataLayout; class DominatorTree; + class Function; + class Instruction; class TargetLibraryInfo; + class TruncInst; + class Type; + class Value; class TruncInstCombine { TargetLibraryInfo &TLI; diff --git a/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp b/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp index ece4bdf470d..5cd40c66227 100644 --- a/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp +++ b/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp @@ -25,13 +25,13 @@ //===----------------------------------------------------------------------===// #include "AggressiveInstCombineInternal.h" -#include "llvm/ADT/MapVector.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Dominators.h" +#include "llvm/IR/Instruction.h" #include "llvm/IR/IRBuilder.h" using namespace llvm;