]> granicus.if.org Git - clang/commit
[RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets...
authorSam Elliott <selliott@lowrisc.org>
Tue, 27 Aug 2019 15:41:16 +0000 (15:41 +0000)
committerSam Elliott <selliott@lowrisc.org>
Tue, 27 Aug 2019 15:41:16 +0000 (15:41 +0000)
commit7e49c9ce9aa429c6480331718fa7c033255f5c17
treef132fb94c79cab445faea7d1f3189057f00d9d78
parente8b383657ee5d48646cabff26d5925308c3d69cb
[RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets with atomics

Summary: This ensures that libcalls aren't generated when the target supports atomics. Atomics aren't in the base RV32I/RV64I instruction sets, so MaxAtomicInlineWidth and MaxAtomicPromoteWidth are set only when the atomics extension is being targeted. This must be done in setMaxAtomicWidth, as this should be done after handleTargetFeatures has been called.

Reviewers: jfb, jyknight, wmi, asb

Reviewed By: asb

Subscribers: pzheng, MaskRay, s.egerton, lenary, dexonsmith, psnobl, benna, Jim, JohnLLVM, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, lewis-revill, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57450

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370073 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets/RISCV.h
test/CodeGen/riscv-atomics.c [new file with mode: 0644]
test/Driver/riscv32-toolchain.c
test/Driver/riscv64-toolchain.c