This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add Tag_RISCV_arch attribute by default when using clang as an assembler.
ClosedPublic

Authored by craig.topper on Apr 20 2023, 10:25 AM.

Details

Summary

Can be disabled with -mno-default-build-attributes just like ARM.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 20 2023, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 10:25 AM
craig.topper requested review of this revision.Apr 20 2023, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 10:25 AM

Surprised that we didn't already do this; seems like a bit of an oversight.

clang/test/Driver/riscv-default-build-attributes.s
2

Do we use /// for non-lit/FileCheck lines like we use ;; in IR tests?

12

Gap is a bit odd

13

missing "for"

craig.topper added inline comments.Apr 20 2023, 11:18 AM
clang/test/Driver/riscv-default-build-attributes.s
2

I don't know. I copied it from ARM's test.

Address review comments

Some more... hopefully spotted everything this time, sorry

clang/test/Driver/riscv-default-build-attributes.s
2
4

= for these

4

Also aren't these indented 1 too many spaces?

21

There aren't any uses of -verify?

craig.topper added inline comments.Apr 20 2023, 3:06 PM
clang/test/Driver/riscv-default-build-attributes.s
4

Cleary I should not have copied ARM's test :(

jrtc27 added inline comments.Apr 20 2023, 3:11 PM
clang/test/Driver/riscv-default-build-attributes.s
4

Yeah... :( ARM and AArch64 tests can be pretty iffy in my experience

Fix more review comments

asb accepted this revision.Apr 21 2023, 10:27 AM

I'd appreciate some riscv32 RUN lines for completeness, but otherwise LGTM.

This revision is now accepted and ready to land.Apr 21 2023, 10:27 AM
This revision was landed with ongoing or failed builds.Apr 21 2023, 10:54 AM
This revision was automatically updated to reflect the committed changes.