Add a comment to describe why vector shuffles are legalized to custom DAG nodes.
[oota-llvm.git] / lib / VMCore / LLVMContextImpl.h
index 993b155d40974c07e743c58e72ddae92b1597fb3..30a7fc4af930d6473c3963716d1d21d48e9c78c6 100644 (file)
@@ -34,7 +34,7 @@ class ConstantInt;
 class ConstantFP;
 class MDString;
 class MDNode;
-struct LLVMContext;
+class LLVMContext;
 class Type;
 class Value;
 
@@ -90,7 +90,8 @@ struct DenseMapAPFloatKeyInfo {
   static bool isPod() { return false; }
 };
 
-struct LLVMContextImpl {
+class LLVMContextImpl {
+public:
   sys::SmartRWMutex<true> ConstantsLock;
   
   typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*, 
@@ -103,9 +104,12 @@ struct LLVMContextImpl {
   
   StringMap<MDString*> MDStringCache;
   
-  FoldingSet<MDNode> MDNodeSet;
-  
   ValueMap<char, Type, ConstantAggregateZero> AggZeroConstants;
+
+  typedef ValueMap<std::vector<Value*>, Type, MDNode, true /*largekey*/> 
+  MDNodeMapTy;
+
+  MDNodeMapTy MDNodes;
   
   typedef ValueMap<std::vector<Constant*>, ArrayType, 
     ConstantArray, true /*largekey*/> ArrayConstantsTy;
@@ -131,6 +135,8 @@ struct LLVMContextImpl {
   TypeMap<ArrayValType, ArrayType> ArrayTypes;
   TypeMap<VectorValType, VectorType> VectorTypes;
   TypeMap<PointerValType, PointerType> PointerTypes;
+  TypeMap<FunctionValType, FunctionType> FunctionTypes;
+  TypeMap<StructValType, StructType> StructTypes;
   
   LLVMContextImpl() : TheTrueVal(0), TheFalseVal(0) { }
 };