55
66#include < map>
77#include < memory>
8+ #include < set>
89#include < tuple>
910#include < unordered_map>
1011#include < utility>
@@ -29,29 +30,39 @@ struct UniqueClassKey
2930 odb::dbOrientType orient{odb::dbOrientType::R0};
3031 std::vector<frCoord> offsets;
3132 frInst* ndr_inst{nullptr };
33+ std::set<frTerm*> stubborn_terms;
3234
3335 UniqueClassKey (frMaster* master_in,
3436 const odb::dbOrientType& orient_in,
3537 std::vector<frCoord> offsets_in,
36- frInst* ndr_inst_in = nullptr )
38+ frInst* ndr_inst_in = nullptr ,
39+ std::set<frTerm*> stubborn_terms_in = {})
3740 : master(master_in),
3841 orient (orient_in),
3942 offsets(std::move(offsets_in)),
40- ndr_inst(ndr_inst_in)
43+ ndr_inst(ndr_inst_in),
44+ stubborn_terms(std::move(stubborn_terms_in))
4145 {
4246 }
4347
4448 bool operator <(const UniqueClassKey& other) const
4549 {
46- return std::tie (master, orient, offsets, ndr_inst) < std::tie (
47- other.master , other.orient , other.offsets , other.ndr_inst );
50+ return std::tie (master, orient, offsets, ndr_inst, stubborn_terms)
51+ < std::tie (other.master ,
52+ other.orient ,
53+ other.offsets ,
54+ other.ndr_inst ,
55+ other.stubborn_terms );
4856 }
4957
5058 bool operator ==(const UniqueClassKey& other) const
5159 {
52- return std::tie (master, orient, offsets, ndr_inst)
53- == std::tie (
54- other.master , other.orient , other.offsets , other.ndr_inst );
60+ return std::tie (master, orient, offsets, ndr_inst, stubborn_terms)
61+ == std::tie (other.master ,
62+ other.orient ,
63+ other.offsets ,
64+ other.ndr_inst ,
65+ other.stubborn_terms );
5566 }
5667};
5768
@@ -66,6 +77,10 @@ class UniqueClass
6677 frMaster* getMaster () const { return key_.master ; }
6778 odb::dbOrientType getOrient () const { return key_.orient ; }
6879 const std::vector<frCoord>& getOffsets () const { return key_.offsets ; }
80+ const std::set<frTerm*>& getStubbornTerms () const
81+ {
82+ return key_.stubborn_terms ;
83+ }
6984 const InstSet& getInsts () const { return insts_; }
7085 int getPinAccessIdx () const { return pin_access_idx_; }
7186 void setPinAccessIdx (int idx) { pin_access_idx_ = idx; }
0 commit comments