summaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-07 18:18:00 +0000
committerChris Lattner <sabre@nondot.org>2002-05-07 18:18:00 +0000
commit88d15ab0d62293b0a0471abb4d317f5de37258f6 (patch)
tree689266a9c68ba8af91d58c76080e8c0699e15105 /include/llvm/Transforms
parent497c60c0ed891f4a189287cf3c1ad44dfcfe3099 (diff)
downloadexternal_llvm-88d15ab0d62293b0a0471abb4d317f5de37258f6.zip
external_llvm-88d15ab0d62293b0a0471abb4d317f5de37258f6.tar.gz
external_llvm-88d15ab0d62293b0a0471abb4d317f5de37258f6.tar.bz2
Factor code out to the Transform Utils library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Scalar/ConstantProp.h16
-rw-r--r--include/llvm/Transforms/Scalar/DCE.h29
2 files changed, 3 insertions, 42 deletions
diff --git a/include/llvm/Transforms/Scalar/ConstantProp.h b/include/llvm/Transforms/Scalar/ConstantProp.h
index 0da13e9..a093867 100644
--- a/include/llvm/Transforms/Scalar/ConstantProp.h
+++ b/include/llvm/Transforms/Scalar/ConstantProp.h
@@ -7,8 +7,6 @@
#ifndef LLVM_TRANSFORMS_SCALAR_CONSTANT_PROPOGATION_H
#define LLVM_TRANSFORMS_SCALAR_CONSTANT_PROPOGATION_H
-#include "llvm/BasicBlock.h"
-class TerminatorInst;
class Pass;
//===----------------------------------------------------------------------===//
@@ -16,20 +14,6 @@ class Pass;
//
Pass *createConstantPropogationPass();
-// doConstantPropogation - Constant prop a specific instruction. Returns true
-// and potentially moves the iterator if constant propogation was performed.
-//
-bool doConstantPropogation(BasicBlock *BB, BasicBlock::iterator &I);
-
-// ConstantFoldTerminator - If a terminator instruction is predicated on a
-// constant value, convert it into an unconditional branch to the constant
-// destination. This is a nontrivial operation because the successors of this
-// basic block must have their PHI nodes updated.
-//
-bool ConstantFoldTerminator(BasicBlock *BB, BasicBlock::iterator &I,
- TerminatorInst *T);
-
-
//===----------------------------------------------------------------------===//
// Sparse Conditional Constant Propogation Pass
//
diff --git a/include/llvm/Transforms/Scalar/DCE.h b/include/llvm/Transforms/Scalar/DCE.h
index 35b929d..34f9271 100644
--- a/include/llvm/Transforms/Scalar/DCE.h
+++ b/include/llvm/Transforms/Scalar/DCE.h
@@ -1,15 +1,13 @@
-//===-- DCE.h - Functions that perform Dead Code Elimination -----*- C++ -*--=//
+//===-- DCE.h - Passes that perform Dead Code Elimination --------*- C++ -*--=//
//
-// This family of functions is useful for performing dead code elimination of
-// various sorts.
+// This family of passes is useful for performing dead code elimination of
+// various strengths.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_SCALAR_DCE_H
#define LLVM_TRANSFORMS_SCALAR_DCE_H
-#include "llvm/Function.h"
-#include "llvm/BasicBlock.h"
class Pass;
//===----------------------------------------------------------------------===//
@@ -33,15 +31,6 @@ Pass *createDeadInstEliminationPass();
Pass *createDeadCodeEliminationPass();
-// dceInstruction - Inspect the instruction at *BBI and figure out if it's
-// [trivially] dead. If so, remove the instruction and update the iterator
-// to point to the instruction that immediately succeeded the original
-// instruction.
-//
-bool dceInstruction(BasicBlock::InstListType &BBIL,
- BasicBlock::iterator &BBI);
-
-
//===----------------------------------------------------------------------===//
// AgressiveDCE - This pass uses the SSA based Agressive DCE algorithm. This
@@ -50,16 +39,4 @@ bool dceInstruction(BasicBlock::InstListType &BBIL,
//
Pass *createAgressiveDCEPass();
-
-// SimplifyCFG - This function is used to do simplification of a CFG. For
-// example, it adjusts branches to branches to eliminate the extra hop, it
-// eliminates unreachable basic blocks, and does other "peephole" optimization
-// of the CFG. It returns true if a modification was made, and returns an
-// iterator that designates the first element remaining after the block that
-// was deleted.
-//
-// WARNING: The entry node of a method may not be simplified.
-//
-bool SimplifyCFG(Function::iterator &BBIt);
-
#endif