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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 16:14:51 PST 2020


dmgreen accepted this revision.
dmgreen added a comment.
This revision is now accepted and ready to land.

Thanks. I left some comments on files that it may be best to keep around. The others look like a good cleanup to remove.

LGTM.



================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp:14-17
-#include "llvm/ADT/None.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/ADT/StringRef.h"
----------------
These 4 are used in one way of another.


================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp:33-35
-#include "llvm/IR/Instruction.h"
-#include "llvm/IR/Instructions.h"
-#include "llvm/IR/IntrinsicInst.h"
----------------
Intrinsics are used. Instructions too I guess, but that is unlikely to cause a problem.


================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp:40
 #include "llvm/Pass.h"
-#include "llvm/Support/Casting.h"
 #include "llvm/Support/CommandLine.h"
----------------
This is used for things like dyn_cast and isa. It's probably fine to leave or remove, as it will be included from elsewhere in either case.


================
Comment at: llvm/lib/Transforms/Utils/LoopUnroll.cpp:29
 #include "llvm/IR/Dominators.h"
-#include "llvm/IR/IntrinsicInst.h"
-#include "llvm/IR/LLVMContext.h"
----------------
There are some references to Intrinsics. Best to keep this one to be more robust.


================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:14
 
-#include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/Statistic.h"
----------------
We still use this for the moment (although may not in the future).


================
Comment at: llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp:29
 #include "llvm/IR/Dominators.h"
-#include "llvm/IR/IntrinsicInst.h"
-#include "llvm/IR/LLVMContext.h"
----------------
Same as above, keep this one.


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

https://reviews.llvm.org/D73498





More information about the llvm-commits mailing list