diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-21 20:31:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-21 20:31:19 +0000 |
commit | 52a261b3c1391c5fec399ddeb3fc6ee9541e8790 (patch) | |
tree | 800a9930728ffcc9d6f9a371dce4420ba7828c8c /lib/Target/MSP430 | |
parent | 7c727072168c55493ec362e254af1cd740d7eaf2 (diff) | |
download | external_llvm-52a261b3c1391c5fec399ddeb3fc6ee9541e8790.zip external_llvm-52a261b3c1391c5fec399ddeb3fc6ee9541e8790.tar.gz external_llvm-52a261b3c1391c5fec399ddeb3fc6ee9541e8790.tar.bz2 |
fix a long standing wart: all the ComplexPattern's were being
passed the root of the match, even though only a few patterns
actually needed this (one in X86, several in ARM [which should
be refactored anyway], and some in CellSPU that I don't feel
like detangling). Instead of requiring all ComplexPatterns to
take the dead root, have targets opt into getting the root by
putting SDNPWantRoot on the ComplexPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430')
-rw-r--r-- | lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp b/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp index 1b64f9b..5430d43 100644 --- a/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp +++ b/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp @@ -120,7 +120,7 @@ namespace { SDNode *SelectIndexedBinOp(SDNode *Op, SDValue N1, SDValue N2, unsigned Opc8, unsigned Opc16); - bool SelectAddr(SDNode *Op, SDValue Addr, SDValue &Base, SDValue &Disp); + bool SelectAddr(SDValue Addr, SDValue &Base, SDValue &Disp); }; } // end anonymous namespace @@ -245,7 +245,7 @@ bool MSP430DAGToDAGISel::MatchAddress(SDValue N, MSP430ISelAddressMode &AM) { /// SelectAddr - returns true if it is able pattern match an addressing mode. /// It returns the operands which make up the maximal addressing mode it can /// match by reference. -bool MSP430DAGToDAGISel::SelectAddr(SDNode *Op, SDValue N, +bool MSP430DAGToDAGISel::SelectAddr(SDValue N, SDValue &Base, SDValue &Disp) { MSP430ISelAddressMode AM; @@ -263,7 +263,7 @@ bool MSP430DAGToDAGISel::SelectAddr(SDNode *Op, SDValue N, AM.Base.Reg; if (AM.GV) - Disp = CurDAG->getTargetGlobalAddress(AM.GV, Op->getDebugLoc(), + Disp = CurDAG->getTargetGlobalAddress(AM.GV, N->getDebugLoc(), MVT::i16, AM.Disp, 0/*AM.SymbolFlags*/); else if (AM.CP) @@ -289,7 +289,7 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, switch (ConstraintCode) { default: return true; case 'm': // memory - if (!SelectAddr(Op.getNode(), Op, Op0, Op1)) + if (!SelectAddr(Op, Op0, Op1)) return true; break; } |