Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/passes/DeadArgumentElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ using DAEFunctionInfoMap = std::unordered_map<Name, DAEFunctionInfo>;
struct DAEScanner
: public WalkerPass<PostWalker<DAEScanner, Visitor<DAEScanner>>> {
bool isFunctionParallel() override { return true; }
bool modifiesBinaryenIR() override { return false; }

std::unique_ptr<Pass> create() override {
return std::make_unique<DAEScanner>(infoMap);
Expand Down
5 changes: 5 additions & 0 deletions src/passes/param-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ void localizeCallsTo(const std::unordered_set<Name>& callTargets,
std::function<void(Function*)> onChange) {
struct LocalizerPass : public WalkerPass<PostWalker<LocalizerPass>> {
bool isFunctionParallel() override { return true; }
// May add non-nullable locals, but fixups are never needed as they are
// immediately used in the code right after.
bool requiresNonNullableLocalFixups() override { return false; }
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to add a comment about why this is true, i.e. // Always sets locals immediately before using them.


std::unique_ptr<Pass> create() override {
return std::make_unique<LocalizerPass>(callTargets, onChange);
Expand Down Expand Up @@ -335,6 +338,8 @@ void localizeCallsTo(const std::unordered_set<HeapType>& callTargets,
PassRunner* runner) {
struct LocalizerPass : public WalkerPass<PostWalker<LocalizerPass>> {
bool isFunctionParallel() override { return true; }
// See above.
bool requiresNonNullableLocalFixups() override { return false; }

std::unique_ptr<Pass> create() override {
return std::make_unique<LocalizerPass>(callTargets);
Expand Down
Loading