-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
make Type{Union{}}
ismutationfree
#48417
Conversation
The ismutationfree flag is supposed to be set for all |
Try this patch:
|
But there is a lot of mutable memory reachable via DataType? |
We currently have |
It seems awkward to need to lie quite so much about it. Unless this predicate (inaccessiblememonly) means that it won't change anything directly through that pointer, which is usually true. |
Llvm is changing these attributes right now, but it basically means that it doesn't read or write to memory other functions can see. |
|
Then we might have to do this in a case by case level. |
Making |
Do you folks want to close this and think of a longer term solution, or merge this as a partial fix and work on something that gives more precise information. I will say that it seems most instances of |
I'd like to go with Keno's patch to fix the precision for now. And then fix the correctness issue in a separate PR. |
Type{Union{}}
ismutationfree
Type{Union{}}
andCore.TypeofBottom
are the same type but not the same object, andType{Union{}}
has different flags flags, normalize them so we don't taint functions that returnUnion{}
. This was causing exp to not be inacessiblememonly.It seems this regressed on #48220