diff options
author | Nirav Dave <niravd@google.com> | 2017-06-28 03:20:04 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2017-06-28 03:20:04 +0000 |
commit | c4ce2293b0d55fa803270c6c00d6fbe2ebc9ade2 (patch) | |
tree | c5a0ef1db05005bfff2d1e4e4e5b98956363154e /llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp | |
parent | d445455643900416388b5819ebbdfc39329ab8cc (diff) | |
download | bcm5719-llvm-c4ce2293b0d55fa803270c6c00d6fbe2ebc9ade2.tar.gz bcm5719-llvm-c4ce2293b0d55fa803270c6c00d6fbe2ebc9ade2.zip |
Revert "[DAG] Fold FrameIndex offset into BaseIndexOffset analysis. NFCI."
This reverts commit r306498 which appears to cause a compilrt-rt test failures
llvm-svn: 306501
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp index f954a52d671..d2e0dbbf88e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp @@ -11,7 +11,6 @@ #include "llvm/CodeGen/SelectionDAGAddressAnalysis.h" #include "llvm/CodeGen/ISDOpcodes.h" -#include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/CodeGen/SelectionDAGNodes.h" @@ -27,28 +26,20 @@ bool BaseIndexOffset::equalBaseIndex(BaseIndexOffset &Other, // Match GlobalAddresses if (Index == Other.Index) - if (auto *A = dyn_cast<GlobalAddressSDNode>(Base)) - if (auto *B = dyn_cast<GlobalAddressSDNode>(Other.Base)) + if (GlobalAddressSDNode *A = dyn_cast<GlobalAddressSDNode>(Base)) + if (GlobalAddressSDNode *B = dyn_cast<GlobalAddressSDNode>(Other.Base)) if (A->getGlobal() == B->getGlobal()) { Off += B->getOffset() - A->getOffset(); return true; } - // Match FrameIndexes - if (Index == Other.Index) - if (auto *A = dyn_cast<FrameIndexSDNode>(Base)) - if (auto *B = dyn_cast<FrameIndexSDNode>(Other.Base)) { - const MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo(); - Off += MFI.getObjectOffset(B->getIndex()) - - MFI.getObjectOffset(A->getIndex()); - return true; - } + // TODO: we should be able to add FrameIndex analysis improvements here. return false; } /// Parses tree in Ptr for base, index, offset addresses. -BaseIndexOffset BaseIndexOffset::match(SDValue Ptr, const SelectionDAG &DAG) { +BaseIndexOffset BaseIndexOffset::match(SDValue Ptr) { // (((B + I*M) + c)) + c ... SDValue Base = Ptr; SDValue Index = SDValue(); |