[llvm-commits] [llvm] r76189 - in /llvm/trunk: include/llvm/Value.h lib/VMCore/Value.cpp
Dan Gohman
gohman at apple.com
Fri Jul 17 10:17:30 PDT 2009
Author: djg
Date: Fri Jul 17 12:16:59 2009
New Revision: 76189
URL: http://llvm.org/viewvc/llvm-project?rev=76189&view=rev
Log:
Add a SubclassOptionalData field to Value. See the doxygen comment for
details.
Modified:
llvm/trunk/include/llvm/Value.h
llvm/trunk/lib/VMCore/Value.cpp
Modified: llvm/trunk/include/llvm/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=76189&r1=76188&r2=76189&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Value.h (original)
+++ llvm/trunk/include/llvm/Value.h Fri Jul 17 12:16:59 2009
@@ -62,6 +62,12 @@
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.
Modified: llvm/trunk/lib/VMCore/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Value.cpp?rev=76189&r1=76188&r2=76189&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Value.cpp (original)
+++ llvm/trunk/lib/VMCore/Value.cpp Fri Jul 17 12:16:59 2009
@@ -40,7 +40,8 @@
}
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<CallInst>(this) || isa<InvokeInst>(this))
assert((VTy->isFirstClassType() || VTy == Type::VoidTy ||
More information about the llvm-commits
mailing list