const unsigned char SubclassID; // Subclass identifier (for isa/dyn_cast)
unsigned char HasValueHandle : 1; // Has a ValueHandle pointing to this?
protected:
+ /// SubclassOptionalData - This member is similar to SubclassData, however it
+ /// is for holding information which may be used to aid optimization, but
+ /// which may be cleared to zero without affecting conservative
+ /// interpretation.
+ unsigned char SubclassOptionalData : 7;
+
/// SubclassData - This member is defined by this class, but is not used for
/// anything. Subclasses can use it to hold whatever state they find useful.
/// This field is initialized to zero by the ctor.
// 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.
//