Add a method to clear optional optimization information from a Value.
authorDan Gohman <gohman@apple.com>
Fri, 17 Jul 2009 18:56:23 +0000 (18:56 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 17 Jul 2009 18:56:23 +0000 (18:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76215 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Value.h

index 35a30a81d5e6fd84fbd7c72535ca60220b068c8f..7e7b415ffdeed671b1ba2ec26cf13a283633a236 100644 (file)
@@ -146,6 +146,12 @@ public:
   // 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.
   //