Skip to content

Make scripts/pipeline_generator.py usable again #812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 29, 2015
Merged

Make scripts/pipeline_generator.py usable again #812

merged 1 commit into from
Dec 29, 2015

Conversation

practicalswift
Copy link
Contributor

Before this commit:

$ utils/pass-pipeline/scripts/pipeline_generator.py
utils/pass-pipeline/scripts/pipeline_generator.py
Traceback (most recent call last):
  File "utils/pass-pipeline/scripts/pipeline_generator.py", line 15, in <module>
    normal_pipeline = [x for x in pass_pipeline_library.normal_passpipelines()]
  File "/path/to/swift/utils/pass-pipeline/src/pass_pipeline_library.py", line 106, in normal_passpipelines
    x.addPass(specialization_passlist())
NameError: global name 'specialization_passlist' is not defined

After this commit:

$ utils/pass-pipeline/scripts/pipeline_generator.py
[
    [
        "HighLevel",
        "run_n_times",
        2,
        "SimplifyCFG",
…

Before this commit:

```
$ utils/pass-pipeline/scripts/pipeline_generator.py
utils/pass-pipeline/scripts/pipeline_generator.py
Traceback (most recent call last):
  File "utils/pass-pipeline/scripts/pipeline_generator.py", line 15, in <module>
    normal_pipeline = [x for x in pass_pipeline_library.normal_passpipelines()]
  File "/path/to/swift/utils/pass-pipeline/src/pass_pipeline_library.py", line 106, in normal_passpipelines
    x.addPass(specialization_passlist())
NameError: global name 'specialization_passlist' is not defined
```

After this commit:

```
$ utils/pass-pipeline/scripts/pipeline_generator.py
[
    [
        "HighLevel",
        "run_n_times",
        2,
        "SimplifyCFG",
…
```
@gottesmm
Copy link
Contributor

TBH this is the wrong fix. Instead of removing the Prespecialize part of the code, the correct fix is to make it so that pass pipeline generator is generated from Passes.cpp in some way.

@gottesmm
Copy link
Contributor

The reason why that is a better fix is that the pass pipeline currently being generated by the pass pipeline generator is from a few months ago and I think things have changed since then. This would make the tool always correct.

@practicalswift
Copy link
Contributor Author

@gottesmm Thanks for clarifying!

It appears that the NameError was introduced in this commit when specialization_passlist() was removed: 4c62204#diff-8d3fd7df27dc9794e566b65345350c9aL103

Is there some way we can avoid the NameError until the long term fix (auto-generation from Passes.cpp) is in place?

@gottesmm
Copy link
Contributor

Ok. SGTM. I would file a bug to make sure the auto generation gets fixed.

gottesmm added a commit that referenced this pull request Dec 29, 2015
Make scripts/pipeline_generator.py usable again
@gottesmm gottesmm merged commit f90f271 into swiftlang:master Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants