Move phis, if any, when ensuring deferred blocks.
We use Schedule::EnsureDeferredCodeSingleEntryPoint as a helper for hand-crafted builtin code, to ensure deferred code isn't entered from a mix of deferred and non-deferred code (invariant required for hot/cold allocation, or "splintering"). When we create a "merger" block, it may be the case that the original block had a few phi operands. Those need to be moved as well. This bug was uncovered by both v8:6390, and, earlier, by v8:5998. We fixed the earlier one by authoring a the builtin to avoid the need for EnsureDeferredCodeSingleEntryPoint. I proposed earlier an alternative where we'd replace the Ensure... method with a Verify, and throw early when the builtin is assembled, however, we may want to maintain the slightly higher level DSL for authoring builtins, and perform such graph adjustments for the lower level constraints afterwards, hence this current CL. Bug: v8:5998 v8:6390 Change-Id: Ia3143f7a66904fe480d8edb5b52bf915b8d185dc Reviewed-on: https://chromium-review.googlesource.com/505264 Commit-Queue: Mircea Trofin <mtrofin@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#45387}
Showing
Please
register
or
sign in
to comment