Change LiveStackAnalysis::SS2IntervalMap from std::map to std::unordered_map
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 3 Mar 2015 23:53:00 +0000 (23:53 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 3 Mar 2015 23:53:00 +0000 (23:53 +0000)
This use case doesn't appear to benefit from ordering, and
std::unordered_map has the advantage that it supports emplace (the
LiveInterval values really shouldn't be copyable or movable & they won't
be in a near-future patch).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231175 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveStackAnalysis.h

index df683983fa53e8245648139eede6744974b5c923..3da33ba3fc9db2c0286cad2fa9b5c0fa6a0381b5 100644 (file)
@@ -33,7 +33,7 @@ namespace llvm {
 
     /// S2IMap - Stack slot indices to live interval mapping.
     ///
-    typedef std::map<int, LiveInterval> SS2IntervalMap;
+    typedef std::unordered_map<int, LiveInterval> SS2IntervalMap;
     SS2IntervalMap S2IMap;
 
     /// S2RCMap - Stack slot indices to register class mapping.