[PATCH] D57450: [RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets with atomics

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 19 10:05:16 PST 2019


jyknight added inline comments.


================
Comment at: lib/Basic/Targets/RISCV.h:94
+    if (HasA)
+      MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
+  }
----------------
MaxAtomicPromoteWidth is an incompatible ABI-change kind of thing.

We should set that to the maximum atomic size this target ABI will _EVER_ support with any hardware, since it changes the data layout for atomic types.

MaxAtomicInlineWidth can change based on hardware, and be increased in the future if other hardware is introduced, but MaxAtomicPromoteWidth shouldn't.

I think it should be set it to 64 for most 32-bit platforms, and 128 for most 64-bit platforms.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57450/new/

https://reviews.llvm.org/D57450





More information about the cfe-commits mailing list