move some stuff into DEBUG's and turn on lazy-value-info for
authorChris Lattner <sabre@nondot.org>
Thu, 12 Nov 2009 01:22:16 +0000 (01:22 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 12 Nov 2009 01:22:16 +0000 (01:22 +0000)
the basic.ll testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86918 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LazyValueInfo.cpp
test/Transforms/JumpThreading/basic.ll

index b4f23fd96bd32c456df99dacc331eb51df43a5a6..c17b72745947af5b64315741e983d4ee1dd35c30 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+#define DEBUG_TYPE "lazy-value-info"
 #include "llvm/Analysis/LazyValueInfo.h"
 #include "llvm/Constants.h"
 #include "llvm/Instructions.h"
 #include "llvm/Analysis/ConstantFolding.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/PointerIntPair.h"
@@ -257,11 +259,11 @@ Constant *LazyValueInfo::getConstant(Value *V, BasicBlock *BB) {
   
   DenseMap<BasicBlock*, LVILatticeVal> BlockValues;
   
-  errs() << "Getting value " << *V << " at end of block '"
-         << BB->getName() << "'\n";
+  DEBUG(errs() << "Getting value " << *V << " at end of block '"
+               << BB->getName() << "'\n");
   LVILatticeVal Result = GetValueInBlock(V, BB, BlockValues);
   
-  errs() << "  Result = " << Result << "\n";
+  DEBUG(errs() << "  Result = " << Result << "\n");
 
   if (Result.isConstant())
     return Result.getConstant();
index 1e948ed8825422c7d0c7af9d0cc7a42f74b85790..514c865f9c9ce1df029ae73500adaf9cd1109105 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -jump-threading -S | FileCheck %s
+; RUN: opt %s -jump-threading -S -enable-jump-threading-lvi | FileCheck %s
 
 declare i32 @f1()
 declare i32 @f2()