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

Some cleanup and comment for addrspace tracking in codegen #36920

Merged
merged 3 commits into from
Aug 6, 2020

Conversation

yuyichao
Copy link
Contributor

@yuyichao yuyichao commented Aug 4, 2020

The first two commits should be purely spelling change/clean up.

  • NULL pointer in the tracked address space appears to be used more often than the one in default addrspace.
  • Remove implicit parameters from a few related functions that used macro "hack". Those are leftover from when the context is a global state AFAICT.

The last commit deals exclusively with maybe_decay_tracked.

  1. Unify and document the returned LLVM type for a few common functions.

  2. Require boxed and the .Vboxed fields to be T_prjlvalue.

    AFAICT many places are assuming this already. So what I've changed is to document this and add a few assertions to make sure this invariance hold when it's unclear from just local information.

  3. Remove the "maybe"-ness of the cast in most places.

    Turns out that almost all the usecases have known input types.

  4. Cleanup maybe_decay_tracked itself.

    AFAICT, there's no use of the function that uses the T_pprjlvalue branch. It should also be nice to reduce reliance on the eltype of pointers.

src/intrinsics.cpp Outdated Show resolved Hide resolved
* Document returned LLVM type for a few functions
* Require and assert `Vboxed` to be of type `T_prjlvalue`
* Remove unused branch/specialization of `maybe_decay_tracked`
* Add function to cast known-untracked value.
@vtjnash vtjnash merged commit dec8f72 into master Aug 6, 2020
@vtjnash vtjnash deleted the yyc/codegen/track branch August 6, 2020 16:57
@KristofferC
Copy link
Sponsor Member

Seems like a few PRs with 1.5 backport label depends on this.

@yuyichao
Copy link
Contributor Author

yuyichao commented Sep 7, 2020

Any use of v_rnull can just be replaced with how it is defined here, or in case it was changed from a equivalent value just leave it unchanged.

@KristofferC
Copy link
Sponsor Member

KristofferC commented Sep 7, 2020

Think I got them: https://github.com/JuliaLang/julia/compare/b24f5946954399bc..dbf74365f0d. Feel free to look it over.

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

4 participants