-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow hyperobject struct members in C++ #227
Conversation
86a261f
to
b7808e2
Compare
I tried using this PR to remove the explicit registration and deregistration of reducers in Cilkscale, but it didn't work. Cilkscale might be an odd case, since the relevant structure members are actually pointers to reducers. But ideally the registration and deregistration of those reducers would be done automatically when those pointers are initialized or destroyed using |
This PR does not affect construction of reducers created with |
I'm still testing this change with the Cilkscale codebase, and I ran into an issue that I think this change is supposed to handle. I have a modified version of Cilkscale here: https://github.com/neboat/productivity-tools/tree/cilkscale-reducer-registration. The README in that branch includes instructions on how to build the repo stand-alone using the OpenCilk compiler. This Cilkscale modification on that branch makes the
It looks like the compiler successfully adds a call inside the Can you take a look at this issue? |
There are two variants of the destructor that demangle to identical names. The compiler is emitting a definition of one and a reference to the other.
On FreeBSD the error is deferred until the program with |
b7808e2
to
8b9ff9c
Compare
I fixed the missing destructor bug. |
bc2715b
to
5651bfd
Compare
The contents of PR #228 were accidentally included here. I removed them. |
Can you add some code-generation tests to this PR, to verify that clang emits the correct LLVM intrinsics? The existing tests mainly check for error messages, and I don't see a test for the last commit, for emitting |
5651bfd
to
2c05a05
Compare
38df239
to
d2bea2a
Compare
The registration test discovered a bug. There was no register call if the hyperobject member did not have an initializer. I fixed this by making the destructor implicitly deleted in that case. A reducer should always be initialized. |
I'm still having some trouble with this PR. I tried using it to convert the I found that the default constructor for the view of the |
d2bea2a
to
85f5b0b
Compare
I think I fixed the problems you saw. I can build and use cilkscale with the latest branch. |
The hyper-register test currently fails because registration is not working.
Add support for hyperobject struct members in C++ only. They will be registered during object construction and unregistered during destruction. A test checks that exceptions during construction unregister only those hyperobjects that have been registered.
This support is fairly straightforward in C++. C is another story.