[PATCH] D57534: [DAG][ARM] Define upwrapAddress for ARM backend.
Nirav Dave via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 31 12:04:45 PST 2019
niravd created this revision.
niravd added reviewers: arsenm, efriedma, t.p.northover.
Herald added subscribers: hiraditya, kristof.beyls, javed.absar, wdng.
Like with X86, this allows better DAG-level alias analysis and
alignment inference for wrapped addresses.
Repository:
rL LLVM
https://reviews.llvm.org/D57534
Files:
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
Index: llvm/lib/Target/ARM/ARMISelLowering.h
===================================================================
--- llvm/lib/Target/ARM/ARMISelLowering.h
+++ llvm/lib/Target/ARM/ARMISelLowering.h
@@ -309,6 +309,8 @@
void AdjustInstrPostInstrSelection(MachineInstr &MI,
SDNode *Node) const override;
+ SDValue unwrapAddress(SDValue N) const override;
+
SDValue PerformCMOVCombine(SDNode *N, SelectionDAG &DAG) const;
SDValue PerformBRCONDCombine(SDNode *N, SelectionDAG &DAG) const;
SDValue PerformCMOVToBFICombine(SDNode *N, SelectionDAG &DAG) const;
Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -9656,6 +9656,14 @@
MO.setIsDef(true);
}
+SDValue ARMTargetLowering::unwrapAddress(SDValue N) const {
+ if (N->getOpcode() == ARMISD::Wrapper ||
+ N->getOpcode() == ARMISD::WrapperPIC ||
+ N->getOpcode() == ARMISD::WrapperJT)
+ return N->getOperand(0);
+ return N;
+}
+
//===----------------------------------------------------------------------===//
// ARM Optimization Hooks
//===----------------------------------------------------------------------===//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57534.184563.patch
Type: text/x-patch
Size: 1331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190131/b4c824d7/attachment.bin>
More information about the llvm-commits
mailing list