-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[llvm] Remove inline constexpr from AArch64TargetParser.h
#71602
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
Conversation
The use of `inline constexpr` appears to be a premature optimization that can cause failures on some platforms. StringRef has a heavy constructor that can be missed on dylib loading causing the `Extension` table values to be incorrect. Switching from `inline constexpr` to `const` results in no increase in binary size of `llc` indicating the optimization is unnecessary.
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
|
Does using |
I attempted to replace with It is worth noting I was able to simply drop the |
Does using "" instead of the empty list initializer work?
What does where it was possible mean? What change did you make? |
|
Given other targets use |
|
Why are these arrays declared in the .h file? They appear to only be used by AArch64TargetParser.cpp |
Sadly they do have uses outside of the target parser. E.g. in |
|
Just to add some context: IIRC, |
The use of
inline constexprappears to be a premature optimization that can cause failures on some platforms. StringRef has a heavy constructor that can be missed on dylib loading causing theExtensiontable values to be incorrect. Switching frominline constexprtoconstresults in no increase in binary size ofllcindicating the optimization is unnecessary.