[PATCH] D73498: [NFC] Remove extra headers included in Loop Unroll and LoopUnrollAndJam files

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 21:06:20 PST 2020


Meinersbur added a comment.

For reference: include-what-you-use <https://include-what-you-use.org/> suggests the following changes on current HEAD:

  /home/meinersbur/src/llvm-project/llvm/include/llvm/Transforms/Scalar/LoopUnrollAndJamPass.h should add these lines:
  namespace llvm { class Function; }
  
  /home/meinersbur/src/llvm-project/llvm/include/llvm/Transforms/Scalar/LoopUnrollAndJamPass.h should remove these lines:
  
  The full include-list for /home/meinersbur/src/llvm-project/llvm/include/llvm/Transforms/Scalar/LoopUnrollAndJamPass.h:
  #include "llvm/IR/PassManager.h"  // for FunctionAnalysisManager, PassInfoMixin
  namespace llvm { class Function; }
  ---
  
  /home/meinersbur/src/llvm-project/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp should add these lines:
  #include <vector>                                     // for vector
  #include "llvm/ADT/ArrayRef.h"                        // for ArrayRef
  #include "llvm/ADT/Optional.h"                        // for Optional
  #include "llvm/ADT/PriorityWorklist.h"                // for SmallPriorityWo...
  #include "llvm/PassAnalysisSupport.h"                 // for AnalysisUsage
  #include "llvm/PassRegistry.h"                        // for PassRegistry
  #include "llvm/PassSupport.h"                         // for INITIALIZE_PASS...
  #include "llvm/Support/Compiler.h"                    // for llvm
  #include "llvm/Transforms/Utils/LoopSimplify.h"       // for simplifyLoop
  namespace llvm { class Function; }
  namespace llvm { class Instruction; }
  namespace llvm { class Value; }
  
  /home/meinersbur/src/llvm-project/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp should remove these lines:
  - #include <algorithm>  // lines 50-50
  - #include <string>  // lines 53-53
  - #include "llvm/ADT/STLExtras.h"  // lines 15-15
  - #include "llvm/Analysis/LoopPass.h"  // lines 23-23
  - #include "llvm/IR/CFG.h"  // lines 28-28
  - #include "llvm/IR/Constant.h"  // lines 29-29
  - #include "llvm/IR/Function.h"  // lines 32-32
  - #include "llvm/IR/Instruction.h"  // lines 33-33
  - #include "llvm/IR/IntrinsicInst.h"  // lines 35-35
  - #include "llvm/Support/ErrorHandling.h"  // lines 43-43
  - #include "llvm/Support/raw_ostream.h"  // lines 44-44
  - #include "llvm/Transforms/Scalar/LoopPassManager.h"  // lines 46-46
  - #include "llvm/Transforms/Utils.h"  // lines 47-47
  
  The full include-list for /home/meinersbur/src/llvm-project/llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp:
  #include "llvm/Transforms/Scalar/LoopUnrollAndJamPass.h"
  #include <cassert>                                    // for assert
  #include <cstdint>                                    // for uint64_t
  #include <vector>                                     // for vector
  #include "llvm/ADT/ArrayRef.h"                        // for ArrayRef
  #include "llvm/ADT/None.h"                            // for None
  #include "llvm/ADT/Optional.h"                        // for Optional
  #include "llvm/ADT/PriorityWorklist.h"                // for SmallPriorityWo...
  #include "llvm/ADT/SmallPtrSet.h"                     // for SmallPtrSet
  #include "llvm/ADT/StringRef.h"                       // for StringRef
  #include "llvm/Analysis/AssumptionCache.h"            // for AssumptionAnalysis
  #include "llvm/Analysis/CodeMetrics.h"                // for CodeMetrics
  #include "llvm/Analysis/DependenceAnalysis.h"         // for DependenceAnalysis
  #include "llvm/Analysis/LoopAnalysisManager.h"        // for getLoopPassPres...
  #include "llvm/Analysis/LoopInfo.h"                   // for Loop, LoopAnalysis
  #include "llvm/Analysis/OptimizationRemarkEmitter.h"  // for OptimizationRem...
  #include "llvm/Analysis/ScalarEvolution.h"            // for ScalarEvolution
  #include "llvm/Analysis/TargetTransformInfo.h"        // for TargetTransform...
  #include "llvm/IR/BasicBlock.h"                       // for BasicBlock
  #include "llvm/IR/Constants.h"                        // for ConstantInt
  #include "llvm/IR/Dominators.h"                       // for DominatorTree (...
  #include "llvm/IR/Instructions.h"                     // for LoadInst
  #include "llvm/IR/Metadata.h"                         // for MDNode, MDString
  #include "llvm/IR/PassManager.h"                      // for FunctionAnalysi...
  #include "llvm/InitializePasses.h"                    // for initializeAssum...
  #include "llvm/Pass.h"                                // for FunctionPass
  #include "llvm/PassAnalysisSupport.h"                 // for AnalysisUsage
  #include "llvm/PassRegistry.h"                        // for PassRegistry
  #include "llvm/PassSupport.h"                         // for INITIALIZE_PASS...
  #include "llvm/Support/Casting.h"                     // for dyn_cast
  #include "llvm/Support/CommandLine.h"                 // for opt, desc, init
  #include "llvm/Support/Compiler.h"                    // for llvm
  #include "llvm/Support/Debug.h"                       // for LLVM_DEBUG
  #include "llvm/Transforms/Scalar.h"                   // for createLoopUnrol...
  #include "llvm/Transforms/Utils/LoopSimplify.h"       // for simplifyLoop
  #include "llvm/Transforms/Utils/LoopUtils.h"          // for makeFollowupLoopID
  #include "llvm/Transforms/Utils/UnrollLoop.h"         // for LoopUnrollResult
  namespace llvm { class Function; }
  namespace llvm { class Instruction; }
  namespace llvm { class Value; }
  ---


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73498/new/

https://reviews.llvm.org/D73498





More information about the llvm-commits mailing list