[NFC] DeadArgumentElimination: Update allCalls incrementally#8084
Draft
kripken wants to merge 46 commits intoWebAssembly:mainfrom
Draft
[NFC] DeadArgumentElimination: Update allCalls incrementally#8084kripken wants to merge 46 commits intoWebAssembly:mainfrom
kripken wants to merge 46 commits intoWebAssembly:mainfrom
Conversation
Member
Author
|
Fuzzer found an issue, so converting to draft. It turns out that we Refinalize internally, and that can remove (unreachable) calls. That makes this hang on dae-optimizing: (module
(rec
(type $0 (func))
(type $1 (func (param (ref $2)) (result f32)))
(type $2 (struct (field (mut externref))))
(type $3 (func (result v128)))
)
(func $0 (type $3) (result v128)
(drop
(call_ref $1
(struct.new $2
(ref.as_non_null
(ref.null noextern)
)
)
(ref.func $1)
)
)
(v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
)
(func $1 (type $1) (param $0 (ref $2)) (result f32)
(unreachable)
)
(func $2 (type $0)
(drop
(call $0)
)
)
)We are not aware that Refinalize causes changes, so we miss the call going away, and end up confused. Tracking Refinalize may be enough, perhaps in a separate PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rather than recompute the entire map of Call instructions to each target, keep it
around between iterations, and just update the changed part. This requires us to
track the origin of each call, so we know which data is old and stale.
This makes the pass 15% faster on some Dart and C++ testcases, and
9% faster on Kotlin and Java. On Dart this is also the slowest pass in -O3, making
us overall 3% faster.