summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ConstantProp.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-07 20:49:59 +0000
committerChris Lattner <sabre@nondot.org>2002-04-07 20:49:59 +0000
commit62b7fd136e69426ce2655e4cda3e989ccd83ab6a (patch)
tree57d9202d4dd7e3d248f5f4c5717d0c55ec62e43f /llvm/lib/Transforms/Scalar/ConstantProp.cpp
parent53a46fb75983cad20b309d920d59d10a6580a332 (diff)
downloadbcm5719-llvm-62b7fd136e69426ce2655e4cda3e989ccd83ab6a.tar.gz
bcm5719-llvm-62b7fd136e69426ce2655e4cda3e989ccd83ab6a.zip
Change references to the Method class to be references to the Function
class. The Method class is obsolete (renamed) and all references to it are being converted over to Function. llvm-svn: 2144
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ConstantProp.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/ConstantProp.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/ConstantProp.cpp b/llvm/lib/Transforms/Scalar/ConstantProp.cpp
index 624e6da39da..8818b5d9673 100644
--- a/llvm/lib/Transforms/Scalar/ConstantProp.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstantProp.cpp
@@ -24,7 +24,7 @@
#include "llvm/Transforms/Scalar/ConstantProp.h"
#include "llvm/Transforms/Scalar/ConstantHandling.h"
#include "llvm/Module.h"
-#include "llvm/Method.h"
+#include "llvm/Function.h"
#include "llvm/BasicBlock.h"
#include "llvm/iTerminators.h"
#include "llvm/iPHINode.h"
@@ -116,7 +116,7 @@ bool ConstantFoldTerminator(BasicBlock *BB, BasicBlock::iterator &II,
BasicBlock *Destination = Cond->getValue() ? Dest1 : Dest2;
BasicBlock *OldDest = Cond->getValue() ? Dest2 : Dest1;
- //cerr << "Method: " << T->getParent()->getParent()
+ //cerr << "Function: " << T->getParent()->getParent()
// << "\nRemoving branch from " << T->getParent()
// << "\n\nTo: " << OldDest << endl;
@@ -196,10 +196,10 @@ bool doConstantPropogation(BasicBlock *BB, BasicBlock::iterator &II) {
// DoConstPropPass - Propogate constants and do constant folding on instructions
// this returns true if something was changed, false if nothing was changed.
//
-static bool DoConstPropPass(Method *M) {
+static bool DoConstPropPass(Function *F) {
bool SomethingChanged = false;
- for (Method::iterator BBI = M->begin(); BBI != M->end(); ++BBI) {
+ for (Method::iterator BBI = F->begin(); BBI != F->end(); ++BBI) {
BasicBlock *BB = *BBI;
for (BasicBlock::iterator I = BB->begin(); I != BB->end(); )
if (doConstantPropogation(BB, I))
@@ -212,11 +212,11 @@ static bool DoConstPropPass(Method *M) {
namespace {
struct ConstantPropogation : public MethodPass {
- inline bool runOnMethod(Method *M) {
+ inline bool runOnMethod(Function *F) {
bool Modified = false;
// Fold constants until we make no progress...
- while (DoConstPropPass(M)) Modified = true;
+ while (DoConstPropPass(F)) Modified = true;
return Modified;
}
OpenPOWER on IntegriCloud