Is register allocation deterministic in v8 over repeat runs?

171 views
Skip to first unread message

Zhao Jiazhong

unread,
Sep 10, 2024, 8:32:29 AM9/10/24
to v8-dev
Hi all,

After turboshaft-csa is enabled [1], `cctest/test-serialize/StaticRootsPredictableSnapshot` [2] started to fail on loong64 port:
> # Fatal error in ../../src/execution/isolate.cc, line 5630
> # The Isolate is incompatible with the embedded blob. This is usually caused by incorrect usage of mksnapshot. When generating custom snapshots, embedders must ensure they pass the same flags as during the V8 build process (e.g.: --turbo-instruction-scheduling).

It seems that the register allocation results are not always the same over repeat runs, and may generate different builtin codes and different embedded blob hash.

So I wonder is the register allocation deterministic by design? Any help is appreciated, Thanks!

Yours,
Zhao Jiazhong

Zhao Jiazhong

unread,
Sep 26, 2024, 4:35:59 AM9/26/24
to v8-dev
FWIW, this issue has been fixed by https://chromium-review.googlesource.com/c/v8/v8/+/5891233, thanks for Daniel and Thibaud's help!
Reply all
Reply to author
Forward
0 new messages