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

Upgrade frontend & libs to pre-DMD-monorepo state #4141

Merged
merged 16 commits into from
Nov 19, 2022

Conversation

kinke
Copy link
Member

@kinke kinke commented Sep 12, 2022

No description provided.

@thewilsonator
Copy link
Contributor

Apologies for the merge conflict, I've got a couple of changes I need to make to druntime, namely making the intrinsic names for pointers not include the type for LLVM 15 (well technically opaque pointers, which in theory we could enable for LLVM14 or disable for 15) e.g.

-pragma(LDC_intrinsic,  "llvm.memcpy.p0i8.p0i8.i#")
+pragma(LDC_intrinsic, LLVM_version >= 1500 ? "llvm.memcpy.p0.p0.i#" : "llvm.memcpy.p0i8.p0i8.i#")
    void llvm_memcpy(T)(void* dst, const(void)* src, T len, bool volatile_ = false)
        if (__traits(isIntegral, T));

ditto for memmove, memset prefetch and frameaddress.

Using its `foreachVar()` method to visit the nested vars, as done
in the DMD glue layer.
Conflicts:
	gen/toir.cpp
	runtime/druntime
@kinke
Copy link
Member Author

kinke commented Sep 15, 2022

The undefined _d_arrayctor symbol for the druntime unittest runners is caused by https://issues.dlang.org/show_bug.cgi?id=23337 and needs a frontend fix...

…members

Fixes assertions hit by dmd-testsuite's runnable/{test23010,variadic}.d,
caused by a different tuples handling in the frontend.
@@ -31,7 +31,7 @@ void func()
int[] quux;
//CHECK: dcompute.d([[@LINE+1]]): Error: can only call functions from other `@compute` modules in `@compute` code
quux.length = 1;
//CHECK: dcompute.d([[@LINE+1]]): Error: cannot use operator `~=` in `@compute` code
//CHECK: dcompute.d([[@LINE+1]]): Error: can only call functions from other `@compute` modules in `@compute` code
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like a regression to me. @thewilsonator can you help here to keep the better old error message?

Copy link
Member Author

@kinke kinke Nov 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are caused by new frontend lowerings (the templated druntime 'hooks').

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can hardcode the recognition of names of the hooks, and give a bit nicer feedback to the user. It will not be easy to understand that ~= leads to a "call to a function from another non-@compute module".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with making an open issue for it, shouldn't block the monorepo work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay: #4272

@kinke kinke marked this pull request as ready for review November 19, 2022 22:09
@kinke kinke merged commit e5c97c6 into ldc-developers:master Nov 19, 2022
@kinke kinke deleted the pre-monorepo branch November 19, 2022 22:40
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.

3 participants