tint/resolver: Reduce small-vector sizes
The vector sizes for expression traversal were excessive.
Reduce.
Change-Id: I3a2b7e7ba4cd82310565b883f85322834275ea8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/98082
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/ast/traverse_expressions.h b/src/tint/ast/traverse_expressions.h
index f4e4716..bcf0bfd 100644
--- a/src/tint/ast/traverse_expressions.h
+++ b/src/tint/ast/traverse_expressions.h
@@ -68,7 +68,7 @@
size_t depth;
};
- utils::Vector<Pending, 64> to_visit{{root, 0}};
+ utils::Vector<Pending, 32> to_visit{{root, 0}};
auto push_single = [&](const ast::Expression* expr, size_t depth) {
to_visit.Push({expr, depth});
diff --git a/src/tint/resolver/resolver.cc b/src/tint/resolver/resolver.cc
index 4295bab..ab25bfb 100644
--- a/src/tint/resolver/resolver.cc
+++ b/src/tint/resolver/resolver.cc
@@ -1276,7 +1276,7 @@
}
sem::Expression* Resolver::Expression(const ast::Expression* root) {
- utils::Vector<const ast::Expression*, 128> sorted;
+ utils::Vector<const ast::Expression*, 64> sorted;
constexpr size_t kMaxExpressionDepth = 512U;
bool failed = false;
if (!ast::TraverseExpressions<ast::TraverseOrder::RightToLeft>(