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>
This commit is contained in:
Ben Clayton 2022-08-03 08:00:15 +00:00 committed by Dawn LUCI CQ
parent 04e68a7032
commit 6d66921053
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ bool TraverseExpressions(const ast::Expression* root, diag::List& diags, CALLBAC
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});

View File

@ -1276,7 +1276,7 @@ sem::WhileStatement* Resolver::WhileStatement(const ast::WhileStatement* stmt) {
}
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>(