Merge remote-tracking branch 'origin/main' into small.tu
diff --git a/src/ir/type-updating.cpp b/src/ir/type-updating.cpp
index fa2eec0..b0e3bb0 100644
--- a/src/ir/type-updating.cpp
+++ b/src/ir/type-updating.cpp
@@ -19,6 +19,7 @@
#include "ir/local-structural-dominance.h"
#include "ir/module-utils.h"
#include "ir/utils.h"
+#include "support/small_vector.h"
#include "support/topological_sort.h"
#include "wasm-type-ordering.h"
#include "wasm-type.h"
@@ -443,7 +444,9 @@
if (!paramFixups.empty()) {
// Write the params immediately to the fixups.
Builder builder(wasm);
- std::vector<Expression*> contents;
+ // Use a small vector as functions generally have a reasonable number of
+ // parameters.
+ SmallVector<Expression*, 10> contents;
for (Index index = 0; index < func->getNumParams(); index++) {
auto iter = paramFixups.find(index);
if (iter != paramFixups.end()) {
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 8b34d69..5f597cb 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -19,6 +19,7 @@
#include "ir/manipulation.h"
#include "parsing.h"
+#include "support/small_vector.h"
#include "wasm.h"
namespace wasm {