Skip to content

Commit 989f1c7

Browse files
author
serge-sans-paille
committed
Cleanup codegen includes
This is a (fixed) recommit of https://reviews.llvm.org/D121169 after: 1061034926 before: 1063332844 Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D121681
1 parent c9dbf40 commit 989f1c7

File tree

262 files changed

+320
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+320
-497
lines changed

lld/Common/TargetOptionsCommandFlags.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "lld/Common/TargetOptionsCommandFlags.h"
10+
#include "llvm/ADT/Triple.h"
1011
#include "llvm/CodeGen/CommandFlags.h"
1112
#include "llvm/Target/TargetOptions.h"
1213

llvm/include/llvm/CodeGen/Analysis.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515

1616
#include "llvm/ADT/ArrayRef.h"
1717
#include "llvm/ADT/DenseMap.h"
18-
#include "llvm/ADT/SmallVector.h"
19-
#include "llvm/ADT/Triple.h"
2018
#include "llvm/CodeGen/ISDOpcodes.h"
21-
#include "llvm/IR/InlineAsm.h"
2219
#include "llvm/IR/Instructions.h"
23-
#include "llvm/Support/CodeGen.h"
2420

2521
namespace llvm {
22+
template <typename T> class SmallVectorImpl;
2623
class GlobalValue;
2724
class LLT;
2825
class MachineBasicBlock;

llvm/include/llvm/CodeGen/CalcSpillWeights.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_CODEGEN_CALCSPILLWEIGHTS_H
1010
#define LLVM_CODEGEN_CALCSPILLWEIGHTS_H
1111

12-
#include "llvm/ADT/DenseMap.h"
1312
#include "llvm/CodeGen/SlotIndexes.h"
1413

1514
namespace llvm {

llvm/include/llvm/CodeGen/CallingConvLower.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@
1515
#define LLVM_CODEGEN_CALLINGCONVLOWER_H
1616

1717
#include "llvm/ADT/SmallVector.h"
18-
#include "llvm/CodeGen/MachineFrameInfo.h"
1918
#include "llvm/CodeGen/Register.h"
2019
#include "llvm/CodeGen/TargetCallingConv.h"
2120
#include "llvm/IR/CallingConv.h"
22-
#include "llvm/MC/MCRegisterInfo.h"
2321
#include "llvm/Support/Alignment.h"
2422

2523
namespace llvm {

llvm/include/llvm/CodeGen/CodeGenCommonISel.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
namespace llvm {
2020

2121
class BasicBlock;
22-
class MachineBasicBlock;
2322
/// Encapsulates all of the information needed to generate a stack protector
2423
/// check, and signals to isel when initialized that one needs to be generated.
2524
///

llvm/include/llvm/CodeGen/CodeGenPassBuilder.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#ifndef LLVM_CODEGEN_CODEGENPASSBUILDER_H
1616
#define LLVM_CODEGEN_CODEGENPASSBUILDER_H
1717

18-
#include "llvm/ADT/FunctionExtras.h"
1918
#include "llvm/ADT/SmallVector.h"
2019
#include "llvm/ADT/StringRef.h"
2120
#include "llvm/Analysis/AliasAnalysis.h"
@@ -26,7 +25,6 @@
2625
#include "llvm/Analysis/TargetTransformInfo.h"
2726
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
2827
#include "llvm/CodeGen/ExpandReductions.h"
29-
#include "llvm/CodeGen/MachineModuleInfo.h"
3028
#include "llvm/CodeGen/MachinePassManager.h"
3129
#include "llvm/CodeGen/PreISelIntrinsicLowering.h"
3230
#include "llvm/CodeGen/ReplaceWithVeclib.h"
@@ -35,23 +33,20 @@
3533
#include "llvm/IR/PassManager.h"
3634
#include "llvm/IR/Verifier.h"
3735
#include "llvm/MC/MCAsmInfo.h"
38-
#include "llvm/MC/MCStreamer.h"
3936
#include "llvm/MC/MCTargetOptions.h"
4037
#include "llvm/Support/CodeGen.h"
4138
#include "llvm/Support/Debug.h"
4239
#include "llvm/Support/Error.h"
4340
#include "llvm/Support/ErrorHandling.h"
4441
#include "llvm/Target/CGPassBuilderOption.h"
4542
#include "llvm/Target/TargetMachine.h"
46-
#include "llvm/Transforms/Scalar.h"
4743
#include "llvm/Transforms/Scalar/ConstantHoisting.h"
4844
#include "llvm/Transforms/Scalar/LoopPassManager.h"
4945
#include "llvm/Transforms/Scalar/LoopStrengthReduce.h"
5046
#include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"
5147
#include "llvm/Transforms/Scalar/MergeICmps.h"
5248
#include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h"
5349
#include "llvm/Transforms/Scalar/ScalarizeMaskedMemIntrin.h"
54-
#include "llvm/Transforms/Utils.h"
5550
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
5651
#include "llvm/Transforms/Utils/LowerInvoke.h"
5752
#include <cassert>

llvm/include/llvm/CodeGen/CommandFlags.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
#define LLVM_CODEGEN_COMMANDFLAGS_H
1717

1818
#include "llvm/ADT/FloatingPointMode.h"
19-
#include "llvm/ADT/StringExtras.h"
20-
#include "llvm/ADT/Triple.h"
21-
#include "llvm/IR/Instructions.h"
22-
#include "llvm/IR/Intrinsics.h"
23-
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
2419
#include "llvm/Support/CodeGen.h"
2520
#include "llvm/Target/TargetOptions.h"
2621
#include <string>
@@ -29,6 +24,9 @@
2924
namespace llvm {
3025

3126
class Module;
27+
class AttrBuilder;
28+
class Function;
29+
class Triple;
3230

3331
namespace codegen {
3432

llvm/include/llvm/CodeGen/DFAPacketizer.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
#ifndef LLVM_CODEGEN_DFAPACKETIZER_H
2626
#define LLVM_CODEGEN_DFAPACKETIZER_H
2727

28-
#include "llvm/ADT/DenseMap.h"
2928
#include "llvm/CodeGen/MachineBasicBlock.h"
30-
#include "llvm/CodeGen/ScheduleDAGMutation.h"
3129
#include "llvm/Support/Automaton.h"
3230
#include <cstdint>
3331
#include <map>
@@ -38,6 +36,7 @@
3836
namespace llvm {
3937

4038
class DefaultVLIWScheduler;
39+
class ScheduleDAGMutation;
4140
class InstrItineraryData;
4241
class MachineFunction;
4342
class MachineInstr;

llvm/include/llvm/CodeGen/FaultMaps.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_CODEGEN_FAULTMAPS_H
1111

1212
#include "llvm/MC/MCSymbol.h"
13-
#include "llvm/Support/Endian.h"
1413
#include <map>
1514
#include <vector>
1615

llvm/include/llvm/CodeGen/IntrinsicLowering.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#ifndef LLVM_CODEGEN_INTRINSICLOWERING_H
1616
#define LLVM_CODEGEN_INTRINSICLOWERING_H
1717

18-
#include "llvm/IR/Intrinsics.h"
19-
2018
namespace llvm {
2119
class CallInst;
2220
class DataLayout;

0 commit comments

Comments
 (0)