aboutsummaryrefslogtreecommitdiffstats
path: root/common/place_common.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-06-01 17:52:25 +0100
committergatecat <gatecat@ds0.me>2021-06-02 15:04:49 +0100
commit43b8dde923b8cf57a206526fd6e66ebf1c436010 (patch)
tree4a45f386aa04c43f09dd40c256a1284f6e9fd393 /common/place_common.cc
parent579b98c5963c2b86d191d481a2147a663a8196dd (diff)
downloadnextpnr-43b8dde923b8cf57a206526fd6e66ebf1c436010.tar.gz
nextpnr-43b8dde923b8cf57a206526fd6e66ebf1c436010.tar.bz2
nextpnr-43b8dde923b8cf57a206526fd6e66ebf1c436010.zip
Use hashlib in placers
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common/place_common.cc')
-rw-r--r--common/place_common.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/place_common.cc b/common/place_common.cc
index ece47b5a..9a6c6158 100644
--- a/common/place_common.cc
+++ b/common/place_common.cc
@@ -178,8 +178,8 @@ class ConstraintLegaliseWorker
private:
Context *ctx;
std::set<IdString> rippedCells;
- std::unordered_map<IdString, Loc> oldLocations;
- std::unordered_map<ClusterId, std::vector<CellInfo *>> cluster2cells;
+ dict<IdString, Loc> oldLocations;
+ dict<ClusterId, std::vector<CellInfo *>> cluster2cells;
class IncreasingDiameterSearch
{
@@ -227,10 +227,10 @@ class ConstraintLegaliseWorker
int sign = 0;
};
- typedef std::unordered_map<IdString, Loc> CellLocations;
+ typedef dict<IdString, Loc> CellLocations;
// Check if a location would be suitable for a cell and all its constrained children
- bool valid_loc_for(const CellInfo *cell, Loc loc, CellLocations &solution, std::unordered_set<Loc> &usedLocations)
+ bool valid_loc_for(const CellInfo *cell, Loc loc, CellLocations &solution, pool<Loc> &usedLocations)
{
BelId locBel = ctx->getBelByLocation(loc);
if (locBel == BelId())
@@ -324,7 +324,7 @@ class ConstraintLegaliseWorker
}
CellLocations solution;
- std::unordered_set<Loc> used;
+ pool<Loc> used;
if (valid_loc_for(cell, rootLoc, solution, used)) {
for (auto cp : solution) {
// First unbind all cells