diff options
author | Paulo Matos <pmatos@igalia.com> | 2021-06-10 10:02:10 +0200 |
---|---|---|
committer | Paulo Matos <pmatos@igalia.com> | 2021-06-10 10:07:45 +0200 |
commit | 31859f896cf90d64904134ce7b31230f374c3fcc (patch) | |
tree | 82be96496afd3d6408de39b8a53f6cf5f0aeb7cc /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | ad6a84f82c4572dd92369b4f67df6e7c3536f9a2 (diff) | |
download | llvm-31859f896cf90d64904134ce7b31230f374c3fcc.zip llvm-31859f896cf90d64904134ce7b31230f374c3fcc.tar.gz llvm-31859f896cf90d64904134ce7b31230f374c3fcc.tar.bz2 |
Implementation of global.get/set for reftypes in LLVM IR
This change implements new DAG notes GLOBAL_GET/GLOBAL_SET, and
lowering methods for load and stores of reference types from IR
globals. Once the lowering creates the new nodes, tablegen pattern
matches those and converts them to Wasm global.get/set.
Reviewed By: tlively
Differential Revision: https://reviews.llvm.org/D95425
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index d2c291f..cb27e09 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1706,7 +1706,7 @@ bool TargetLoweringBase::allowsMemoryAccessForAlignment( // For example, the ABI alignment may change based on software platform while // this function should only be affected by hardware implementation. Type *Ty = VT.getTypeForEVT(Context); - if (Alignment >= DL.getABITypeAlign(Ty)) { + if (VT.isZeroSized() || Alignment >= DL.getABITypeAlign(Ty)) { // Assume that an access that meets the ABI-specified alignment is fast. if (Fast != nullptr) *Fast = true; |