Closed brechtvl closed 9 months ago
The conservative option here would to only enable this for LLVM 16+, so that anyone already building with LLVM 15 will see no difference. But for CI in this PR it's useful to test at least one LLVM version with the new pass manager.
I agree, let's not enable for LLVM 15 to avoid any possible breakage for now.
Let's get these reviewed and merged, and then we'll adjust the CI to have a test that builds against 16.
I think what I said before may not have been clear. Let me try again:
For now, enable this for LLVM 15 so it's well tested in CI. Once all of these PRs get merged, we'll be sure to add LLVM 16 to the CI, and then if we want, we can re-disable LLVM so that it uses the old pass manager and therefore can't break what was working before for people using LLVM <= 15.
I think this is the next one we should merge. I believe it needs a rebase to double check everything.
This one I think we also want to switch it to LLVM 16+ only before merging.
It seems to pass all the tests. Are you just worried about the risk, not wanting to disrupt the versions that worked before?
The main risk I see is that OptiX might break due to the problem mentioned in https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1730#issuecomment-1738971908, or that performance might be bad since I don't have a good way to test it.
I guess I don't see a good reason to take any risk if we can just add LLVM 16 to CI soon and test the new code that way.
Your plan is fine with me.
Do you have more to add here, then?
I think this is ready to merge now.
OK, will merge when the CI run completes.
Description
LLVM 16 removes support for default optimizations levels (O1, O2, O3) from the legacy pass manager, which are used by OSL. This adds supports for the new pass manager while keeping the legacy pass manager working for older LLVM versions.
ptx_compile_group
still uses the legacy pass manager for linkingTests
No new tests, the entire testsuite tests this.
Checklist: