-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[cling] Fix TLS in the cling JIT #1208
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
Conversation
|
Starting build on |
|
@phsft-bot build with flags -Dclingtest=On |
|
Starting build on |
|
Build failed on ubuntu14/native. Failing tests: |
|
Build failed on ubuntu14/native. Failing tests: |
|
Build failed on slc6/gcc49. Failing tests: |
|
Build failed on slc6/gcc62. Warnings:
Failing tests: |
|
Build failed on centos7/gcc49. Failing tests: |
|
Build failed on mac1012/native. Warnings:
And 10 more Failing tests: |
|
Build failed on slc6/gcc62. Warnings:
Failing tests: |
|
Hi, merging this will unblock the TFuture/Async building blocks for parallelism. Is there any blocker preventing us from proceeding with the merge? |
|
Starting build on |
|
I'd like to put that in after PR #1218. I expect that would happen by the end of the week. |
|
Build failed on slc6/gcc62. Failing tests: |
|
Build failed on centos7/gcc49. Failing tests: |
|
Build failed on slc6/gcc49. Failing tests: |
|
Build failed on slc6/gcc62. Failing tests: |
|
Build failed on mac1012/native. Warnings:
And 10 more Failing tests: |
|
Build failed on ubuntu14/native. Failing tests: |
|
Build failed on ubuntu14/native. Failing tests: |
|
@phsft-bot build! @Teemperor, could you fix formatting? |
|
Starting build on |
|
Starting build on |
|
@phsft-bot build! |
|
Starting build on |
| llvm::TargetOptions(), | ||
| Optional<Reloc::Model>(), CMModel, | ||
| OptLevel)); | ||
| auto TM = std::unique_ptr<TargetMachine>(TheTarget->createTargetMachine( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please split formatting and functional change into two commits? I'm terrible at filtering white-space parts of diffs from functional ones... Thanks, much appreciated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, done.
TLS is currently not suppored in the JIT on some platforms. However, it's possible to enable emulated TLS support in LLVM which means that we now support TLS across many architectures. The performance downsides of this are the overhead of accessing the variable due to the additional indirection by the emulation. However, this overhead is minimal and shouldn't affect most programs. It also can be easily worked around from the user side. This can be donefFor example by wrapping TLS variables into a single TLS struct variable that then contains the other variables. Or just minimizing referencing the TLS variable and use a normal copy of the variable instead and write it back later. Patch created with a lot of help from Lang Hames and Pavel Labath!
|
Starting build on |
|
Build failed on windows10/vc15. |
|
@phsft-bot build only on windows10/vc15 |
|
Starting build on |
|
@phsft-bot build just on windows10/vc15 |
|
Starting build on |
TLS is currently not suppored in the JIT. However, it's possible to
enable emulated TLS support in LLVM which means that we now support
TLS across all architectures. The performance downsides of this
should be neglectiable and can be easily worked around (by merging
TLS variables into a single one).
Patch created with a lot of help from Lang Hames and Pavel Labath!