Skip to content
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

clang driver: enable fast unaligned access for android #111

Open
appujee opened this issue Oct 4, 2023 · 14 comments
Open

clang driver: enable fast unaligned access for android #111

appujee opened this issue Oct 4, 2023 · 14 comments
Labels

Comments

@appujee
Copy link
Collaborator

appujee commented Oct 4, 2023

Maybe we can add this to clang driver once we have tested it?

@appujee
Copy link
Collaborator Author

appujee commented Oct 4, 2023

@enh-google
Copy link
Collaborator

Maybe we can add this to clang driver once we have tested it?

oh, definitely --- any time we land something in AOSP (and we feel like it's really landed and isn't going to get reverted), we should start moving it upstream. any time i don't suggest that to you is a bug on my part :-)

(the alternative is that every single build system has to add these flags, which obviously doesn't scale.)

@appujee
Copy link
Collaborator Author

appujee commented Oct 13, 2023

merged.

@appujee appujee closed this as completed Oct 13, 2023
@appujee appujee reopened this Oct 13, 2023
@appujee
Copy link
Collaborator Author

appujee commented Oct 13, 2023

i think it is okay to keep it open as the currently used (backend) flags will be updated (to -munaligned-access) with the new toolchain.

@SiFiveHolland
Copy link

Any reason not to use -mno-strict-align, which is common with GCC?

@prashanthswami
Copy link
Collaborator

Bumping this thread because the last comment mentions we'll have 'unaligned-access' in the new toolchain, and I believe we've completed a round of updates since Oct.

@appujee - should we be switching our flags to "-munaligned-access" now? WDYT about @SiFiveHolland 's comments on 'no-strict-align'?

@appujee
Copy link
Collaborator Author

appujee commented Feb 26, 2024

yes, -munaligned-access flag works with the latest clang update.

@appujee
Copy link
Collaborator Author

appujee commented Feb 26, 2024

I'll replace the previous workaround with -munaligned-access

@enh-google
Copy link
Collaborator

I'll replace the previous workaround with -munaligned-access

is there a reason we haven't moved this into the driver yet? this flag has been in AOSP for a long time now with no problems...

@enh-google enh-google changed the title Enable fast unaligned access for aosp clang driver: enable fast unaligned access for android Mar 18, 2024
@appujee
Copy link
Collaborator Author

appujee commented Mar 18, 2024

The change landed few weeks back, https://android-review.googlesource.com/c/platform/build/soong/+/2977952 I forgot to close this bug.

@appujee
Copy link
Collaborator Author

appujee commented Mar 18, 2024

Interestingly -munaligned-access was replaced by -mno-strict-align in llvm upstream a few days back. Both flags were aliases. Pirama has change to that effect https://android-review.googlesource.com/c/platform/build/soong/+/3002035

@appujee appujee closed this as completed Mar 18, 2024
@appujee appujee reopened this Mar 18, 2024
@appujee
Copy link
Collaborator Author

appujee commented Mar 18, 2024

I'll enable the flag by default for Android. llvm/llvm-project#85704 WIP.

@enh-google
Copy link
Collaborator

the llvm change was merged ... is that cherrypicked for our llvm? (and is that cherrypick in the toolchain that we're working on currently for the forthcoming ndk release, or is it for the next one?)

@appujee
Copy link
Collaborator Author

appujee commented Apr 5, 2024

it was cherry-picked to our llvm in https://android-review.googlesource.com/c/toolchain/llvm_android/+/3009313 it is not in the toolchain (clang-r522817) we are working on.

jrguzman-ms pushed a commit to msft-mirror-aosp/platform.build.soong that referenced this issue Jul 3, 2024
Cherry-picked in aosp/3009313
Related: google/android-riscv64#111
Bug: 327307773
Change-Id: I996378fad09ce50fb432e1b4506ed273e3ec7019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants