| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an option to ignore effects in the parent in
getDroppedChildrenAndAppend. With that, this becomes usable in more
places, like Directize, basically in situations where we know we can ignore
effects in the parent (since we've inferred they are not needed). This lets
us get rid of some boilerplate code in Directize.
Diff without whitespace is a lot smaller. A large other part of the diff is a
rename of curr => parent which I think it makes it more readable as then
parent/children is a clear contrast, and then the new parameter "ignore/
notice parent effects" is obviously connected to "parent".
The top comment in drop.cpp is removed as it just duplicated the top
comment in the header drop.h.
This is basically NFC but using drop.h does bring the advantage of
emitting less code, see the test changes, so it is noticeable in the IR.
This is a refactoring PR in preparation for a larger improvement to
Directize that will also benefit from this new drop capability.
|
|
|
| |
StructSet cannot be dropped.
|
| |
|
|
|
|
|
|
|
| |
The previous code assumes if `last`'s type is unreachable it traps. But
it's not always the case because it can be other instructions like `br`
whose type is unreachable but doesn't necessarily trap.
Context:
https://github.com/WebAssembly/binaryen/pull/4827#discussion_r929395477
|
|
Now that we have `getDroppedUnconditionalChildrenAndAppend`, all passes
need to use it rather than the old `getDroppedChildrenAndAppend`, which
is used within the new method
`getDroppedUnconditionalChildrenAndAppend`.
This creates `drop.cpp` and move method implementations in drop.h there,
and merge two methods given that the old method is not supposed to be
used from outside anyway, and drops `Unconditional` from the new method
name because this is the only method and doesn't have to be specific
about that.
|