-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove use of
MemoryStyle
when compiling with Cranelift (#9576)
* Remove use of `MemoryStyle` when compiling with Cranelift Instead read directly from `tunables` and `MemoryType` with new helper methods that can be shared between Cranelift, Winch, and the rest of the memory subsystem. Note that this is intended to be a pure-refactoring change. The diff here is large-ish but it's mostly accounted for via code movement and indentation changes. The high-level changes made to the structure of the code are: * Metadata for PCC is de-indented and uses similar coarse determination for what facts to attach as before. Note that there's still a disconnect between PCC facts being applied and the actual load/store itself and so fully supporting PCC will probably require more refactoring in the future. * Cases have been reordered for actually emitting a bounds check. Due to there no longer being a top-level static/dynamic branch the cases have been reordered in terms of priority -- for example unconditional trapping is first, then elision of bounds checks, then the assumption the bound limit is a constant, etc. * Cases for bounds checks have had their arms rewritten in terms of the new properties. The main new one is that the fallback case for static memories previously which had a bounds check is a little more complicated as it additionally factors in `memory_may_move` in addition to `memory_reservation`. This is captured in the expanded documentation for this case, however. * Documentation was updated to avoid talking about static/dynamic memories. * Review comments
- Loading branch information
1 parent
a126152
commit 06377eb
Showing
4 changed files
with
429 additions
and
407 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.