[llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 2 16:29:35 PDT 2005



Changes in directory llvm/lib/Transforms/Utils:

SimplifyCFG.cpp updated: 1.73 -> 1.74
---
Log message:

Change a place to use an arbitrary value instead of null, when possible


---
Diffs of the changes:  (+3 -3)

 SimplifyCFG.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.73 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.74
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.73	Mon Aug  1 22:24:05 2005
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp	Tue Aug  2 18:29:23 2005
@@ -849,13 +849,13 @@
     while (!BB->empty()) {
       Instruction &I = BB->back();
       // If this instruction is used, replace uses with an arbitrary
-      // constant value.  Because control flow can't get here, we don't care
+      // value.  Because control flow can't get here, we don't care
       // what we replace the value with.  Note that since this block is
       // unreachable, and all values contained within it must dominate their
       // uses, that all uses will eventually be removed.
       if (!I.use_empty())
-        // Make all users of this instruction reference the constant instead
-        I.replaceAllUsesWith(Constant::getNullValue(I.getType()));
+        // Make all users of this instruction use undef instead
+        I.replaceAllUsesWith(UndefValue::get(I.getType()));
 
       // Remove the instruction from the basic block
       BB->getInstList().pop_back();






More information about the llvm-commits mailing list