mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 16:54:48 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58010 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
30f100e140
commit
394f0441e0
@ -18,7 +18,6 @@
|
||||
namespace llvm {
|
||||
|
||||
class FunctionPass;
|
||||
class LoopPass;
|
||||
class Pass;
|
||||
class GetElementPtrInst;
|
||||
class PassInfo;
|
||||
@ -81,7 +80,7 @@ FunctionPass *createScalarReplAggregatesPass(signed Threshold = -1);
|
||||
// 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 @@ FunctionPass *createInstructionCombiningPass();
|
||||
//
|
||||
// LICM - This pass is a loop invariant code motion and memory promotion pass.
|
||||
//
|
||||
LoopPass *createLICMPass();
|
||||
Pass *createLICMPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
@ -110,32 +109,32 @@ LoopPass *createLICMPass();
|
||||
// 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 @@ FunctionPass *createBlockPlacementPass();
|
||||
// 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 @@ FunctionPass *createMemCpyOptPass();
|
||||
// LoopDeletion - This pass performs DCE of non-infinite loops that it
|
||||
// can prove are dead.
|
||||
//
|
||||
LoopPass *createLoopDeletionPass();
|
||||
Pass *createLoopDeletionPass();
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
|
@ -102,7 +102,7 @@ char IndVarSimplify::ID = 0;
|
||||
static RegisterPass<IndVarSimplify>
|
||||
X("indvars", "Canonicalize Induction Variables");
|
||||
|
||||
LoopPass *llvm::createIndVarSimplifyPass() {
|
||||
Pass *llvm::createIndVarSimplifyPass() {
|
||||
return new IndVarSimplify();
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ namespace {
|
||||
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
|
||||
|
@ -60,7 +60,7 @@ namespace {
|
||||
char LoopDeletion::ID = 0;
|
||||
static RegisterPass<LoopDeletion> X("loop-deletion", "Delete dead loops");
|
||||
|
||||
LoopPass* llvm::createLoopDeletionPass() {
|
||||
Pass* llvm::createLoopDeletionPass() {
|
||||
return new LoopDeletion();
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ char LoopIndexSplit::ID = 0;
|
||||
static RegisterPass<LoopIndexSplit>
|
||||
X("loop-index-split", "Index Split Loops");
|
||||
|
||||
LoopPass *llvm::createLoopIndexSplitPass() {
|
||||
Pass *llvm::createLoopIndexSplitPass() {
|
||||
return new LoopIndexSplit();
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ namespace {
|
||||
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.
|
||||
|
@ -213,7 +213,7 @@ char LoopStrengthReduce::ID = 0;
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace {
|
||||
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) {
|
||||
|
@ -154,7 +154,7 @@ namespace {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ namespace {
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user