[llvm-commits] CVS: llvm/include/llvm/GlobalValue.h

Chris Lattner sabre at nondot.org
Sun Feb 25 13:06:35 PST 2007



Changes in directory llvm/include/llvm:

GlobalValue.h updated: 1.33 -> 1.34
---
Log message:

Rework GlobalValue::removeDeadConstantUsers to always remove dead constant
exprs hanging off a global, even if the global is not otherwise dead.  This
requires some tricky iterator gymnastics.

This implements Transforms/GlobalOpt/constantexpr-dangle.ll by deleting a
constantexpr that made it appear that the address of the function was taken.


---
Diffs of the changes:  (+0 -4)

 GlobalValue.h |    4 ----
 1 files changed, 4 deletions(-)


Index: llvm/include/llvm/GlobalValue.h
diff -u llvm/include/llvm/GlobalValue.h:1.33 llvm/include/llvm/GlobalValue.h:1.34
--- llvm/include/llvm/GlobalValue.h:1.33	Sun Feb 11 23:18:08 2007
+++ llvm/include/llvm/GlobalValue.h	Sun Feb 25 15:06:13 2007
@@ -128,10 +128,6 @@
   /// off of this global value, remove them.  This method is useful for clients
   /// that want to check to see if a global is unused, but don't want to deal
   /// with potentially dead constants hanging off of the globals.
-  ///
-  /// This method tries to make the global dead.  If it detects a user that
-  /// would prevent it from becoming completely dead, it gives up early,
-  /// potentially leaving some dead constant users around.
   void removeDeadConstantUsers();
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:






More information about the llvm-commits mailing list