Rename ValuePropagation to a more descriptive CorrelatedValuePropagation.
authorOwen Anderson <resistor@mac.com>
Tue, 31 Aug 2010 07:48:34 +0000 (07:48 +0000)
committerOwen Anderson <resistor@mac.com>
Tue, 31 Aug 2010 07:48:34 +0000 (07:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112591 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/LinkAllPasses.h
include/llvm/Transforms/Scalar.h
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
test/Transforms/ValuePropagation/basic.ll

index ffb4da6688ddc22a3b383993f7b6761c34638162..35dab62143dfe14956c926a0131ebdcb3fe6e1a9 100644 (file)
@@ -146,7 +146,7 @@ namespace {
       (void) llvm::createLintPass();
       (void) llvm::createSinkingPass();
       (void) llvm::createLowerAtomicPass();
-      (void) llvm::createValuePropagationPass();
+      (void) llvm::createCorrelatedValuePropagationPass();
 
       (void)new llvm::IntervalPartition();
       (void)new llvm::FindUsedTypes();
index 0320b12627ec4310a9c33452f24eb23acce689ce..0c35d7e01fa440ca989000b40046cfc5b973d109 100644 (file)
@@ -327,7 +327,7 @@ Pass *createLowerAtomicPass();
 //
 // ValuePropagation - Propagate CFG-derived value information
 //
-Pass *createValuePropagationPass();
+Pass *createCorrelatedValuePropagationPass();
 
 } // End llvm namespace
 
index 8f398883a2c330cc1b4a71a539e8d12b3fcdbb32..9616b9b6adef8a3a27d68c4207faa445280911f2 100644 (file)
@@ -1,4 +1,4 @@
-//===- ValuePropagation.cpp - Propagate information derived control flow --===//
+//===- CorrelatedValuePropagation.cpp - Propagate CFG-derived info --------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,11 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the Value Propagation pass.
+// This file implements the Correlated Value Propagation pass.
 //
 //===----------------------------------------------------------------------===//
 
-#define DEBUG_TYPE "value-propagation"
+#define DEBUG_TYPE "correlated-value-propagation"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
@@ -25,7 +25,7 @@ STATISTIC(NumPhis,    "Number of phis propagated");
 STATISTIC(NumSelects, "Number of selects propagated");
 
 namespace {
-  class ValuePropagation : public FunctionPass {
+  class CorrelatedValuePropagation : public FunctionPass {
     LazyValueInfo *LVI;
     
     bool processSelect(SelectInst *SI);
@@ -33,7 +33,7 @@ namespace {
     
   public:
     static char ID;
-    ValuePropagation(): FunctionPass(ID) { }
+    CorrelatedValuePropagation(): FunctionPass(ID) { }
     
     bool runOnFunction(Function &F);
     
@@ -43,16 +43,16 @@ namespace {
   };
 }
 
-char ValuePropagation::ID = 0;
-INITIALIZE_PASS(ValuePropagation, "value-propagation",
+char CorrelatedValuePropagation::ID = 0;
+INITIALIZE_PASS(CorrelatedValuePropagation, "correlated-propagation",
                 "Value Propagation", false, false);
 
 // Public interface to the Value Propagation pass
-Pass *llvm::createValuePropagationPass() {
-  return new ValuePropagation();
+Pass *llvm::createCorrelatedValuePropagationPass() {
+  return new CorrelatedValuePropagation();
 }
 
-bool ValuePropagation::processSelect(SelectInst *S) {
+bool CorrelatedValuePropagation::processSelect(SelectInst *S) {
   if (S->getType()->isVectorTy()) return false;
   
   Constant *C = LVI->getConstant(S->getOperand(0), S->getParent());
@@ -69,7 +69,7 @@ bool ValuePropagation::processSelect(SelectInst *S) {
   return true;
 }
 
-bool ValuePropagation::processPHI(PHINode *P) {
+bool CorrelatedValuePropagation::processPHI(PHINode *P) {
   bool Changed = false;
   
   BasicBlock *BB = P->getParent();
@@ -97,7 +97,7 @@ bool ValuePropagation::processPHI(PHINode *P) {
   return Changed;
 }
 
-bool ValuePropagation::runOnFunction(Function &F) {
+bool CorrelatedValuePropagation::runOnFunction(Function &F) {
   LVI = &getAnalysis<LazyValueInfo>();
   
   bool Changed = false;
index 2cb6afc721c937a22187fa684a19df78a18e2b2e..b210d37f1b8dcc3d1436be40408a5e5cdab5f5c1 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -value-propagation -S | FileCheck %s
+; RUN: opt < %s -correlated-propagation -S | FileCheck %s
 ; PR2581
 
 ; CHECK: @test1