Get rid of obsolete __ArrayEq lowering & revise core.internal.array.equality#3456
Closed
kinke wants to merge 3 commits intoldc-developers:masterfrom
Closed
Get rid of obsolete __ArrayEq lowering & revise core.internal.array.equality#3456kinke wants to merge 3 commits intoldc-developers:masterfrom
kinke wants to merge 3 commits intoldc-developers:masterfrom
Conversation
Member
Author
|
Pinging @JohanEngelen. I gotta go to sleep now. ;) |
404651c to
ca6de40
Compare
Member
Author
|
Geez, that was quite a bumpy road. I'll try to upstream this. |
Member
Author
|
The ultimate goal would be to get rid of the backend-specific array comparison code emission (incl. identical use-memcmp logic) by always lowering to |
…plates Debugging failing fail_compilation/ice19762.d (stack overflow in LDC) was a trip down the rabbit hole. By the looks of it, the root of all evil is again the frontend not properly validating IndexExpressions - this time, for structs with fwd- referencing errors (analogous to the problem for opaque structs with compilable/ice20044.d, see https://issues.dlang.org/show_bug.cgi?id=20959). The stack overflow happens in LLVM when trying to create a GEP for core.internal.array.equality.at(), when checking the struct element type (with cycles, i.e., containing a field of itself) for sizedness. This little function now uses `pragma(inline, true)`, so it was newly codegen'd although needsCodegen() returns false. With the new available_externally emission into each referencing CU, I think this enforced regular emission from the module members tree shouldn't be required anymore, allowing to work around the test regression and possibly more issues with speculative instantiations. After adapting the codegen/inlining_templates.d lit-test accordingly (no IR definitions anymore in .ll file, because available_externally doesn't make it there), I've noticed that a lambda in imported and inlined call_enforce_with_default_template_params() wasn't emitted - it got culled by alreadyOrWillBeDefined(). Function/delegate literals aren't culled anymore.
Member
Author
|
The frontend and druntime parts have been upstreamed and are available in 2.094: dlang/dmd#11212 and dlang/druntime#3142 |
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
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.
No description provided.