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
Upgrade to LLVM 10 #655
Comments
Anecdote: After upgrading to
I noticed this because my Downgraded to |
I tried to upgrade the legacy JIT compilation layers (ORCv1) in The main issue I ran into with ORCv2 layers, is that after It seems to me that the exception handling frames (EHFrames) are somehow corrupted and
To fix this I manually registered the EHFrames: https://github.com/taichi-dev/taichi/pull/885/files#diff-53699800719af4686810809872c13cc9R98-R101 Now it works more stably, but when tested with multiple threads, it still fails with a small probability. I didn't dig more since I ran out of time... A related discussion (which looks similar but already fixed, so I believe we ran into a slightly different issue): http://lists.llvm.org/pipermail/llvm-dev/2017-May/112547.html I document the issues here so that someone clever and brave can pick this up and continue the upgrading process. All above are under LLVM 8.0.1 and Ubuntu 18.04. I'm not sure if LLVM 10 has fixed this issue, or it is caused by something in Taichi itself. To be honest, the ORCv2 documentation is quite limited. |
If exception is the only issue, a somewhat cumbersome work around could be track if we have to terminate earlier in the IR pass visitor on our own. E.g., instead of writing try {
FooPass foo;
root->accept(&foo);
} catch (IRModified) {
continue;
} maybe we can do something like FooPass foo;
root->accept(&foo);
if (foo.modified()) {
continue;
} It's cumbersome since jumping directly to the top scope is a natural fit for IR passes. But given that Google's code base is doing fine with C++ exception completely forbidden, I guess it's not a real blocker... |
Right, getting rid of exceptions in IR passes sounds like a potential solution. We can switch IR passes from current |
This should fix #235 as well. |
I encounter this today with Xcode 11.5 + clang-1103.0.32.62, with error messages similar to you. It looks like the error from However, this is somehow sad news for people who upgrade their toolchain frequently(like myself). |
+1. I have a pinned XCode command line tools@11.3, and the default one just gets upgraded all the time.. |
Done with local tests for LLVM 10 on Windows 10 and Ubuntu 18.04. TODO (welcome contribution):
Note: the uploaded prebuilt LLVM is stored at https://github.com/taichi-dev/taichi_assets/releases/tag/llvm10. The zip files should directly contain four folders: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It is the modified llvm version by taichi community? |
This comment has been minimized.
This comment has been minimized.
thanks for your reply:-).
Can you tell me what's wrong with it?(maybe I should open a new issue?) |
Yes, please. We're willing to help! |
Description
LLVM 10 has been released today. Currently we are using LLVM 8, and I suggest we upgrade yearly to the latest version of LLVM.
Note that LLVM now bumps its major version every 6 months. This means we will actively upgrade to the latest LLVM with even major version numbers (10, 12, 14, ...)
How
Perhaps this task is mostly about making sure that Taichi compiles and passes all tests with LLVM 10.
During the upgrade we should try to support LLVM versions 8 and 10 simultaneously, using the macro
LLVM_VERSION_MAJOR
(thanks to @sighingnow) and#if (LLVM_VERSION_MAJOR >= 10)
etc. for conditional compilation.I suggest that we drop LLVM 8 support one month after the migration to 10 is materialized, to save maintenance efforts.
The text was updated successfully, but these errors were encountered: