[PATCH] D54661: [WebAssembly] Don't override default implementation of isOffsetFoldingLegal. NFC.
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 18:45:11 PDT 2019
sbc100 updated this revision to Diff 190938.
sbc100 added a comment.
-rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54661/new/
https://reviews.llvm.org/D54661
Files:
llvm/lib/Target/TargetMachine.cpp
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
Index: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
+++ llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
@@ -46,7 +46,6 @@
AtomicExpansionKind shouldExpandAtomicRMWInIR(AtomicRMWInst *) const override;
FastISel *createFastISel(FunctionLoweringInfo &FuncInfo,
const TargetLibraryInfo *LibInfo) const override;
- bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override;
MVT getScalarShiftAmountTy(const DataLayout &DL, EVT) const override;
MachineBasicBlock *
EmitInstrWithCustomInserter(MachineInstr &MI,
Index: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -294,12 +294,6 @@
return WebAssembly::createFastISel(FuncInfo, LibInfo);
}
-bool WebAssemblyTargetLowering::isOffsetFoldingLegal(
- const GlobalAddressSDNode * /*GA*/) const {
- // All offsets can be folded.
- return true;
-}
-
MVT WebAssemblyTargetLowering::getScalarShiftAmountTy(const DataLayout & /*DL*/,
EVT VT) const {
unsigned BitWidth = NextPowerOf2(VT.getSizeInBits() - 1);
Index: llvm/lib/Target/TargetMachine.cpp
===================================================================
--- llvm/lib/Target/TargetMachine.cpp
+++ llvm/lib/Target/TargetMachine.cpp
@@ -161,7 +161,7 @@
if (GV && !GV->hasDefaultVisibility())
return true;
- if (TT.isOSBinFormatMachO()) {
+ if (TT.isOSBinFormatMachO() || TT.isOSBinFormatWasm()) {
if (RM == Reloc::Static)
return true;
return GV && GV->isStrongDefinitionForLinker();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54661.190938.patch
Type: text/x-patch
Size: 1875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190316/3935ef7f/attachment.bin>
More information about the llvm-commits
mailing list