[BOLT][NFC] Reduce includes with include-what-you-use
authorAmir Ayupov <aaupov@fb.com>
Sat, 30 Oct 2021 00:27:38 +0000 (17:27 -0700)
committerAmir Ayupov <aaupov@fb.com>
Fri, 21 Jan 2022 20:05:47 +0000 (12:05 -0800)
Summary: Removed redundant includes with IWYU

Test Plan: ninja bolt

Reviewers: maksfb

FBD32043568

14 files changed:
bolt/include/bolt/Core/BinaryContext.h
bolt/include/bolt/Core/BinaryData.h
bolt/include/bolt/Core/DebugData.h
bolt/include/bolt/Passes/AllocCombiner.h
bolt/include/bolt/Rewrite/DWARFRewriter.h
bolt/lib/Core/BinaryFunction.cpp
bolt/lib/Core/DebugData.cpp
bolt/lib/Core/JumpTable.cpp
bolt/lib/Passes/IndirectCallPromotion.cpp
bolt/lib/Passes/ThreeWayBranch.cpp
bolt/lib/Rewrite/DWARFRewriter.cpp
bolt/lib/Rewrite/MachORewriteInstance.cpp
bolt/lib/Rewrite/RewriteInstance.cpp
bolt/lib/Utils/Utils.cpp

index abcd2c3..c626af3 100644 (file)
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCCodeEmitter.h"
 #include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCDwarf.h"
-#include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCObjectFileInfo.h"
 #include "llvm/MC/MCObjectWriter.h"
 #include "llvm/MC/MCPseudoProbe.h"
 #include "llvm/MC/MCSectionELF.h"
 #include "llvm/MC/MCSectionMachO.h"
+#include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/TargetRegistry.h"
 #include "llvm/Support/ErrorOr.h"
index 831f968..01e1538 100644 (file)
@@ -16,7 +16,6 @@
 #define BOLT_CORE_BINARY_DATA_H
 
 #include "llvm/ADT/Twine.h"
-#include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
index 832123f..761614c 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef BOLT_CORE_DEBUG_DATA_H
 #define BOLT_CORE_DEBUG_DATA_H
 
-#include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/DebugInfo/DWARF/DWARFContext.h"
 #include "llvm/MC/MCDwarf.h"
@@ -33,8 +32,6 @@
 
 namespace llvm {
 
-class DWARFAbbreviationDeclarationSet;
-
 namespace bolt {
 
 class BinaryContext;
index 810c265..21f1aa7 100644 (file)
@@ -13,8 +13,6 @@
 
 namespace llvm {
 namespace bolt {
-class DataflowInfoManager;
-class FrameAnalysis;
 
 class AllocCombinerPass : public BinaryFunctionPass {
   /// Stats aggregating variables
index 55dda5d..d75ae8a 100644 (file)
 #define BOLT_REWRITE_DWARF_REWRITER_H
 
 #include "bolt/Core/DebugData.h"
-#include "bolt/Rewrite/RewriteInstance.h"
 #include <cstdint>
-#include <map>
 #include <memory>
 #include <mutex>
+#include <set>
 #include <unordered_map>
 #include <vector>
 
index 18f521e..0b175a8 100644 (file)
@@ -28,7 +28,6 @@
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstPrinter.h"
-#include "llvm/MC/MCStreamer.h"
 #include "llvm/Object/ObjectFile.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
index 396bf8a..fde6227 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #include "bolt/Core/DebugData.h"
-#include "bolt/Core/BinaryBasicBlock.h"
-#include "bolt/Core/BinaryFunction.h"
+#include "bolt/Core/BinaryContext.h"
 #include "bolt/Utils/Utils.h"
+#include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCObjectStreamer.h"
-#include "llvm/MC/MCSymbol.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/EndianStream.h"
 #include "llvm/Support/LEB128.h"
@@ -32,6 +31,8 @@ extern llvm::cl::opt<unsigned> Verbosity;
 } // namespace opts
 
 namespace llvm {
+class MCSymbol;
+
 namespace bolt {
 
 const DebugLineTableRowRef DebugLineTableRowRef::NULL_ROW{0, 0};
index a3c273b..91c73f6 100644 (file)
@@ -14,7 +14,6 @@
 #include "bolt/Core/BinaryFunction.h"
 #include "bolt/Core/BinarySection.h"
 #include "llvm/Support/CommandLine.h"
-#include "llvm/Support/Debug.h"
 
 #define DEBUG_TYPE "bolt"
 
index 4104cc9..dd1cc20 100644 (file)
@@ -13,7 +13,6 @@
 #include "bolt/Passes/IndirectCallPromotion.h"
 #include "bolt/Passes/BinaryFunctionCallGraph.h"
 #include "bolt/Passes/DataflowInfoManager.h"
-#include "bolt/Utils/CommandLineOpts.h"
 #include "llvm/Support/CommandLine.h"
 
 #define DEBUG_TYPE "ICP"
index 5ee2b66..445faba 100644 (file)
@@ -12,8 +12,6 @@
 
 #include "bolt/Passes/ThreeWayBranch.h"
 
-#include <numeric>
-
 using namespace llvm;
 
 namespace llvm {
index 531f824..c44e548 100644 (file)
@@ -11,6 +11,7 @@
 #include "bolt/Core/BinaryFunction.h"
 #include "bolt/Core/DebugData.h"
 #include "bolt/Core/ParallelUtilities.h"
+#include "bolt/Rewrite/RewriteInstance.h"
 #include "bolt/Utils/Utils.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/BinaryFormat/Dwarf.h"
 #include "llvm/MC/MCAsmBackend.h"
 #include "llvm/MC/MCAsmLayout.h"
 #include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCDwarf.h"
 #include "llvm/MC/MCObjectWriter.h"
-#include "llvm/MC/MCSection.h"
 #include "llvm/MC/MCStreamer.h"
-#include "llvm/MC/MCSymbol.h"
 #include "llvm/Object/ObjectFile.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/CommandLine.h"
index e04c222..c823349 100644 (file)
 #include "bolt/Rewrite/ExecutableFileMemoryManager.h"
 #include "bolt/RuntimeLibs/InstrumentationRuntimeLibrary.h"
 #include "bolt/Utils/Utils.h"
-#include "llvm/MC/MCAsmBackend.h"
 #include "llvm/MC/MCAsmLayout.h"
 #include "llvm/MC/MCObjectStreamer.h"
-#include "llvm/MC/MCObjectWriter.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/ToolOutputFile.h"
 
index 73288a3..934f797 100644 (file)
 #include "llvm/MC/MCAsmBackend.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCAsmLayout.h"
-#include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCDisassembler/MCDisassembler.h"
 #include "llvm/MC/MCObjectStreamer.h"
-#include "llvm/MC/MCObjectWriter.h"
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSymbol.h"
 #include "llvm/MC/TargetRegistry.h"
index f94d286..3d18da5 100644 (file)
@@ -13,7 +13,6 @@
 #include "bolt/Utils/Utils.h"
 #include "llvm/BinaryFormat/Dwarf.h"
 #include "llvm/MC/MCDwarf.h"
-#include "llvm/Support/CommandLine.h"
 #include "llvm/Support/LEB128.h"
 #include "llvm/Support/raw_ostream.h"