Let passes get their options (current configuration) from the

PassManager.

I think this is much cleaner and more flexible. The various pass
builders have no business marshalling these things around, and they
shouldn't be bound to the pass C'tor. In the future we will be able
override and dynamically modify pass configuration this way.

Swift SVN r13626
This commit is contained in:
Andrew Trick
2014-02-07 05:01:00 +00:00
parent 25445d2dff
commit 47b936fbae
7 changed files with 36 additions and 20 deletions

View File

@@ -34,7 +34,7 @@ void SILPassManager::runOneIteration() {
SMT->injectPassManager(this);
SMT->injectModule(Mod);
SMT->run();
if (VerifyAfterAll) {
if (Options.EnableParanoidVerification) {
DEBUG(Mod->verify());
}
continue;
@@ -47,7 +47,7 @@ void SILPassManager::runOneIteration() {
SFT->injectPassManager(this);
SFT->injectFunction(&F);
SFT->run();
if (VerifyAfterAll) {
if (Options.EnableParanoidVerification) {
DEBUG(Mod->verify());
}
}