Simplify a modport check in hierarchy.cc
Simplify a modport check in hierarchy.cc

This code originally comes from commit 458a940. When an interface is
used via a modport, code in genrtlil.cc sets '\\interface_type' and
'\\interface_modport' properties on the wire.

In hierarchy.cc, we pick up the modport name and add it to a dict
called modports_used_in_submodule (that maps connection source to
modport name).

Before this patch, the modport name is retrieved as a strpool and then
iterated over in an arbitrary order, discarding all entries but the
last. In practice, the pool will always have 0 or 1 entries because
the string used to construct it is a valid identifier, so doesn't
contain any pipe symbols.

This patch changes the code to retrieve the modport name as just a
string. This will have the same effect in practice, but may be a bit
less confusing!

The code also gets moved down closer to where the result is used,
which might be a bit more efficient since we won't always get as far
as the check.

The patch also removes some commented-out code, which I think was
intended to add some typechecking at some point, but was never
implemented. Since this dates back to October 2018, I think it makes
more sense to just take it out.

antmicro/yosys,antmicro/yosys,cliffordwolf/yosys,SymbiFlow/yosys,antmicro/yosys,YosysHQ/yosys,antmicro/yosys,antmicro/yosys,antmicro/yosys,cliffordwolf/yosys,cliffordwolf/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,SymbiFlow/yosys,antmicro/yosys,cliffordwolf/yosys,SymbiFlow/yosys,YosysHQ/yosys,SymbiFlow/yosys,antmicro/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,cliffordwolf/yosys,SymbiFlow/yosys,cliffordwolf/yosys,SymbiFlow/yosys,SymbiFlow/yosys,SymbiFlow/yosys,cliffordwolf/yosys,cliffordwolf/yosys,cliffordwolf/yosys