-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
decouple llvm types from zig types #2135
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
will this help with #1814 as well? |
but I think it's a bad idea, so I'm going to back out the change
let's try to keep this branch to solving one problem at a time
87d7ba7
to
e9dc504
Compare
Probably not. |
fixes llvm assertion when building for windows
This brought a tiny performance improvement:
You can see the Semantic Analysis got faster and Code Generation got slower. This makes sense because LLVM types are now created in the Code Generation phase rather than the Semantic Analysis phase. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This closes #761, and lays the groundwork for fixing the remaining
false positive "foo depends on itself" bugs, such as #624.
It also lays the groundwork for implementing ability to specify
alignment of fields (#1512).
I started trying to fix even more alignment problems, including removing a dirty hack that master branch has in there for when a struct depends on its own alignment in what should be a harmless way, which required introducing Lazy Values in 3dc8448. I realized this was going to be taking on way too much in an already large branch, so I backed out the Lazy Values change in d3f2fe2 and put the master branch hack back in in d7bc763. Lazy Values will have to be a later commit.
Once this passes all tests and is merged, I'll go through the bugs and see which ones we can solve with this. Unfortunately some of them will have to remain until Lazy Values is in.
This branch also fixes a soundness issue with packed structs. Previously Zig was aligning packed struct fields based on byte-alignment; however according to the LLVM semantics we needed it to be aligned to the ABI alignment of the host integer type.