From b3775b5e4e150439276ad3d34f1bb564b28e8ef5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 6 Oct 2023 16:41:13 -0700 Subject: Automatically discard global effects in the rare passes that add effects (#5999) All logging/instrumentation passes need to do this, to avoid us using stale global effects that are too low (too high is not optimal either, but at least it cannot cause bugs). --- src/passes/SafeHeap.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/passes/SafeHeap.cpp') diff --git a/src/passes/SafeHeap.cpp b/src/passes/SafeHeap.cpp index 0e9e8aeef..b2f7db567 100644 --- a/src/passes/SafeHeap.cpp +++ b/src/passes/SafeHeap.cpp @@ -131,6 +131,8 @@ static std::set findCalledFunctions(Module* module, Name startFunc) { } struct SafeHeap : public Pass { + // Adds calls to new imports. + bool addsEffects() override { return true; } void run(Module* module) override { assert(!module->memories.empty()); -- cgit v1.2.3