[Modules] Move InstIterator out of the Support library, where it had no
authorChandler Carruth <chandlerc@gmail.com>
Tue, 4 Mar 2014 10:30:26 +0000 (10:30 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 4 Mar 2014 10:30:26 +0000 (10:30 +0000)
business.

This header includes Function and BasicBlock and directly uses the
interfaces of both classes. It has to do with the IR, it even has that
in the name. =] Put it in the library it belongs to.

This is one step toward making LLVM's Support library survive a C++
modules bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202814 91177308-0d34-0410-b5e6-96231b3b80d8

26 files changed:
include/llvm/Analysis/ConstantsScanner.h
include/llvm/IR/InstIterator.h [new file with mode: 0644]
include/llvm/Support/InstIterator.h [deleted file]
lib/Analysis/AliasAnalysisEvaluator.cpp
lib/Analysis/AliasSetTracker.cpp
lib/Analysis/Delinearization.cpp
lib/Analysis/DependenceAnalysis.cpp
lib/Analysis/IPA/FindUsedTypes.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Analysis/MemDepPrinter.cpp
lib/Analysis/ScalarEvolution.cpp
lib/IR/Function.cpp
lib/Target/Mips/MipsConstantIslandPass.cpp
lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
lib/Target/NVPTX/NVPTXSplitBBatBar.cpp
lib/Target/NVPTX/NVPTXUtilities.cpp
lib/Transforms/IPO/FunctionAttrs.cpp
lib/Transforms/Instrumentation/BoundsChecking.cpp
lib/Transforms/Instrumentation/GCOVProfiling.cpp
lib/Transforms/ObjCARC/ObjCARC.h
lib/Transforms/ObjCARC/ObjCARCExpand.cpp
lib/Transforms/Scalar/ADCE.cpp
lib/Transforms/Scalar/ConstantProp.cpp
lib/Transforms/Scalar/DCE.cpp
lib/Transforms/Scalar/SampleProfile.cpp
unittests/Analysis/CFGTest.cpp

index cdaf68d75a6399fac3c35648f3ce8ae79b1cceea..d3d0a44bd6d4375a026e0c85688b3b6681bae807 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef LLVM_ANALYSIS_CONSTANTSSCANNER_H
 #define LLVM_ANALYSIS_CONSTANTSSCANNER_H
 
-#include "llvm/Support/InstIterator.h"
+#include "llvm/IR/InstIterator.h"
 
 namespace llvm {
 
diff --git a/include/llvm/IR/InstIterator.h b/include/llvm/IR/InstIterator.h
new file mode 100644 (file)
index 0000000..75e93bd
--- /dev/null
@@ -0,0 +1,147 @@
+//===- InstIterator.h - Classes for inst iteration --------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains definitions of two iterators for iterating over the
+// instructions in a function.  This is effectively a wrapper around a two level
+// iterator that can probably be genericized later.
+//
+// Note that this iterator gets invalidated any time that basic blocks or
+// instructions are moved around.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_IR_INSTITERATOR_H
+#define LLVM_IR_INSTITERATOR_H
+
+#include "llvm/IR/BasicBlock.h"
+#include "llvm/IR/Function.h"
+
+namespace llvm {
+
+// This class implements inst_begin() & inst_end() for
+// inst_iterator and const_inst_iterator's.
+//
+template <class _BB_t, class _BB_i_t, class _BI_t, class _II_t>
+class InstIterator {
+  typedef _BB_t   BBty;
+  typedef _BB_i_t BBIty;
+  typedef _BI_t   BIty;
+  typedef _II_t   IIty;
+  _BB_t  *BBs;      // BasicBlocksType
+  _BB_i_t BB;       // BasicBlocksType::iterator
+  _BI_t   BI;       // BasicBlock::iterator
+public:
+  typedef std::bidirectional_iterator_tag iterator_category;
+  typedef IIty                            value_type;
+  typedef signed                        difference_type;
+  typedef IIty*                           pointer;
+  typedef IIty&                           reference;
+
+  // Default constructor
+  InstIterator() {}
+
+  // Copy constructor...
+  template<typename A, typename B, typename C, typename D>
+  InstIterator(const InstIterator<A,B,C,D> &II)
+    : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
+
+  template<typename A, typename B, typename C, typename D>
+  InstIterator(InstIterator<A,B,C,D> &II)
+    : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
+
+  template<class M> InstIterator(M &m)
+    : BBs(&m.getBasicBlockList()), BB(BBs->begin()) {    // begin ctor
+    if (BB != BBs->end()) {
+      BI = BB->begin();
+      advanceToNextBB();
+    }
+  }
+
+  template<class M> InstIterator(M &m, bool)
+    : BBs(&m.getBasicBlockList()), BB(BBs->end()) {    // end ctor
+  }
+
+  // Accessors to get at the underlying iterators...
+  inline BBIty &getBasicBlockIterator()  { return BB; }
+  inline BIty  &getInstructionIterator() { return BI; }
+
+  inline reference operator*()  const { return *BI; }
+  inline pointer operator->() const { return &operator*(); }
+
+  inline bool operator==(const InstIterator &y) const {
+    return BB == y.BB && (BB == BBs->end() || BI == y.BI);
+  }
+  inline bool operator!=(const InstIterator& y) const {
+    return !operator==(y);
+  }
+
+  InstIterator& operator++() {
+    ++BI;
+    advanceToNextBB();
+    return *this;
+  }
+  inline InstIterator operator++(int) {
+    InstIterator tmp = *this; ++*this; return tmp;
+  }
+
+  InstIterator& operator--() {
+    while (BB == BBs->end() || BI == BB->begin()) {
+      --BB;
+      BI = BB->end();
+    }
+    --BI;
+    return *this;
+  }
+  inline InstIterator  operator--(int) {
+    InstIterator tmp = *this; --*this; return tmp;
+  }
+
+  inline bool atEnd() const { return BB == BBs->end(); }
+
+private:
+  inline void advanceToNextBB() {
+    // The only way that the II could be broken is if it is now pointing to
+    // the end() of the current BasicBlock and there are successor BBs.
+    while (BI == BB->end()) {
+      ++BB;
+      if (BB == BBs->end()) break;
+      BI = BB->begin();
+    }
+  }
+};
+
+
+typedef InstIterator<iplist<BasicBlock>,
+                     Function::iterator, BasicBlock::iterator,
+                     Instruction> inst_iterator;
+typedef InstIterator<const iplist<BasicBlock>,
+                     Function::const_iterator,
+                     BasicBlock::const_iterator,
+                     const Instruction> const_inst_iterator;
+
+inline inst_iterator inst_begin(Function *F) { return inst_iterator(*F); }
+inline inst_iterator inst_end(Function *F)   { return inst_iterator(*F, true); }
+inline const_inst_iterator inst_begin(const Function *F) {
+  return const_inst_iterator(*F);
+}
+inline const_inst_iterator inst_end(const Function *F) {
+  return const_inst_iterator(*F, true);
+}
+inline inst_iterator inst_begin(Function &F) { return inst_iterator(F); }
+inline inst_iterator inst_end(Function &F)   { return inst_iterator(F, true); }
+inline const_inst_iterator inst_begin(const Function &F) {
+  return const_inst_iterator(F);
+}
+inline const_inst_iterator inst_end(const Function &F) {
+  return const_inst_iterator(F, true);
+}
+
+} // End llvm namespace
+
+#endif
diff --git a/include/llvm/Support/InstIterator.h b/include/llvm/Support/InstIterator.h
deleted file mode 100644 (file)
index ac936a1..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-//===- llvm/Support/InstIterator.h - Classes for inst iteration -*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains definitions of two iterators for iterating over the
-// instructions in a function.  This is effectively a wrapper around a two level
-// iterator that can probably be genericized later.
-//
-// Note that this iterator gets invalidated any time that basic blocks or
-// instructions are moved around.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SUPPORT_INSTITERATOR_H
-#define LLVM_SUPPORT_INSTITERATOR_H
-
-#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/Function.h"
-
-namespace llvm {
-
-// This class implements inst_begin() & inst_end() for
-// inst_iterator and const_inst_iterator's.
-//
-template <class _BB_t, class _BB_i_t, class _BI_t, class _II_t>
-class InstIterator {
-  typedef _BB_t   BBty;
-  typedef _BB_i_t BBIty;
-  typedef _BI_t   BIty;
-  typedef _II_t   IIty;
-  _BB_t  *BBs;      // BasicBlocksType
-  _BB_i_t BB;       // BasicBlocksType::iterator
-  _BI_t   BI;       // BasicBlock::iterator
-public:
-  typedef std::bidirectional_iterator_tag iterator_category;
-  typedef IIty                            value_type;
-  typedef signed                        difference_type;
-  typedef IIty*                           pointer;
-  typedef IIty&                           reference;
-
-  // Default constructor
-  InstIterator() {}
-
-  // Copy constructor...
-  template<typename A, typename B, typename C, typename D>
-  InstIterator(const InstIterator<A,B,C,D> &II)
-    : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
-
-  template<typename A, typename B, typename C, typename D>
-  InstIterator(InstIterator<A,B,C,D> &II)
-    : BBs(II.BBs), BB(II.BB), BI(II.BI) {}
-
-  template<class M> InstIterator(M &m)
-    : BBs(&m.getBasicBlockList()), BB(BBs->begin()) {    // begin ctor
-    if (BB != BBs->end()) {
-      BI = BB->begin();
-      advanceToNextBB();
-    }
-  }
-
-  template<class M> InstIterator(M &m, bool)
-    : BBs(&m.getBasicBlockList()), BB(BBs->end()) {    // end ctor
-  }
-
-  // Accessors to get at the underlying iterators...
-  inline BBIty &getBasicBlockIterator()  { return BB; }
-  inline BIty  &getInstructionIterator() { return BI; }
-
-  inline reference operator*()  const { return *BI; }
-  inline pointer operator->() const { return &operator*(); }
-
-  inline bool operator==(const InstIterator &y) const {
-    return BB == y.BB && (BB == BBs->end() || BI == y.BI);
-  }
-  inline bool operator!=(const InstIterator& y) const {
-    return !operator==(y);
-  }
-
-  InstIterator& operator++() {
-    ++BI;
-    advanceToNextBB();
-    return *this;
-  }
-  inline InstIterator operator++(int) {
-    InstIterator tmp = *this; ++*this; return tmp;
-  }
-
-  InstIterator& operator--() {
-    while (BB == BBs->end() || BI == BB->begin()) {
-      --BB;
-      BI = BB->end();
-    }
-    --BI;
-    return *this;
-  }
-  inline InstIterator  operator--(int) {
-    InstIterator tmp = *this; --*this; return tmp;
-  }
-
-  inline bool atEnd() const { return BB == BBs->end(); }
-
-private:
-  inline void advanceToNextBB() {
-    // The only way that the II could be broken is if it is now pointing to
-    // the end() of the current BasicBlock and there are successor BBs.
-    while (BI == BB->end()) {
-      ++BB;
-      if (BB == BBs->end()) break;
-      BI = BB->begin();
-    }
-  }
-};
-
-
-typedef InstIterator<iplist<BasicBlock>,
-                     Function::iterator, BasicBlock::iterator,
-                     Instruction> inst_iterator;
-typedef InstIterator<const iplist<BasicBlock>,
-                     Function::const_iterator,
-                     BasicBlock::const_iterator,
-                     const Instruction> const_inst_iterator;
-
-inline inst_iterator inst_begin(Function *F) { return inst_iterator(*F); }
-inline inst_iterator inst_end(Function *F)   { return inst_iterator(*F, true); }
-inline const_inst_iterator inst_begin(const Function *F) {
-  return const_inst_iterator(*F);
-}
-inline const_inst_iterator inst_end(const Function *F) {
-  return const_inst_iterator(*F, true);
-}
-inline inst_iterator inst_begin(Function &F) { return inst_iterator(F); }
-inline inst_iterator inst_end(Function &F)   { return inst_iterator(F, true); }
-inline const_inst_iterator inst_begin(const Function &F) {
-  return const_inst_iterator(F);
-}
-inline const_inst_iterator inst_end(const Function &F) {
-  return const_inst_iterator(F, true);
-}
-
-} // End llvm namespace
-
-#endif
index 482119d3036b77bebddb7c8b65ca0a8c19c5fb4b..a83fa192aab843e2d4240e1525d7f08af073eb0f 100644 (file)
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
index 035d16e4e4791923c10b18bff95466bf89961080..c0030cea1df4a95c4daea297c64831e4716ae1b7 100644 (file)
@@ -14,6 +14,7 @@
 #include "llvm/Analysis/AliasSetTracker.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/LLVMContext.h"
@@ -21,7 +22,6 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
index d56d8d867f8725f4ddc0a60f22d18855a33de54b..7c2a04bab9eb52e75c9b31ccac1685e873e86c3a 100644 (file)
 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Type.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 
 using namespace llvm;
index b655be5a13514a8646fc4cc07b508cfb78c425c4..ff98611bae4fdf828b4ea34b9ab735d9eda4f916 100644 (file)
 #include "llvm/Analysis/ScalarEvolution.h"
 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
 #include "llvm/Analysis/ValueTracking.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Operator.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 
 using namespace llvm;
index d94ce686e3fe18aa66d19d7b09c04dc0de3bfff5..b37344b044ced68a9742b9ca18a9ca69d522a30d 100644 (file)
@@ -16,8 +16,8 @@
 #include "llvm/Analysis/FindUsedTypes.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Module.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
index cdae975d845db45aaa03cf43d4a378b8320291b6..f2133f677516e6e1a623aa835f5c3352763f8b59 100644 (file)
 #include "llvm/Analysis/ValueTracking.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CommandLine.h"
-#include "llvm/Support/InstIterator.h"
 #include <set>
 using namespace llvm;
 
index 55dea6ad5ea59785cef6ad18f281c058cd4d52ff..9242318f65ff3364f0ae8e0c23381396b8c8f50c 100644 (file)
 #include "llvm/Analysis/Passes.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/Analysis/MemoryDependenceAnalysis.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/Support/CallSite.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
index f5739d4eab9f3d95cb20d139b2d4710e9f11f00a..cb64f5a42caf1aaa83795e564d1c04450535acdf 100644 (file)
@@ -74,6 +74,7 @@
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/GlobalAlias.h"
 #include "llvm/IR/GlobalVariable.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Operator.h"
@@ -82,7 +83,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetLibraryInfo.h"
index c1fa3720e3f26942d7655b7ced4d16cbf8939cb5..1990dd866926e91d1b599dd18ca9c5c4aa9e715c 100644 (file)
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/CodeGen/ValueTypes.h"
 #include "llvm/IR/DerivedTypes.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Support/CallSite.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/RWMutex.h"
index 0d70c3b04067eddecf94af77c320afd92f37de81..b864c5517bec2ddf581199b2a6ffcf671cef711c 100644 (file)
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Format.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetInstrInfo.h"
index 574b6dab24dae2004f70151e166e7fa1fd60791e..7385e8f39a353a08c0d6cd150f44675cca244896 100644 (file)
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
-#include "llvm/Support/InstIterator.h"
 
 using namespace llvm;
 
index b64c30880b94b760e3d62f1c854efeb3e9ba8372..d4a778ca11ea57ee23e56efb18f277cab7873ac3 100644 (file)
 #include "NVPTXSplitBBatBar.h"
 #include "NVPTXUtilities.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/Intrinsics.h"
-#include "llvm/Support/InstIterator.h"
 
 using namespace llvm;
 
index 6786eb02240cf312f6e86816bc4621222f21a8b0..60a517392fe4a74c227a578fdf60ea732a868e77 100644 (file)
@@ -24,7 +24,7 @@
 #include <vector>
 //#include <iostream>
 #include "llvm/Support/ManagedStatic.h"
-#include "llvm/Support/InstIterator.h"
+#include "llvm/IR/InstIterator.h"
 
 using namespace llvm;
 
index 5ff55b0169e6169785634aa51073b7dbb383efef..45bb488cf6bf30214eb52960025c65092629d613 100644 (file)
@@ -29,9 +29,9 @@
 #include "llvm/Analysis/CallGraphSCCPass.h"
 #include "llvm/Analysis/CaptureTracking.h"
 #include "llvm/IR/GlobalVariable.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/LLVMContext.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Target/TargetLibraryInfo.h"
 using namespace llvm;
 
index 76e4ac890ebc6e696d1466b3eab9dc8d891247fe..4a862b619f6a7fcf468a8ebf986759a31203bd09 100644 (file)
 #include "llvm/Analysis/MemoryBuiltins.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/TargetFolder.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetLibraryInfo.h"
index 95d1fb472254da5d5f150e6996a9d4d989e37ea8..9c84c5c39463499d0ecad71f46b70f31e6b75084 100644 (file)
@@ -26,6 +26,7 @@
 #include "llvm/ADT/UniqueVector.h"
 #include "llvm/DebugInfo.h"
 #include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/Module.h"
@@ -34,7 +35,6 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/DebugLoc.h"
 #include "llvm/Support/FileSystem.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Transforms/Utils/ModuleUtils.h"
index 8a6d67ef828c15df9c78685ddbee73984cfd4276..ce04f3eab27c0666bfb564efe63a59b98c483e62 100644 (file)
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Analysis/ValueTracking.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CallSite.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Transforms/ObjCARC.h"
 #include "llvm/Transforms/Utils/Local.h"
 
index 39bf8f38735b5ae4a5fd69808302764af2a6a8bf..69c45c275c10dcd0560750b945f6d177ca549705 100644 (file)
@@ -28,6 +28,7 @@
 #include "ObjCARC.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/Value.h"
@@ -37,7 +38,6 @@
 #include "llvm/PassSupport.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 
 namespace llvm {
index a53b23ec446c0d221947b45d424344a9fe03b0d8..1f4dd9fa5f6567874a5218e9a790b40d41afc1f0 100644 (file)
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/IR/BasicBlock.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CFG.h"
-#include "llvm/Support/InstIterator.h"
 using namespace llvm;
 
 STATISTIC(NumRemoved, "Number of instructions removed");
index 8549b417446acecec685d71cb6f5577ef9257cd6..04da65b701d6a7f378732bc467211d52bc83f731 100644 (file)
@@ -24,9 +24,9 @@
 #include "llvm/Analysis/ConstantFolding.h"
 #include "llvm/IR/Constant.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/Pass.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Target/TargetLibraryInfo.h"
 #include <set>
 using namespace llvm;
index a4f24df384b6e0eb6227e7752351cb4c79919b89..d32f7c33f17db850423ac0e062722d377f796ddc 100644 (file)
@@ -19,9 +19,9 @@
 #define DEBUG_TYPE "dce"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/Pass.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Target/TargetLibraryInfo.h"
 #include "llvm/Transforms/Utils/Local.h"
 using namespace llvm;
index 129e66dcc64bda8143fa9b934a0546fab2df64a9..48ed801569f18fad6540f39ff0e244e4d491df5c 100644 (file)
@@ -37,6 +37,7 @@
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/MDBuilder.h"
@@ -45,7 +46,6 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/LineIterator.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Regex.h"
index ab7e0a4ac005b2519924d5d45d2d5d88c0771353..bc029e37863469a4eecadd07e63a732bffe506e7 100644 (file)
 #include "llvm/AsmParser/Parser.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/Function.h"
+#include "llvm/IR/InstIterator.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Pass.h"
 #include "llvm/PassManager.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/InstIterator.h"
 #include "llvm/Support/SourceMgr.h"
 #include "gtest/gtest.h"