diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-01-05 15:24:23 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2020-01-05 15:24:57 +0000 |
commit | 3db84f142af854b714850ec29ce6ca017c07e46c (patch) | |
tree | 9bc7af37c3c2d3daf71aa1ba501eee45fb1806c2 /llvm/lib/Target | |
parent | fb8c9a339a9d0b78370fbd814d62dd5779f1e196 (diff) | |
download | bcm5719-llvm-3db84f142af854b714850ec29ce6ca017c07e46c.tar.gz bcm5719-llvm-3db84f142af854b714850ec29ce6ca017c07e46c.zip |
[X86] Merge (identical) LowerGC_TRANSITION_START and LowerGC_TRANSITION_END (NFC)
Silences a copy+paste analyzer warning - all they are doing are inserting NOOPs in exactly the same way.
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 28 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.h | 3 |
2 files changed, 4 insertions, 27 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 3d20d91a6b0..63ba9c7ab9b 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -28328,29 +28328,8 @@ static SDValue LowerADDRSPACECAST(SDValue Op, SelectionDAG &DAG) { return Op; } -SDValue X86TargetLowering::LowerGC_TRANSITION_START(SDValue Op, - SelectionDAG &DAG) const { - // TODO: Eventually, the lowering of these nodes should be informed by or - // deferred to the GC strategy for the function in which they appear. For - // now, however, they must be lowered to something. Since they are logically - // no-ops in the case of a null GC strategy (or a GC strategy which does not - // require special handling for these nodes), lower them as literal NOOPs for - // the time being. - SmallVector<SDValue, 2> Ops; - - Ops.push_back(Op.getOperand(0)); - if (Op->getGluedNode()) - Ops.push_back(Op->getOperand(Op->getNumOperands() - 1)); - - SDLoc OpDL(Op); - SDVTList VTs = DAG.getVTList(MVT::Other, MVT::Glue); - SDValue NOOP(DAG.getMachineNode(X86::NOOP, SDLoc(Op), VTs, Ops), 0); - - return NOOP; -} - -SDValue X86TargetLowering::LowerGC_TRANSITION_END(SDValue Op, - SelectionDAG &DAG) const { +SDValue X86TargetLowering::LowerGC_TRANSITION(SDValue Op, + SelectionDAG &DAG) const { // TODO: Eventually, the lowering of these nodes should be informed by or // deferred to the GC strategy for the function in which they appear. For // now, however, they must be lowered to something. Since they are logically @@ -28516,8 +28495,7 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const { case ISD::MGATHER: return LowerMGATHER(Op, Subtarget, DAG); case ISD::MSCATTER: return LowerMSCATTER(Op, Subtarget, DAG); case ISD::GC_TRANSITION_START: - return LowerGC_TRANSITION_START(Op, DAG); - case ISD::GC_TRANSITION_END: return LowerGC_TRANSITION_END(Op, DAG); + case ISD::GC_TRANSITION_END: return LowerGC_TRANSITION(Op, DAG); case ISD::ADDRSPACECAST: return LowerADDRSPACECAST(Op, DAG); } diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h index 4e16dfb53d2..d852093a263 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.h +++ b/llvm/lib/Target/X86/X86ISelLowering.h @@ -1385,8 +1385,7 @@ namespace llvm { SDValue LowerINIT_TRAMPOLINE(SDValue Op, SelectionDAG &DAG) const; SDValue LowerFLT_ROUNDS_(SDValue Op, SelectionDAG &DAG) const; SDValue LowerWin64_i128OP(SDValue Op, SelectionDAG &DAG) const; - SDValue LowerGC_TRANSITION_START(SDValue Op, SelectionDAG &DAG) const; - SDValue LowerGC_TRANSITION_END(SDValue Op, SelectionDAG &DAG) const; + SDValue LowerGC_TRANSITION(SDValue Op, SelectionDAG &DAG) const; SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const; SDValue lowerFaddFsub(SDValue Op, SelectionDAG &DAG) const; SDValue LowerFP_EXTEND(SDValue Op, SelectionDAG &DAG) const; |