summaryrefslogtreecommitdiff
path: root/src/passes/SSAify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/SSAify.cpp')
-rw-r--r--src/passes/SSAify.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/passes/SSAify.cpp b/src/passes/SSAify.cpp
index 07867b32d..089def301 100644
--- a/src/passes/SSAify.cpp
+++ b/src/passes/SSAify.cpp
@@ -53,7 +53,6 @@
#include "ir/find_all.h"
#include "ir/literal-utils.h"
#include "ir/local-graph.h"
-#include "ir/type-updating.h"
#include "pass.h"
#include "support/permutations.h"
#include "wasm-builder.h"
@@ -99,8 +98,6 @@ struct SSAify : public Pass {
computeGetsAndPhis(graph);
// add prepends to function
addPrepends();
- // Handle non-nullability in new locals we added.
- TypeUpdating::handleNonDefaultableLocals(func, *module);
}
void createNewIndexes(LocalGraph& graph) {
@@ -140,10 +137,14 @@ struct SSAify : public Pass {
// no set, assign param or zero
if (func->isParam(get->index)) {
// leave it, it's fine
- } else {
+ } else if (LiteralUtils::canMakeZero(get->type)) {
// zero it out
(*graph.locations[get]) =
LiteralUtils::makeZero(get->type, *module);
+ } else {
+ // No zero exists here, so this is a nondefaultable type. The
+ // default won't be used anyhow, so this value does not really
+ // matter and we have nothing to do.
}
}
continue;