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

Track external globals, use it to avoid needless exception flags #675

Merged
merged 2 commits into from
Jan 26, 2021

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jan 25, 2021

While thinking about a better design for #552, and making sure external globals now survive (JuliaGPU/GPUCompiler.jl#138, JuliaLang/julia#39387), I figured we need to make it easier to pick those globals up and initialize them.

Probably needs JuliaLang/julia#39387, although we do handle the case where the symbol disappeared here (it's not like we care that the unused global has disappeared, but we should probably restore the linkage to external).

@maleadt
Copy link
Member Author

maleadt commented Jan 25, 2021

Apparently NVPTX doesn't care about linkage:

@exception_flag = internal unnamed_addr externally_initialized global i64 0
.global .align 8 .u64 exception_flag;

... so this can work without the Julia PR. Of course, LLVM could do stuff during optimization, but that's unlikely for this global pointer.

@maleadt maleadt merged commit 51d1807 into master Jan 26, 2021
@maleadt maleadt deleted the tb/track_globals branch January 26, 2021 07:27
maleadt added a commit that referenced this pull request Jan 28, 2021
Track external globals, use it to avoid needless exception flags
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.

None yet

1 participant