Trying to improve deep mode performance by avoiding multiple cell mapping operations due to partial hierarchy transfer. On the cost side, the hierarchy is always duplicated.

This commit is contained in:
Matthias Koefferlein 2023-07-04 00:19:55 +02:00
parent 07b8362368
commit 3980476455
4 changed files with 12 additions and 2 deletions

View File

@ -295,6 +295,7 @@ public:
*/
void set_shape_receiver (HierarchyBuilderShapeReceiver *pipe);
virtual bool wants_all_cells () const { return true; }
virtual void begin (const RecursiveShapeIterator *iter);
virtual void end (const RecursiveShapeIterator *iter);
virtual void enter_cell (const RecursiveShapeIterator *iter, const db::Cell *cell, const db::Box &region, const box_tree_type *complex_region);

View File

@ -693,7 +693,11 @@ RecursiveShapeIterator::next_shape (RecursiveShapeReceiver *receiver) const
// determine whether the cell is empty with respect to the layers specified
bool is_empty = false;
if (! m_has_layers) {
if (receiver && receiver->wants_all_cells ()) {
// don't skip empty cells in that case
} else if (! m_has_layers) {
is_empty = mp_layout->cell (m_inst->cell_index ()).bbox (m_layer).empty ();

View File

@ -913,6 +913,11 @@ public:
*/
virtual ~RecursiveShapeReceiver () { }
/**
* @brief Returns true, if the receivers wants the full hierarchy and not just non-empty cells
*/
virtual bool wants_all_cells () const { return false; }
/**
* @brief Called once when the iterator begins pushing
*/

View File

@ -142,7 +142,7 @@ TEST(16_private)
TEST(17_private)
{
test_is_long_runner ();
run_test (_this, "test_17.lylvs", "test_17b.cir.gz", "test_17.gds.gz", true, "test_17b_4.lvsdb");
run_test (_this, "test_17.lylvs", "test_17b.cir.gz", "test_17.gds.gz", true, "test_17b_5.lvsdb");
}
TEST(18_private)