r323253 - [WebAssembly] Factor out settings common to wasm32 and wasm64. NFC.

Dan Gohman via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 23 12:22:12 PST 2018


Author: djg
Date: Tue Jan 23 12:22:12 2018
New Revision: 323253

URL: http://llvm.org/viewvc/llvm-project?rev=323253&view=rev
Log:
[WebAssembly] Factor out settings common to wasm32 and wasm64. NFC.

MaxAtomicPromoteWidth and MaxAtomicInlineWidth are 64 on both
wasm32 and wasm64, so they can be set in shared code.

Modified:
    cfe/trunk/lib/Basic/Targets/WebAssembly.h

Modified: cfe/trunk/lib/Basic/Targets/WebAssembly.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/WebAssembly.h?rev=323253&r1=323252&r2=323253&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/WebAssembly.h (original)
+++ cfe/trunk/lib/Basic/Targets/WebAssembly.h Tue Jan 23 12:22:12 2018
@@ -45,6 +45,7 @@ public:
     SigAtomicType = SignedLong;
     LongDoubleWidth = LongDoubleAlign = 128;
     LongDoubleFormat = &llvm::APFloat::IEEEquad();
+    MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
     SizeType = UnsignedInt;
     PtrDiffType = SignedInt;
     IntPtrType = SignedInt;
@@ -118,7 +119,6 @@ public:
   explicit WebAssembly32TargetInfo(const llvm::Triple &T,
                                    const TargetOptions &Opts)
       : WebAssemblyTargetInfo(T, Opts) {
-    MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
     resetDataLayout("e-m:e-p:32:32-i64:64-n32:64-S128");
   }
 
@@ -135,7 +135,6 @@ public:
       : WebAssemblyTargetInfo(T, Opts) {
     LongAlign = LongWidth = 64;
     PointerAlign = PointerWidth = 64;
-    MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
     SizeType = UnsignedLong;
     PtrDiffType = SignedLong;
     IntPtrType = SignedLong;




More information about the cfe-commits mailing list