[PATCH] D151031: [llvm] Reduce ComplexDeinterleavingPass.h includes

Elliot Goodrich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 08:25:40 PDT 2023


IncludeGuardian created this revision.
IncludeGuardian added reviewers: lattner, nikic.
Herald added subscribers: pmatos, asb, foad, StephenFan, kerbowa, hiraditya, jgravelle-google, sbc100, jvesely, dschuff, arsenm.
Herald added a project: All.
IncludeGuardian requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

Remove the unnecessary `"llvm/IR/PatternMatch.h"` include directive from
`ComplexDeinterleavingPass.h` and move it to the corresponding source
file.

Add missing includes that were transitively included by this header to 2
other source files.

This reduces the total number of preprocessing tokens across the LLVM
source files in `lib` from (roughly) 1,964,876,961 to 1,935,091,611 - a
reduction of ~1.52%. This should result in a small improvement in
compilation time.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151031

Files:
  llvm/include/llvm/CodeGen/ComplexDeinterleavingPass.h
  llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
  llvm/lib/CodeGen/SelectOptimize.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp


Index: llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp
@@ -16,6 +16,7 @@
 #include "WebAssembly.h"
 #include "WebAssemblyMachineFunctionInfo.h"
 #include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/IR/DebugInfoMetadata.h"
 
 using namespace llvm;
 
Index: llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -21,6 +21,7 @@
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/IR/DiagnosticInfo.h"
 #include "llvm/IR/IntrinsicsAMDGPU.h"
+#include "llvm/IR/PatternMatch.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/KnownBits.h"
 #include "llvm/Target/TargetMachine.h"
Index: llvm/lib/CodeGen/SelectOptimize.cpp
===================================================================
--- llvm/lib/CodeGen/SelectOptimize.cpp
+++ llvm/lib/CodeGen/SelectOptimize.cpp
@@ -28,6 +28,7 @@
 #include "llvm/IR/Function.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/Instruction.h"
+#include "llvm/IR/PatternMatch.h"
 #include "llvm/IR/ProfDataUtils.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/Pass.h"
Index: llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
===================================================================
--- llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
+++ llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
@@ -67,6 +67,7 @@
 #include "llvm/CodeGen/TargetPassConfig.h"
 #include "llvm/CodeGen/TargetSubtargetInfo.h"
 #include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/PatternMatch.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Transforms/Utils/Local.h"
Index: llvm/include/llvm/CodeGen/ComplexDeinterleavingPass.h
===================================================================
--- llvm/include/llvm/CodeGen/ComplexDeinterleavingPass.h
+++ llvm/include/llvm/CodeGen/ComplexDeinterleavingPass.h
@@ -15,7 +15,6 @@
 #define LLVM_CODEGEN_COMPLEXDEINTERLEAVING_H
 
 #include "llvm/IR/PassManager.h"
-#include "llvm/IR/PatternMatch.h"
 
 namespace llvm {
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151031.524037.patch
Type: text/x-patch
Size: 2329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230520/a704223e/attachment.bin>


More information about the llvm-commits mailing list