-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Implement likely/unlikely intrinsics #26429
Commits on Jun 19, 2015
-
Configuration menu - View commit details
-
Copy full SHA for a2dbed9 - Browse repository at this point
Copy the full SHA a2dbed9View commit details -
Improve translation of functions with simple return types
Previously, all function calls would store the result to a temporary stack slot. While this would often be optimized out, it prevents the branch hinting from taking effect. Now function calls that return a scalar have their return values, well, returned directly, avoiding the redundant store/load pair that was there before. The return types it does this for are fairly limited due to issues when doing it for other types.
Configuration menu - View commit details
-
Copy full SHA for 79d69a7 - Browse repository at this point
Copy the full SHA 79d69a7View commit details -
Fix the named tuple constructor code to return a value
This is essentially the same change as in `intrinsics`. Returns a value or `()` depending on whether or not the type is immediate.
Configuration menu - View commit details
-
Copy full SHA for 7ec6f7b - Browse repository at this point
Copy the full SHA 7ec6f7bView commit details -
Fix and improve translation of transmute
My earlier changes caused the result to be incorrect when both the input and output types were immediate. This has been fixed. I also extended the code to handle int -> ptr and ptr -> int casts as simple cases, since it's fairly easy to do. I changed the one place that was transmuting a function pointer to an integer to just use a cast, it's more clear this way.
Configuration menu - View commit details
-
Copy full SHA for 9c0b97d - Browse repository at this point
Copy the full SHA 9c0b97dView commit details -
Improve handling of function calls with immediate returns
This fixes up calling foreign functions so they return the value the function returns, same as other calls. It also refactors the as-datum function-call code to handle more cases and to be in a better place.
Configuration menu - View commit details
-
Copy full SHA for 4bd32cf - Browse repository at this point
Copy the full SHA 4bd32cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for e74d5be - Browse repository at this point
Copy the full SHA e74d5beView commit details -
Handle block expressions a little nicer.
This handles block expressions based on the kind of their trailing expression (if there is one), rather than always using DPS. This is to allow `unsafe { likely(foo) }` to work as expected, but also reduces the number of temporary allocas in some cases. Also adds a codegen test to make sure the intrinsics are being codegenned in a way that means they are having an effect. This commit also fixes a small bug I noticed in the translation of overflow checking that meant the branch hints weren't actually taking effect.
Configuration menu - View commit details
-
Copy full SHA for e75cf7e - Browse repository at this point
Copy the full SHA e75cf7eView commit details