Skip to content

Adds assert to RemoveUnusedModuleElements #4983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashleynh
Copy link
Collaborator

Pass RemoveUnusedModuleElements does not have multi-memories support. This adds an assert to ensure the pass is not run if the module has multiple memories.

@ashleynh ashleynh requested a review from tlively August 27, 2022 05:25
@ashleynh ashleynh linked an issue Aug 27, 2022 that may be closed by this pull request
@ashleynh ashleynh removed the request for review from tlively August 27, 2022 05:52
@ashleynh ashleynh marked this pull request as draft August 27, 2022 05:52
@@ -236,6 +236,8 @@ struct RemoveUnusedModuleElements : public Pass {
: rootAllFunctions(rootAllFunctions) {}

void run(PassRunner* runner, Module* module) override {
assert(module->memories.size() <= 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert(module->memories.size() <= 1);
// TODO: support multiple memories in this pass
assert(module->memories.size() <= 1);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add assertion to RemoveUnusedModuleElements
2 participants