[Function] Clean up {prefix,prologue} data routines (NFC)
[oota-llvm.git] / lib / IR / LLVMContextImpl.h
index cf0aa5c62ab7af0dd4fbed036f81eb64d645b845..2df7d04708e04ba06c02e9c15aa880d374db01de 100644 (file)
@@ -972,20 +972,30 @@ public:
   /// instructions in different blocks at the same location.
   DenseMap<std::pair<const char *, unsigned>, unsigned> DiscriminatorTable;
 
+  typedef DenseMap<const Function *, ReturnInst *> FunctionDataMapTy;
+
   /// \brief Mapping from a function to its prefix data, which is stored as the
   /// operand of an unparented ReturnInst so that the prefix data has a Use.
-  typedef DenseMap<const Function *, ReturnInst *> PrefixDataMapTy;
-  PrefixDataMapTy PrefixDataMap;
+  FunctionDataMapTy PrefixDataMap;
 
   /// \brief Mapping from a function to its prologue data, which is stored as
   /// the operand of an unparented ReturnInst so that the prologue data has a
   /// Use.
-  typedef DenseMap<const Function *, ReturnInst *> PrologueDataMapTy;
-  PrologueDataMapTy PrologueDataMap;
+  FunctionDataMapTy PrologueDataMap;
 
   int getOrAddScopeRecordIdxEntry(MDNode *N, int ExistingIdx);
   int getOrAddScopeInlinedAtIdxEntry(MDNode *Scope, MDNode *IA,int ExistingIdx);
 
+  /// \brief A set of interned tags for operand bundles.  The StringMap maps
+  /// bundle tags to their IDs.
+  ///
+  /// \see LLVMContext::getOperandBundleTagID
+  StringMap<uint32_t> BundleTagCache;
+
+  StringMapEntry<uint32_t> *getOrInsertBundleTag(StringRef Tag);
+  void getOperandBundleTags(SmallVectorImpl<StringRef> &Tags) const;
+  uint32_t getOperandBundleTagID(StringRef Tag) const;
+
   LLVMContextImpl(LLVMContext &C);
   ~LLVMContextImpl();