From 25e47f2c3e7ca8151377075432b34c95073acaca Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 29 Oct 2020 19:06:28 -0700 Subject: Inlining fix: Note the start function (#3301) Without this, we might think a function has no global uses if the only global use of it is the start. --- src/passes/Inlining.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index 43addff8b..5c94755d1 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -343,6 +343,9 @@ struct Inlining : public Pass { } } } + if (module->start.is()) { + infos[module->start].usedGlobally = true; + } } bool iteration(PassRunner* runner, Module* module) { -- cgit v1.2.3