Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-09-03 Thread Dan Gohman via cfe-commits
sunfishcode added inline comments. Comment at: lib/Basic/Targets.cpp:7643-7649 @@ +7642,9 @@ + case llvm::Triple::wasm64: +// Until specific variations are defined, don't permit any. +if (!(Triple == llvm::Triple("wasm64-unknown-unknown")) || +(!Triple.getVendorNa

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-09-03 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL246814: [WebAssembly] Initial WebAssembly support in clang (authored by djg). Changed prior to commit: http://reviews.llvm.org/D12002?vs=33637&id=33985#toc Repository: rL LLVM http://reviews.llvm.or

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-09-03 Thread Eric Christopher via cfe-commits
echristo added inline comments. Comment at: lib/Basic/Targets.cpp:7643-7649 @@ +7642,9 @@ + case llvm::Triple::wasm64: +// Until specific variations are defined, don't permit any. +if (!(Triple == llvm::Triple("wasm64-unknown-unknown")) || +(!Triple.getVendorName(

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-09-03 Thread Dan Gohman via cfe-commits
sunfishcode added a subscriber: sunfishcode. Comment at: lib/Basic/Targets.cpp:6943-6944 @@ +6942,4 @@ + + Diags.Report(diag::err_opt_not_valid_with_opt) << Feature + << "-target-feature"; + return false; --

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-09-02 Thread Eric Christopher via cfe-commits
echristo accepted this revision. echristo added a reviewer: echristo. echristo added a comment. A couple things inline that need changing, but feel free to commit after without a repost. -eric Comment at: lib/Basic/Targets.cpp:6943-6944 @@ +6942,4 @@ + + Diags.Report(diag

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 33637. sunfish added a comment. Updated to address review comments: - added comments - simplified Triple validation code - removed -mcpu="native" code Repository: rL LLVM http://reviews.llvm.org/D12002 Files: include/clang/Basic/BuiltinsWebAssembly.de

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Dan Gohman via cfe-commits
sunfish added a comment. Thanks for the review! Comment at: include/clang/Basic/TargetCXXABI.h:166 @@ -148,1 +165,3 @@ + /// \brief Are member functions differently aligned? + bool areMemberFunctionsAligned() const { echristo wrote: > Can you elaborate on th

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Eric Christopher via cfe-commits
echristo added a subscriber: echristo. echristo added a comment. Some inline comments. Thanks! -eric Comment at: include/clang/Basic/TargetCXXABI.h:166 @@ -148,1 +165,3 @@ + /// \brief Are member functions differently aligned? + bool areMemberFunctionsAligned() const { ---

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-31 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 33611. sunfish marked 2 inline comments as done. sunfish added a comment. Herald added a subscriber: dschuff. Minor updates to keep the patch building and working as code changes around it. Also enabled -mthread-model. Repository: rL LLVM http://reviews.

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-20 Thread Dan Gohman via cfe-commits
sunfish marked 2 inline comments as done. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:364 @@ +363,3 @@ +ItaniumCXXABI(CGM, /* UseARMMethodPtrABI = */ true, + /* UseARMGuardVarABI = */ true) {} + jfb wrote: > It's more common to have no spaces fo

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-19 Thread JF Bastien via cfe-commits
jfb added a comment. Still lgtm, with minor comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:364 @@ +363,3 @@ +ItaniumCXXABI(CGM, /* UseARMMethodPtrABI = */ true, + /* UseARMGuardVarABI = */ true) {} + It's more common to have no spaces f

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-18 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 32485. sunfish marked an inline comment as done. sunfish added a comment. The patch evolved enough to prompt posting one more new version; major changes: - make constructors and destructors return this - enable -fuse-init-array - enable -fno-common - disable

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-14 Thread JF Bastien via cfe-commits
jfb accepted this revision. jfb added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/Basic/Targets.cpp:7002 @@ +7001,3 @@ + bool isCLZForZeroUndef() const override final { return false; } + bool hasInt128Type() const override final { return tr

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-14 Thread Dan Gohman via cfe-commits
sunfish added inline comments. Comment at: lib/Basic/Targets.cpp:7010 @@ +7009,3 @@ + { #ID, TYPE, ATTRS, HEADER, ALL_LANGUAGES, nullptr }, +#include "clang/Basic/BuiltinsWebAssembly.def" +}; WebAssembly32TargetInfo is subclassed in LLVM code, and getTargetDefine

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-14 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 32192. sunfish marked an inline comment as done. sunfish added a comment. - set MaxAtomicInlineWidth to 0 for now (sets *_ATOMIC_*_LOCK_FREE to 1) - enable LargeArrayAlign - enable __int128 - various cleanups Repository: rL LLVM http://reviews.llvm.org/D1

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-14 Thread JF Bastien via cfe-commits
jfb added inline comments. Comment at: lib/Basic/Targets.cpp:6938 @@ +6937,3 @@ +BigEndian = false; +NoAsmVariants = true; +SuitableAlign = 128; True, leaving it as is sgtm. Comment at: lib/Basic/Targets.cpp:6994 @@ +6993,3 @@ +#inclu

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-13 Thread Dan Gohman via cfe-commits
sunfish marked 2 inline comments as done. Comment at: lib/Basic/Targets.cpp:6935 @@ +6934,3 @@ + +public: + explicit WebAssemblyTargetInfo(const llvm::Triple &T) : TargetInfo(T) { I've now removed this (for now; we can discuss what to do in a later patch). Repo

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-13 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 32109. sunfish added a comment. - use more default values in WebAssemblyTargetInfo etc. - add a comment about using ARM-C++-ABI-style guard variables (for now) - fix diff to include context for Phabricator Repository: rL LLVM http://reviews.llvm.org/D1200

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-12 Thread Dan Gohman via cfe-commits
sunfish updated this revision to Diff 32025. sunfish marked 3 inline comments as done. sunfish added a comment. Minor changes to address review comments. Repository: rL LLVM http://reviews.llvm.org/D12002 Files: include/clang/Basic/BuiltinsWebAssembly.def include/clang/Basic/TargetBuilti

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-12 Thread Dan Gohman via cfe-commits
sunfish planned changes to this revision. sunfish marked 3 inline comments as done. Comment at: lib/Basic/Targets.cpp:6935 @@ +6934,3 @@ +NoAsmVariants = true; +LongDoubleWidth = LongDoubleAlign = 64; +SuitableAlign = 128; jfb wrote: > That's already t

Re: [PATCH] D12002: Initial WebAssembly support in clang

2015-08-12 Thread JF Bastien via cfe-commits
jfb added a subscriber: rengolin. Comment at: include/clang/Basic/TargetCXXABI.h:166 @@ +165,3 @@ +case GenericMIPS: + // TODO: ARM-style pointers to member functions put the discriminator in + // the this adjustment, so they don't require functions to have any

[PATCH] D12002: Initial WebAssembly support in clang

2015-08-12 Thread Dan Gohman via cfe-commits
sunfish created this revision. sunfish added subscribers: cfe-commits, jfb. sunfish set the repository for this revision to rL LLVM. This patch adds initial WebAssembly support in clang. The WebAssembly target is currently experimental. Repository: rL LLVM http://reviews.llvm.org/D12002 File