mirror of https://github.com/llvm/circt.git
[NFC] Reserve memory to save reallocations. Noted in performance profiling
This commit is contained in:
parent
2b482b219d
commit
056d519468
|
@ -1210,6 +1210,7 @@ static SmallVector<Location> getAllPortLocs(ModTy module) {
|
|||
|
||||
SmallVector<Location> HWModuleOp::getAllPortLocs() {
|
||||
SmallVector<Location> portLocs;
|
||||
portLocs.reserve(getNumPorts());
|
||||
auto resultLocs = getResultLocsAttr();
|
||||
unsigned inputCount = 0;
|
||||
auto modType = getModuleType();
|
||||
|
|
Loading…
Reference in New Issue