Modern Optimization: Compile math_util as ARM #1932
+1
−0
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.
Because math_util does not branch or write to memory, instead using register, using ARM code instead of THUMB works here for modern compilers. Also no need for -fno-toplevel-reorder because this optimization is safe for this too.
Here is an example:
![Screenshot 2023-10-10 at 10 27 47 AM](https://private-user-images.githubusercontent.com/122058867/273952821-899aa8c8-1ee7-4508-bdad-dc55f165bf88.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4MjY3MjMsIm5iZiI6MTcyMTgyNjQyMywicGF0aCI6Ii8xMjIwNTg4NjcvMjczOTUyODIxLTg5OWFhOGM4LTFlZTctNDUwOC1iZGFkLWRjNTVmMTY1YmY4OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNFQxMzA3MDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05M2RjMzkxODUxYzIwZTM3YzlmMzQ2MDA0MTQ5ODAwNjgwN2Y2ZDIzZmUzMTk1OWYxNmI3ZDM2MjE4NzQ3ODY2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.vmFrPf0rmuNZjqCjd16zWsZ_gOiajoz4B5kSCJiwrkI)