diff --git a/include/llvm/Value.h b/include/llvm/Value.h index a38d8cb8d98..35a30a81d5e 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -62,6 +62,12 @@ class Value { 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. diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index f3d561fe39b..b35ad507984 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -40,7 +40,8 @@ static inline const Type *checkType(const Type *Ty) { } Value::Value(const Type *ty, unsigned scid) - : SubclassID(scid), HasValueHandle(0), SubclassData(0), VTy(checkType(ty)), + : SubclassID(scid), HasValueHandle(0), SubclassOptionalData(0), + SubclassData(0), VTy(checkType(ty)), UseList(0), Name(0) { if (isa(this) || isa(this)) assert((VTy->isFirstClassType() || VTy == Type::VoidTy ||