Skip to content
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

Add support for LLVM 17 #643

Merged
merged 20 commits into from
Nov 21, 2023
Merged

Conversation

elliottslaughter
Copy link
Member

@elliottslaughter elliottslaughter commented Sep 18, 2023

This rolls up the changes in #641 and then adds more on top to adapt to the removal of the legacy pass manager in LLVM 17. Overall, this seems to be working dramatically better than LLVM 15-16, so I have updated the opaque pointer version bounds to be LLVM 17-only.

Running the test suite locally (macOS x86) produces one test failure:

99% tests passed, 1 tests failed out of 550

Total Test time (real) = 143.88 sec

The following tests FAILED:
	 71 - classifyfloatstructs.t (Failed)
Errors while running CTest

For once I'm actually done with this ahead of the LLVM 17 final release (above results were with rc4), so I can't merge this until the final release gets cut. But things are looking good overall.

Known issues:

  • Compile time regressions in compile_time_array.t and compile_time_array2.t forcing those tests to be shut off in LLVM 17. A similar (but less severe) issue is present in bug372_perf.t, but it's minor enough I left that one in. Possibly a result of the new pass manager.
  • constantinits.t fails on Linux: constantinits.t breaks on LLVM 17 Linux #644.
  • I was forced to remove the manual inliner. Figure out how to put it back (or if we need it).
  • Performance has not been verified, so I have no idea if it's anywhere near reasonable or not.

@elliottslaughter
Copy link
Member Author

elliottslaughter commented Sep 18, 2023

I'm pretty sure classifyfloatstructs.t (the remaining failing test) is failing due to the lack of the manual inliner.

Edit: Actually, no. We use the alwaysinline attribute on functions with :setinlined(true), so it should be inlining. Somehow LLVM is just generating uncompact assembly.

Edit 2: Looks like we're failing to run the SLP vectorizer (or any vectorizer?) because it's not part of the pipeline built by buildFunctionSimplificationPipeline. Looks like LLVM's new pass manager really does want to do everything at module level. Yuck.

@elliottslaughter
Copy link
Member Author

I'm tracking the vectorization issue as llvm/llvm-project#67076

@elliottslaughter
Copy link
Member Author

I'm disabling constantinits.t for LLVM 17 Linux. Tracking as #644.

@elliottslaughter elliottslaughter merged commit 97c21b0 into terralang:master Nov 21, 2023
38 of 39 checks passed
@elliottslaughter elliottslaughter deleted the llvm-17 branch November 21, 2023 18:59
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.

1 participant