-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
Vector ops optimization #938
Comments
At first example: this is a missed optimization opportunity. I try to solve this. At second example: what about adding
The NaNs are generated by ldc because of the language specification: http://dlang.org/declaration.html#VoidInitializer |
HI Kai ! |
The functions for all arrayops are compiler-generated but the functions which are also defined in druntime are never emitted. This prevents inlining of the function body and causes issue ldc-developers#938. The fix is to emit the arrayops if inlining is enabled and otherwise use the druntime provided implementations. An alternative approach could be to always emit the arrayops and never use the druntime version.
The functions for all arrayops are compiler-generated but the functions which are also defined in druntime are never emitted. This prevents inlining of the function body and causes issue ldc-developers#938. The fix is to emit the arrayops if inlining is enabled and otherwise use the druntime provided implementations. An alternative approach could be to always emit the arrayops and never use the druntime version.
http://goo.gl/QdFsZP |
@redstar |
I think this is a bug in the tool. |
Closing, as the problem seems to be fixed and the linked site with the code examples seems to be offline. Please feel free to re-open if the problem still persists. |
All is OK, thanks. |
First:
Creates a call to _arraySliceExpMulSliceAssign_f function, but it think it needs to be inlined and turned in only one mulps.
Second:
OK, this code creates only one mulps.
We can increase size of a and it will be OK: http://goo.gl/jzjRH9
But for example if we make count of elements in a >= 32 (http://goo.gl/q1uKEZ), then ldc generates unnecessary initializations with nan. Is it llvm problem or ldc? Can we tell llvm that initialization is unnecessary ?
The text was updated successfully, but these errors were encountered: