[llvm] r333981 - [RegAllocGreedy] Use simpler map class for EvicteeInfo. NFCI.
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 4 20:16:28 PDT 2018
Author: niravd
Date: Mon Jun 4 20:16:28 2018
New Revision: 333981
URL: http://llvm.org/viewvc/llvm-project?rev=333981&view=rev
Log:
[RegAllocGreedy] Use simpler map class for EvicteeInfo. NFCI.
RegAlloc keeps a insertion-time ordered map of evictee information,
but we only use membership. Replace MapVector with contextually
equivalent DenseMap which is smaller and faster.
Modified:
llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=333981&r1=333980&r2=333981&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Mon Jun 4 20:16:28 2018
@@ -292,7 +292,7 @@ class RAGreedy : public MachineFunctionP
public:
using EvictorInfo =
std::pair<unsigned /* evictor */, unsigned /* physreg */>;
- using EvicteeInfo = llvm::MapVector<unsigned /* evictee */, EvictorInfo>;
+ using EvicteeInfo = llvm::DenseMap<unsigned /* evictee */, EvictorInfo>;
private:
/// Each Vreg that has been evicted in the last stage of selectOrSplit will
More information about the llvm-commits
mailing list