r355248 - [WebAssembly] Temporarily disable bulk-memory with -pthread
Thomas Lively via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 16:18:09 PST 2019
Author: tlively
Date: Fri Mar 1 16:18:09 2019
New Revision: 355248
URL: http://llvm.org/viewvc/llvm-project?rev=355248&view=rev
Log:
[WebAssembly] Temporarily disable bulk-memory with -pthread
Summary:
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.
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58854
Modified:
cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp
cfe/trunk/test/Driver/wasm-toolchain.c
cfe/trunk/test/Preprocessor/wasm-target-features.c
Modified: cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp?rev=355248&r1=355247&r2=355248&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/WebAssembly.cpp Fri Mar 1 16:18:09 2019
@@ -124,8 +124,7 @@ void WebAssembly::addClangTargetOptions(
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 @@ void WebAssembly::addClangTargetOptions(
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");
}
}
Modified: cfe/trunk/test/Driver/wasm-toolchain.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/wasm-toolchain.c?rev=355248&r1=355247&r2=355248&view=diff
==============================================================================
--- cfe/trunk/test/Driver/wasm-toolchain.c (original)
+++ cfe/trunk/test/Driver/wasm-toolchain.c Fri Mar 1 16:18:09 2019
@@ -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'
Modified: cfe/trunk/test/Preprocessor/wasm-target-features.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/wasm-target-features.c?rev=355248&r1=355247&r2=355248&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/wasm-target-features.c (original)
+++ cfe/trunk/test/Preprocessor/wasm-target-features.c Fri Mar 1 16:18:09 2019
@@ -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 \
More information about the cfe-commits
mailing list