[llvm-commits] [llvm] r76215 - /llvm/trunk/include/llvm/Value.h

Dan Gohman gohman at apple.com
Fri Jul 17 11:56:24 PDT 2009


Author: djg
Date: Fri Jul 17 13:56:23 2009
New Revision: 76215

URL: http://llvm.org/viewvc/llvm-project?rev=76215&view=rev
Log:
Add a method to clear optional optimization information from a Value.

Modified:
    llvm/trunk/include/llvm/Value.h

Modified: llvm/trunk/include/llvm/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=76215&r1=76214&r2=76215&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Value.h (original)
+++ llvm/trunk/include/llvm/Value.h Fri Jul 17 13:56:23 2009
@@ -146,6 +146,12 @@
   // Only use when in type resolution situations!
   void uncheckedReplaceAllUsesWith(Value *V);
 
+  /// clearOptionalData - Clear any optional optimization data from this Value.
+  /// Transformation passes must call this method whenever changing the IR
+  /// in a way that would affect the values produced by this Value, unless
+  /// it takes special care to ensure correctness in some other way.
+  void clearOptionalData() { SubclassOptionalData = 0; }
+
   //----------------------------------------------------------------------
   // Methods for handling the chain of uses of this Value.
   //





More information about the llvm-commits mailing list