diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-05-01 22:21:24 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-05-01 22:21:24 +0000 |
commit | 23fc1727e755feb734e500214ca193b5d01007ff (patch) | |
tree | 16a2bb2981d2493716937ab67c17b44402cb995c /include/llvm/CodeGen/StackMaps.h | |
parent | d4b4f2d3402c0e94730646eb63874fa5265602f5 (diff) | |
download | llvm-23fc1727e755feb734e500214ca193b5d01007ff.tar.gz llvm-23fc1727e755feb734e500214ca193b5d01007ff.tar.bz2 llvm-23fc1727e755feb734e500214ca193b5d01007ff.tar.xz |
[Stackmaps] Replace the custom ConstantPool class with a MapVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/StackMaps.h')
-rw-r--r-- | include/llvm/CodeGen/StackMaps.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/include/llvm/CodeGen/StackMaps.h b/include/llvm/CodeGen/StackMaps.h index f903a36a3a..67b815f9dd 100644 --- a/include/llvm/CodeGen/StackMaps.h +++ b/include/llvm/CodeGen/StackMaps.h @@ -133,6 +133,7 @@ public: private: typedef SmallVector<Location, 8> LocationVec; typedef SmallVector<LiveOutReg, 8> LiveOutVec; + typedef MapVector<int64_t, int64_t> ConstantPool; typedef MapVector<const MCSymbol *, uint64_t> FnStackSizeMap; struct CallsiteInfo { @@ -149,26 +150,6 @@ private: typedef std::vector<CallsiteInfo> CallsiteInfoList; - struct ConstantPool { - private: - typedef std::map<int64_t, size_t> ConstantsMap; - std::vector<int64_t> ConstantsList; - ConstantsMap ConstantIndexes; - - public: - size_t getNumConstants() const { return ConstantsList.size(); } - int64_t getConstant(size_t Idx) const { return ConstantsList[Idx]; } - size_t getConstantIndex(int64_t ConstVal) { - size_t NextIdx = ConstantsList.size(); - ConstantsMap::const_iterator I = - ConstantIndexes.insert(ConstantIndexes.end(), - std::make_pair(ConstVal, NextIdx)); - if (I->second == NextIdx) - ConstantsList.push_back(ConstVal); - return I->second; - } - }; - AsmPrinter &AP; CallsiteInfoList CSInfos; ConstantPool ConstPool; |