[llvm] r231175 - Change LiveStackAnalysis::SS2IntervalMap from std::map to std::unordered_map

David Blaikie dblaikie at gmail.com
Tue Mar 3 15:53:01 PST 2015


Author: dblaikie
Date: Tue Mar  3 17:53:00 2015
New Revision: 231175

URL: http://llvm.org/viewvc/llvm-project?rev=231175&view=rev
Log:
Change LiveStackAnalysis::SS2IntervalMap from std::map to std::unordered_map

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).

Modified:
    llvm/trunk/include/llvm/CodeGen/LiveStackAnalysis.h

Modified: llvm/trunk/include/llvm/CodeGen/LiveStackAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveStackAnalysis.h?rev=231175&r1=231174&r2=231175&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveStackAnalysis.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveStackAnalysis.h Tue Mar  3 17:53:00 2015
@@ -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.





More information about the llvm-commits mailing list