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

Chris Lattner lattner at cs.uiuc.edu
Sun Jul 11 20:19:01 PDT 2004


Changes in directory llvm/include/llvm:

GlobalValue.h updated: 1.14 -> 1.15

---
Log message:

Implement a new method useful for things like the inliner


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

Index: llvm/include/llvm/GlobalValue.h
diff -u llvm/include/llvm/GlobalValue.h:1.14 llvm/include/llvm/GlobalValue.h:1.15
--- llvm/include/llvm/GlobalValue.h:1.14	Sun Nov 16 14:21:15 2003
+++ llvm/include/llvm/GlobalValue.h	Sun Jul 11 20:17:52 2004
@@ -66,6 +66,16 @@
   inline Module *getParent() { return Parent; }
   inline const Module *getParent() const { return Parent; }
 
+  /// removeDeadConstantUsers - If there are any dead constant users dangling
+  /// 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 function returns true if the global value is now dead.  If all 
+  /// users of this global are not dead, this method may return false and
+  /// leave some of them around.
+  bool removeDeadConstantUsers();
+
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const GlobalValue *T) { return true; }
   static inline bool classof(const Value *V) {





More information about the llvm-commits mailing list