diff options
Diffstat (limited to 'src/passes/Inlining.cpp')
-rw-r--r-- | src/passes/Inlining.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index b3e111e5a..79785811c 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -50,8 +50,15 @@ static const int FLEXIBLE_SIZE_LIMIT = 20; struct FunctionInfo { std::atomic<Index> calls; Index size; - bool lightweight = true; - bool usedGlobally = false; // in a table or export + std::atomic<bool> lightweight; + bool usedGlobally; // in a table or export + + FunctionInfo() { + calls = 0; + size = 0; + lightweight = true; + usedGlobally = false; + } bool worthInlining(PassOptions& options, bool allowMultipleInliningsPerFunction) { // if it's big, it's just not worth doing (TODO: investigate more) |