summaryrefslogtreecommitdiff
path: root/src/ir/cost.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r--src/ir/cost.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h
index ff9bade10..59b738b1b 100644
--- a/src/ir/cost.h
+++ b/src/ir/cost.h
@@ -636,6 +636,9 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, CostType> {
CostType visitArrayNew(ArrayNew* curr) {
return 4 + visit(curr->size) + maybeVisit(curr->init);
}
+ CostType visitArrayNewSeg(ArrayNewSeg* curr) {
+ return 4 + visit(curr->offset) + visit(curr->size);
+ }
CostType visitArrayInit(ArrayInit* curr) {
CostType ret = 4;
for (auto* child : curr->values) {