diff options
Diffstat (limited to 'src/pass.h')
-rw-r--r-- | src/pass.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pass.h b/src/pass.h index 83f53c23a..2c2fa0619 100644 --- a/src/pass.h +++ b/src/pass.h @@ -235,8 +235,9 @@ struct PassOptions { // other passes later can benefit from it. It is up to the sequence of passes // to update or discard this when necessary - in particular, when new effects // are added to a function this must be changed or we may optimize - // incorrectly (however, it is extremely rare for a pass to *add* effects; - // passes normally only remove effects). + // incorrectly. However, it is extremely rare for a pass to *add* effects; + // passes normally only remove effects. Passes that do add effects must set + // addsEffects() so the pass runner is aware of them. std::shared_ptr<FuncEffectsMap> funcEffectsMap; // -Os is our default @@ -318,6 +319,9 @@ struct PassRunner { // Add a pass given an instance. void add(std::unique_ptr<Pass> pass) { doAdd(std::move(pass)); } + // Clears away all passes that have been added. + void clear(); + // Adds the pass if there are no DWARF-related issues. There is an issue if // there is DWARF and if the pass does not support DWARF (as defined by the // pass returning true from invalidatesDWARF); otherwise, if there is no @@ -387,9 +391,6 @@ private: // yet) have removed DWARF. bool addedPassesRemovedDWARF = false; - // Whether this pass runner has run. A pass runner should only be run once. - bool ran = false; - void runPass(Pass* pass); void runPassOnFunction(Pass* pass, Function* func); |