This is an archive of the discontinued LLVM Phabricator instance.

Enable zbb for riscv android
ClosedPublic

Authored by hiraditya on Jun 12 2023, 10:29 AM.

Diff Detail

Event Timeline

hiraditya created this revision.Jun 12 2023, 10:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2023, 10:29 AM
hiraditya requested review of this revision.Jun 12 2023, 10:29 AM
enh accepted this revision.Jun 12 2023, 10:32 AM

thanks!

This revision is now accepted and ready to land.Jun 12 2023, 10:32 AM
jrtc27 requested changes to this revision.Jun 12 2023, 10:47 AM

Go fix the default ISA string for Android, don't hack it here.

This revision now requires changes to proceed.Jun 12 2023, 10:47 AM

Go fix the default ISA string for Android, don't hack it here.

If this is not the right way to change the default, can you point us to the right place?

Go fix the default ISA string for Android, don't hack it here.

If this is not the right way to change the default, can you point us to the right place?

Where the defaults for all other OSes are set (since none of those default to plain RV64I): https://github.com/llvm/llvm-project/blob/d3074f16a6f6b3447bf728d8a6d19f35f02179db/clang/lib/Driver/ToolChains/Arch/RISCV.cpp#L238

Addressed @jrtc27's comment

jrtc27 added inline comments.Jun 12 2023, 12:11 PM
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
299–300

What about this case? Though why this doesn't also check UnknownOS and do something sensible for plain lp64 I don't know... I have a funny feeling I even commented on some riscv-toolchain-conventions issue about this kind of craziness where passing seemingly no-op options (ones that match the default) have knock-on effects.

314–320
jrtc27 added inline comments.Jun 12 2023, 12:12 PM
clang/test/Driver/riscv-features.c
3

You should be checking DEFAULT too to check +relax vs -relax

8

Put this with the other feature lines

hiraditya marked 3 inline comments as done.
hiraditya updated this revision to Diff 530653.Jun 12 2023, 1:30 PM
hiraditya marked an inline comment as done.
enh added inline comments.Jun 12 2023, 3:54 PM
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
300

(stray tab)

hiraditya marked an inline comment as done.Jun 13 2023, 7:48 AM
hiraditya added inline comments.
clang/lib/Driver/ToolChains/Arch/RISCV.cpp
300

it is just the way phabricator shows whitespace changes. I verified in the uploaded patch.

hiraditya marked an inline comment as done.Jun 13 2023, 8:08 AM

@jrtc27 do you have any pending comments?

@jrtc27 do you have any pending comments?

No objections now, thanks

No objections now, thanks

sure. thanks for pointing to the right code.

pirama accepted this revision.Jun 13 2023, 9:06 AM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 13 2023, 12:30 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2023, 12:30 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript