diff options
Diffstat (limited to 'src/ir/cost.h')
-rw-r--r-- | src/ir/cost.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index c0845f7e2..333f599ee 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -65,6 +65,13 @@ struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, Index> { } return ret; } + Index visitCallRef(CallRef* curr) { + Index ret = 5 + visit(curr->target); + for (auto* child : curr->operands) { + ret += visit(child); + } + return ret; + } Index visitLocalGet(LocalGet* curr) { return 0; } Index visitLocalSet(LocalSet* curr) { return 1 + visit(curr->value); } Index visitGlobalGet(GlobalGet* curr) { return 1; } |