[llvm-commits] [llvm] r144536 - in /llvm/trunk: include/llvm/Transforms/Utils/SSAUpdater.h include/llvm/Transforms/Utils/SSAUpdaterImpl.h include/llvm/Transforms/Utils/SimplifyIndVar.h lib/Transforms/Utils/SSAUpdater.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Nov 14 09:22:45 PST 2011
Author: d0k
Date: Mon Nov 14 11:22:45 2011
New Revision: 144536
URL: http://llvm.org/viewvc/llvm-project?rev=144536&view=rev
Log:
Make headers standalone, move a virtual method out of line.
Modified:
llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h
llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h
llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h
llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp
Modified: llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h?rev=144536&r1=144535&r2=144536&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h Mon Nov 14 11:22:45 2011
@@ -14,16 +14,18 @@
#ifndef LLVM_TRANSFORMS_UTILS_SSAUPDATER_H
#define LLVM_TRANSFORMS_UTILS_SSAUPDATER_H
+#include "llvm/ADT/StringRef.h"
+
namespace llvm {
- class Value;
class BasicBlock;
- class Use;
- class PHINode;
+ class Instruction;
+ class LoadInst;
template<typename T> class SmallVectorImpl;
template<typename T> class SSAUpdaterTraits;
- class DbgDeclareInst;
- class DIBuilder;
- class BumpPtrAllocator;
+ class PHINode;
+ class Type;
+ class Use;
+ class Value;
/// SSAUpdater - This class updates SSA form for a set of values defined in
/// multiple blocks. This is used when code duplication or another unstructured
@@ -137,12 +139,7 @@
/// passed into the run method). Clients should implement this with a more
/// efficient version if possible.
virtual bool isInstInList(Instruction *I,
- const SmallVectorImpl<Instruction*> &Insts) const {
- for (unsigned i = 0, e = Insts.size(); i != e; ++i)
- if (Insts[i] == I)
- return true;
- return false;
- }
+ const SmallVectorImpl<Instruction*> &Insts) const;
/// doExtraRewritesBeforeFinalDeletion - This hook is invoked after all the
/// stores are found and inserted as available values, but
Modified: llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h?rev=144536&r1=144535&r2=144536&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/SSAUpdaterImpl.h Mon Nov 14 11:22:45 2011
@@ -15,8 +15,16 @@
#ifndef LLVM_TRANSFORMS_UTILS_SSAUPDATERIMPL_H
#define LLVM_TRANSFORMS_UTILS_SSAUPDATERIMPL_H
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/Allocator.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/ValueHandle.h"
+
namespace llvm {
+class CastInst;
+class PHINode;
template<typename T> class SSAUpdaterTraits;
template<typename UpdaterT>
Modified: llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h?rev=144536&r1=144535&r2=144536&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h Mon Nov 14 11:22:45 2011
@@ -17,17 +17,18 @@
#define LLVM_TRANSFORMS_UTILS_SIMPLIFYINDVAR_H
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ValueHandle.h"
namespace llvm {
extern cl::opt<bool> DisableIVRewrite;
+class CastInst;
+class IVUsers;
class Loop;
-class LoopInfo;
-class DominatorTree;
-class ScalarEvolution;
class LPPassManager;
-class IVUsers;
+class PHINode;
+class ScalarEvolution;
/// Interface for visiting interesting IV users that are recognized but not
/// simplified by this utility.
Modified: llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp?rev=144536&r1=144535&r2=144536&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp Mon Nov 14 11:22:45 2011
@@ -518,3 +518,10 @@
User->eraseFromParent();
}
}
+
+bool
+LoadAndStorePromoter::isInstInList(Instruction *I,
+ const SmallVectorImpl<Instruction*> &Insts)
+ const {
+ return std::find(Insts.begin(), Insts.end(), I) != Insts.end();
+}
More information about the llvm-commits
mailing list