summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-02-05 00:49:55 +0000
committerThomas Lively <tlively@google.com>2019-02-05 00:49:55 +0000
commitd99af23765a99ef2461d06b74448d6e54dd7e573 (patch)
tree26fb976effaad88da2b766088d6b32ee0bb10686 /llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
parent1a17032b788016299ea4e3c4b53670c6dcd94b4f (diff)
downloadbcm5719-llvm-d99af23765a99ef2461d06b74448d6e54dd7e573.tar.gz
bcm5719-llvm-d99af23765a99ef2461d06b74448d6e54dd7e573.zip
[WebAssembly] memory.copy
Summary: Depends on D57495. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish Differential Revision: https://reviews.llvm.org/D57498 llvm-svn: 353127
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index d0543925a83..b17c7fae043 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -243,6 +243,12 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
setOperationAction(ISD::INTRINSIC_VOID, MVT::Other, Custom);
setMaxAtomicSizeInBitsSupported(64);
+
+ if (Subtarget->hasBulkMemory()) {
+ // Using memory.copy is always better than using multiple loads and stores
+ MaxStoresPerMemcpy = 1;
+ MaxStoresPerMemcpyOptSize = 1;
+ }
}
TargetLowering::AtomicExpansionKind
OpenPOWER on IntegriCloud