Add mfasr and mtasr
[oota-llvm.git] / include / llvm / CodeGen / LexicalScopes.h
index 31d40ff588cc7c1d4a69674016e18d2027c5e65f..036aea30a5102b48d06b885f706f8393f1a95a52 100644 (file)
@@ -21,6 +21,7 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/IR/DebugLoc.h"
 #include "llvm/IR/Metadata.h"
 #include "llvm/IR/ValueHandle.h"
@@ -185,9 +186,7 @@ public:
 
   /// findInlinedScope - Find an inlined scope for the given DebugLoc or return
   /// NULL.
-  LexicalScope *findInlinedScope(DebugLoc DL) {
-    return InlinedLexicalScopeMap.lookup(DL);
-  }
+  LexicalScope *findInlinedScope(DebugLoc DL);
 
   /// findLexicalScope - Find regular lexical scope or return null.
   LexicalScope *findLexicalScope(const MDNode *N) {
@@ -198,6 +197,9 @@ public:
   /// dump - Print data structures to dbgs().
   void dump();
 
+  /// getOrCreateAbstractScope - Find or create an abstract lexical scope.
+  LexicalScope *getOrCreateAbstractScope(const MDNode *N);
+
 private:
   /// getOrCreateLexicalScope - Find lexical scope for the given DebugLoc. If
   /// not available then create new lexical scope.
@@ -209,9 +211,6 @@ private:
   /// getOrCreateInlinedScope - Find or create an inlined lexical scope.
   LexicalScope *getOrCreateInlinedScope(MDNode *Scope, MDNode *InlinedAt);
 
-  /// getOrCreateAbstractScope - Find or create an abstract lexical scope.
-  LexicalScope *getOrCreateAbstractScope(const MDNode *N);
-
   /// extractLexicalScopes - Extract instruction ranges for each lexical scopes
   /// for the given machine function.
   void extractLexicalScopes(SmallVectorImpl<InsnRange> &MIRanges,
@@ -230,7 +229,9 @@ private:
 
   /// InlinedLexicalScopeMap - Tracks inlined function scopes in current
   /// function.
-  DenseMap<DebugLoc, LexicalScope *> InlinedLexicalScopeMap;
+  std::unordered_map<std::pair<const MDNode *, const MDNode *>, LexicalScope,
+                     pair_hash<const MDNode *, const MDNode *>>
+  InlinedLexicalScopeMap;
 
   /// AbstractScopeMap - These scopes are  not included LexicalScopeMap.
   // Use an unordered_map to ensure value pointer validity over insertion.