diff options
Diffstat (limited to 'src/passes/SimplifyGlobals.cpp')
-rw-r--r-- | src/passes/SimplifyGlobals.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/passes/SimplifyGlobals.cpp b/src/passes/SimplifyGlobals.cpp index 5a6337bd6..f162d50c5 100644 --- a/src/passes/SimplifyGlobals.cpp +++ b/src/passes/SimplifyGlobals.cpp @@ -108,8 +108,7 @@ struct GlobalUseScanner : public WalkerPass<PostWalker<GlobalUseScanner>> { } // See if reading a specific global is the only effect the condition has. - EffectAnalyzer condition( - getPassOptions(), getModule()->features, curr->condition); + EffectAnalyzer condition(getPassOptions(), *getModule(), curr->condition); if (condition.globalsRead.size() != 1) { return; @@ -123,8 +122,7 @@ struct GlobalUseScanner : public WalkerPass<PostWalker<GlobalUseScanner>> { // See if writing the same global is the only effect the body has. (Note // that we don't need to care about the case where the body has no effects // at all - other pass would handle that trivial situation.) - EffectAnalyzer ifTrue( - getPassOptions(), getModule()->features, curr->ifTrue); + EffectAnalyzer ifTrue(getPassOptions(), *getModule(), curr->ifTrue); if (ifTrue.globalsWritten.size() != 1) { return; } @@ -210,7 +208,7 @@ struct ConstantGlobalApplier return; } // Otherwise, invalidate if we need to. - EffectAnalyzer effects(getPassOptions(), getModule()->features); + EffectAnalyzer effects(getPassOptions(), *getModule()); effects.visit(curr); assert(effects.globalsWritten.empty()); // handled above if (effects.calls) { |