[PATCH] D58854: [WebAssembly] Temporarily disable bulk-memory with -pthread
Thomas Lively via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 16:16:07 PST 2019
tlively created this revision.
tlively added a reviewer: sbc100.
Herald added subscribers: cfe-commits, jfb, sunfish, aheejin, jgravelle-google, dschuff.
Herald added a project: clang.
aheejin accepted this revision.
This revision is now accepted and ready to land.
To prevent the instability of bulk-memory in the wasm backend from
blocking separate pthread testing, temporarily remove the logic that
adds -mbulk-memory in the presence of -pthread. Since browsers will
ship bulk memory before or alongside threads, this change will be
reverted as soon as bulk memory has stabilized in the backend.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D58854
Files:
clang/lib/Driver/ToolChains/WebAssembly.cpp
clang/test/Driver/wasm-toolchain.c
clang/test/Preprocessor/wasm-target-features.c
Index: clang/test/Preprocessor/wasm-target-features.c
===================================================================
--- clang/test/Preprocessor/wasm-target-features.c
+++ clang/test/Preprocessor/wasm-target-features.c
@@ -59,8 +59,7 @@
// RUN: -target wasm64-unknown-unknown -matomics \
// RUN: | FileCheck %s -check-prefix=ATOMICS
//
-// ATOMICS-DAG:#define __wasm_atomics__ 1{{$}}
-// ATOMICS-DAG:#define __wasm_bulk_memory__ 1{{$}}
+// ATOMICS:#define __wasm_atomics__ 1{{$}}
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -pthread \
@@ -69,8 +68,7 @@
// RUN: -target wasm64-unknown-unknown -pthread \
// RUN: | FileCheck %s -check-prefix=PTHREAD
//
-// PTHREAD-DAG:#define __wasm_atomics__ 1{{$}}
-// PTHREAD-DAG:#define __wasm_bulk_memory__ 1{{$}}
+// PTHREAD:#define __wasm_atomics__ 1{{$}}
// RUN: %clang -E -dM %s -o - 2>&1 \
// RUN: -target wasm32-unknown-unknown -mcpu=mvp \
Index: clang/test/Driver/wasm-toolchain.c
===================================================================
--- clang/test/Driver/wasm-toolchain.c
+++ clang/test/Driver/wasm-toolchain.c
@@ -41,18 +41,10 @@
// Thread-related command line tests.
-// '-pthread' sets '-target-feature +atomics' and '-target-feature +bulk-memory'
+// '-pthread' sets '-target-feature +atomics'
// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread 2>&1 | FileCheck -check-prefix=PTHREAD %s
-// PTHREAD: clang{{.*}}" "-cc1" {{.*}} "-target-feature" "+atomics" "-target-feature" "+bulk-memory"
+// PTHREAD: clang{{.*}}" "-cc1" {{.*}} "-target-feature" "+atomics"
// '-pthread' not allowed with '-mno-atomics'
// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread -mno-atomics 2>&1 | FileCheck -check-prefix=PTHREAD_NO_ATOMICS %s
// PTHREAD_NO_ATOMICS: invalid argument '-pthread' not allowed with '-mno-atomics'
-
-// '-pthread' not allowed with '-mno-bulk-memory'
-// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -pthread -mno-bulk-memory 2>&1 | FileCheck -check-prefix=PTHREAD_NO_BULKMEM %s
-// PTHREAD_NO_BULKMEM: invalid argument '-pthread' not allowed with '-mno-bulk-memory'
-
-// '-matomics' not allowed with '-mno-bulk-memory'
-// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s -matomics -mno-bulk-memory 2>&1 | FileCheck -check-prefix=ATOMICS_NO_BULKMEM %s
-// ATOMICS_NO_BULKMEM: invalid argument '-matomics' not allowed with '-mno-bulk-memory'
Index: clang/lib/Driver/ToolChains/WebAssembly.cpp
===================================================================
--- clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -124,8 +124,7 @@
options::OPT_fno_use_init_array, true))
CC1Args.push_back("-fuse-init-array");
- // '-pthread' implies '-target-feature +atomics' and
- // '-target-feature +bulk-memory'
+ // '-pthread' implies '-target-feature +atomics'
if (DriverArgs.hasFlag(options::OPT_pthread, options::OPT_no_pthread,
false)) {
if (DriverArgs.hasFlag(options::OPT_mno_atomics, options::OPT_matomics,
@@ -133,27 +132,8 @@
getDriver().Diag(diag::err_drv_argument_not_allowed_with)
<< "-pthread"
<< "-mno-atomics";
- if (DriverArgs.hasFlag(options::OPT_mno_bulk_memory,
- options::OPT_mbulk_memory, false))
- getDriver().Diag(diag::err_drv_argument_not_allowed_with)
- << "-pthread"
- << "-mno-bulk-memory";
CC1Args.push_back("-target-feature");
CC1Args.push_back("+atomics");
- CC1Args.push_back("-target-feature");
- CC1Args.push_back("+bulk-memory");
- }
-
- // '-matomics' implies '-mbulk-memory'
- if (DriverArgs.hasFlag(options::OPT_matomics, options::OPT_mno_atomics,
- false)) {
- if (DriverArgs.hasFlag(options::OPT_mno_bulk_memory,
- options::OPT_mbulk_memory, false))
- getDriver().Diag(diag::err_drv_argument_not_allowed_with)
- << "-matomics"
- << "-mno-bulk-memory";
- CC1Args.push_back("-target-feature");
- CC1Args.push_back("+bulk-memory");
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58854.188997.patch
Type: text/x-patch
Size: 4304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190302/0342df3a/attachment.bin>
More information about the cfe-commits
mailing list