[llvm] a88cc20 - ProfileSummaryInfo.h - remove unnecessary includes. NFC

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 08:29:49 PDT 2020


Author: Simon Pilgrim
Date: 2020-04-10T16:25:48+01:00
New Revision: a88cc2045629cf54613be2244e7342b04eb83d4a

URL: https://github.com/llvm/llvm-project/commit/a88cc2045629cf54613be2244e7342b04eb83d4a
DIFF: https://github.com/llvm/llvm-project/commit/a88cc2045629cf54613be2244e7342b04eb83d4a.diff

LOG: ProfileSummaryInfo.h - remove unnecessary includes. NFC

Remove a number of includes that aren't necessary (nor are we relying on the remaining includes to provide the declarations), we just needed a llvm::Instruction forward declaration.

This exposed a couple of source files that were implicitly replying on the includes for their use of llvm::SmallSet or std::set, requiring local includes to be added there instead.

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/ProfileSummaryInfo.h
    llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
    llvm/lib/Target/BPF/BPFMIPeephole.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
index f90dcf604e9b..accc78b62b9e 100644
--- a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
+++ b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h
@@ -14,14 +14,10 @@
 #ifndef LLVM_ANALYSIS_PROFILE_SUMMARY_INFO_H
 #define LLVM_ANALYSIS_PROFILE_SUMMARY_INFO_H
 
-#include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/SmallSet.h"
 #include "llvm/IR/Function.h"
-#include "llvm/IR/Instructions.h"
 #include "llvm/IR/PassManager.h"
 #include "llvm/IR/ProfileSummary.h"
-#include "llvm/IR/ValueHandle.h"
 #include "llvm/Pass.h"
 #include <memory>
 
@@ -29,6 +25,7 @@ namespace llvm {
 class BasicBlock;
 class BlockFrequencyInfo;
 class CallSite;
+class Instruction;
 class ProfileSummary;
 /// Analysis providing profile information.
 ///

diff  --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
index 5c26b11397b9..cd0b976ba43f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
@@ -18,6 +18,7 @@
 #include "llvm/ADT/None.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/CodeGen/FunctionLoweringInfo.h"

diff  --git a/llvm/lib/Target/BPF/BPFMIPeephole.cpp b/llvm/lib/Target/BPF/BPFMIPeephole.cpp
index 022267fbe3c2..a2ceade66800 100644
--- a/llvm/lib/Target/BPF/BPFMIPeephole.cpp
+++ b/llvm/lib/Target/BPF/BPFMIPeephole.cpp
@@ -27,6 +27,7 @@
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/Support/Debug.h"
+#include <set>
 
 using namespace llvm;
 


        


More information about the llvm-commits mailing list