Commit 94af29ef authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[maglev] Use liveness to filter unused register in GeneratorStore

Otherwise we could point to a potentially dead (not allocable)
input to GeneratorStore.

Bug: v8:7700
Change-Id: I113a02e0c1a3eb1b817dc4eb8f538cf40a1d0d3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3867729
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82904}
parent 58912650
......@@ -2809,8 +2809,12 @@ void MaglevGraphBuilder::VisitSuspendGenerator() {
for (int i = 1 /* skip receiver */; i < parameter_count(); ++i) {
node->set_parameters_and_registers(arg_index++, GetArgument(i));
}
const compiler::BytecodeLivenessState* liveness = GetOutLiveness();
for (int i = 0; i < args.register_count(); ++i) {
node->set_parameters_and_registers(arg_index++, GetTaggedValue(args[i]));
ValueNode* value = liveness->RegisterIsLive(args[i].index())
? GetTaggedValue(args[i])
: GetRootConstant(RootIndex::kOptimizedOut);
node->set_parameters_and_registers(arg_index++, value);
}
AddNode(node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment