-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix compile=all and codegen bugs #22697
Conversation
@@ -480,7 +480,7 @@ static Value *runtime_apply_type(jl_codectx_t &ctx, jl_value_t *ty, jl_unionall_ | |||
args[1] = literal_pointer_val(ctx, (jl_value_t*)ctx.linfo->def.method->sig); | |||
args[2] = ctx.builder.CreateInBoundsGEP( | |||
T_prjlvalue, | |||
emit_bitcast(ctx, decay_derived(ctx.spvals_ptr), T_pprjlvalue), | |||
ctx.spvals_ptr, |
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.
Are these guaranteed to be globally rooted?
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.
They're always callee rooted
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.
Is it OK to just assert that the argument type is T_pprjlvalue
?
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.
Ping @Keno
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.
I think you still need to decay_derived at the very least.
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.
On what?
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.
ctx.spvals_ptr
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.
It can just be considered an opaque (callee-rooted) pointer Type::getPointerTo(Void, 0)
. Unless the rooting pass cares that I'm loading a T_prjlvalue
from it?
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.
Ok, as long as ctx.spvals_ptr is in addrspace(0) it's probably fine. The pass will just not root any values you load from it.
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.
That should be fine (preferred, actually). I assume it'll still wb
them if they escape?
Is there a test we can meaningfully run as part of CI? |
Clearly building the system image and gadfly will kill CI. |
Will this fix #22569 or it's only a part of the fix? If it is the full fix, I can try this branch. |
Yes, I have built Gadfly with this |
Would be nice to get this merged to enable compile testing of more codes. |
@@ -994,7 +994,6 @@ export | |||
# loading source files | |||
__precompile__, | |||
evalfile, | |||
include, |
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.
what?
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.
This wasn't supposed to be exported – it causes binding overwrite warnings when you try to extend the system image with compile all.
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 have mentioned that in the commit message or PR description, I suspect that's totally unclear to anyone other than you
fixes various issues that have bitrotted a bit since compile=all testing is not being done on CI.