[llvm-commits] [llvm] r58010 - in /llvm/trunk: include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/IndVarSimplify.cpp lib/Transforms/Scalar/LICM.cpp lib/Transforms/Scalar/LoopDeletion.cpp lib/Transforms/Scalar/LoopIndexSplit.cpp lib/Transforms/Scalar/LoopRotation.cpp lib/Transforms/Scalar/LoopStrengthReduce.cpp lib/Transforms/Scalar/LoopUnroll.cpp lib/Transforms/Scalar/LoopUnswitch.cpp lib/Transforms/Utils/LCSSA.cpp
Daniel Dunbar
daniel at zuster.org
Wed Oct 22 16:32:42 PDT 2008
Author: ddunbar
Date: Wed Oct 22 18:32:42 2008
New Revision: 58010
URL: http://llvm.org/viewvc/llvm-project?rev=58010&view=rev
Log:
Change create*Pass factory functions to return Pass* instead of
LoopPass*.
- Although less precise, this means they can be used in clients
without RTTI (who would otherwise need to include LoopPass.h, which
eventually includes things using dynamic_cast). This was the
simplest solution that presented itself, but I am happy to use a
better one if available.
Modified:
llvm/trunk/include/llvm/Transforms/Scalar.h
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
Modified: llvm/trunk/include/llvm/Transforms/Scalar.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Scalar.h (original)
+++ llvm/trunk/include/llvm/Transforms/Scalar.h Wed Oct 22 18:32:42 2008
@@ -18,7 +18,6 @@
namespace llvm {
class FunctionPass;
-class LoopPass;
class Pass;
class GetElementPtrInst;
class PassInfo;
@@ -81,7 +80,7 @@
// InductionVariableSimplify - Transform induction variables in a program to all
// use a single canonical induction variable per loop.
//
-LoopPass *createIndVarSimplifyPass();
+Pass *createIndVarSimplifyPass();
//===----------------------------------------------------------------------===//
//
@@ -101,7 +100,7 @@
//
// LICM - This pass is a loop invariant code motion and memory promotion pass.
//
-LoopPass *createLICMPass();
+Pass *createLICMPass();
//===----------------------------------------------------------------------===//
//
@@ -110,32 +109,32 @@
// optional parameter used to consult the target machine whether certain
// transformations are profitable.
//
-LoopPass *createLoopStrengthReducePass(const TargetLowering *TLI = 0);
+Pass *createLoopStrengthReducePass(const TargetLowering *TLI = 0);
//===----------------------------------------------------------------------===//
//
// LoopUnswitch - This pass is a simple loop unswitching pass.
//
-LoopPass *createLoopUnswitchPass(bool OptimizeForSize = false);
+Pass *createLoopUnswitchPass(bool OptimizeForSize = false);
//===----------------------------------------------------------------------===//
//
// LoopUnroll - This pass is a simple loop unrolling pass.
//
-LoopPass *createLoopUnrollPass();
+Pass *createLoopUnrollPass();
//===----------------------------------------------------------------------===//
//
// LoopRotate - This pass is a simple loop rotating pass.
//
-LoopPass *createLoopRotatePass();
+Pass *createLoopRotatePass();
//===----------------------------------------------------------------------===//
//
// LoopIndexSplit - This pass divides loop's iteration range by spliting loop
// such that each individual loop is executed efficiently.
//
-LoopPass *createLoopIndexSplitPass();
+Pass *createLoopIndexSplitPass();
//===----------------------------------------------------------------------===//
//
@@ -274,7 +273,7 @@
// LCSSA - This pass inserts phi nodes at loop boundaries to simplify other loop
// optimizations.
//
-LoopPass *createLCSSAPass();
+Pass *createLCSSAPass();
extern const PassInfo *const LCSSAID;
//===----------------------------------------------------------------------===//
@@ -310,7 +309,7 @@
// LoopDeletion - This pass performs DCE of non-infinite loops that it
// can prove are dead.
//
-LoopPass *createLoopDeletionPass();
+Pass *createLoopDeletionPass();
//===----------------------------------------------------------------------===//
//
Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Oct 22 18:32:42 2008
@@ -102,7 +102,7 @@
static RegisterPass<IndVarSimplify>
X("indvars", "Canonicalize Induction Variables");
-LoopPass *llvm::createIndVarSimplifyPass() {
+Pass *llvm::createIndVarSimplifyPass() {
return new IndVarSimplify();
}
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Wed Oct 22 18:32:42 2008
@@ -230,7 +230,7 @@
char LICM::ID = 0;
static RegisterPass<LICM> X("licm", "Loop Invariant Code Motion");
-LoopPass *llvm::createLICMPass() { return new LICM(); }
+Pass *llvm::createLICMPass() { return new LICM(); }
/// Hoist expressions out of the specified loop. Note, alias info for inner
/// loop is not preserved so it is not a good idea to run LICM multiple
Modified: llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp Wed Oct 22 18:32:42 2008
@@ -60,7 +60,7 @@
char LoopDeletion::ID = 0;
static RegisterPass<LoopDeletion> X("loop-deletion", "Delete dead loops");
-LoopPass* llvm::createLoopDeletionPass() {
+Pass* llvm::createLoopDeletionPass() {
return new LoopDeletion();
}
Modified: llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Wed Oct 22 18:32:42 2008
@@ -205,7 +205,7 @@
static RegisterPass<LoopIndexSplit>
X("loop-index-split", "Index Split Loops");
-LoopPass *llvm::createLoopIndexSplitPass() {
+Pass *llvm::createLoopIndexSplitPass() {
return new LoopIndexSplit();
}
Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Wed Oct 22 18:32:42 2008
@@ -107,7 +107,7 @@
char LoopRotate::ID = 0;
static RegisterPass<LoopRotate> X("loop-rotate", "Rotate Loops");
-LoopPass *llvm::createLoopRotatePass() { return new LoopRotate(); }
+Pass *llvm::createLoopRotatePass() { return new LoopRotate(); }
/// Rotate Loop L as many times as possible. Return true if
/// loop is rotated at least once.
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Oct 22 18:32:42 2008
@@ -213,7 +213,7 @@
static RegisterPass<LoopStrengthReduce>
X("loop-reduce", "Loop Strength Reduction");
-LoopPass *llvm::createLoopStrengthReducePass(const TargetLowering *TLI) {
+Pass *llvm::createLoopStrengthReducePass(const TargetLowering *TLI) {
return new LoopStrengthReduce(TLI);
}
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnroll.cpp Wed Oct 22 18:32:42 2008
@@ -73,7 +73,7 @@
char LoopUnroll::ID = 0;
static RegisterPass<LoopUnroll> X("loop-unroll", "Unroll loops");
-LoopPass *llvm::createLoopUnrollPass() { return new LoopUnroll(); }
+Pass *llvm::createLoopUnrollPass() { return new LoopUnroll(); }
/// ApproximateLoopSize - Approximate the size of the loop.
static unsigned ApproximateLoopSize(const Loop *L) {
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Oct 22 18:32:42 2008
@@ -154,7 +154,7 @@
char LoopUnswitch::ID = 0;
static RegisterPass<LoopUnswitch> X("loop-unswitch", "Unswitch loops");
-LoopPass *llvm::createLoopUnswitchPass(bool Os) {
+Pass *llvm::createLoopUnswitchPass(bool Os) {
return new LoopUnswitch(Os);
}
Modified: llvm/trunk/lib/Transforms/Utils/LCSSA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LCSSA.cpp?rev=58010&r1=58009&r2=58010&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LCSSA.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LCSSA.cpp Wed Oct 22 18:32:42 2008
@@ -99,7 +99,7 @@
char LCSSA::ID = 0;
static RegisterPass<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass");
-LoopPass *llvm::createLCSSAPass() { return new LCSSA(); }
+Pass *llvm::createLCSSAPass() { return new LCSSA(); }
const PassInfo *const llvm::LCSSAID = &X;
/// runOnFunction - Process all loops in the function, inner-most out.
More information about the llvm-commits
mailing list