[bpf] fix build

Patch by Brenden Blanco.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexei Starovoitov 2015-04-28 20:38:56 +00:00
parent 032f234969
commit 04877fa7ff
2 changed files with 9 additions and 8 deletions

View File

@ -56,9 +56,10 @@ private:
// ComplexPattern used on BPF Load/Store instructions
bool BPFDAGToDAGISel::SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset) {
// if Address is FI, get the TargetFrameIndex.
SDLoc DL(Addr);
if (FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(Addr)) {
Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i64);
Offset = CurDAG->getTargetConstant(0, MVT::i64);
Offset = CurDAG->getTargetConstant(0, DL, MVT::i64);
return true;
}
@ -78,13 +79,13 @@ bool BPFDAGToDAGISel::SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset) {
else
Base = Addr.getOperand(0);
Offset = CurDAG->getTargetConstant(CN->getSExtValue(), MVT::i64);
Offset = CurDAG->getTargetConstant(CN->getSExtValue(), DL, MVT::i64);
return true;
}
}
Base = Addr;
Offset = CurDAG->getTargetConstant(0, MVT::i64);
Offset = CurDAG->getTargetConstant(0, DL, MVT::i64);
return true;
}

View File

@ -303,7 +303,7 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
}
Chain = DAG.getCALLSEQ_START(
Chain, DAG.getConstant(NumBytes, getPointerTy(), true), CLI.DL);
Chain, DAG.getConstant(NumBytes, CLI.DL, getPointerTy(), true), CLI.DL);
SmallVector<std::pair<unsigned, SDValue>, 5> RegsToPass;
@ -374,8 +374,8 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
// Create the CALLSEQ_END node.
Chain = DAG.getCALLSEQ_END(
Chain, DAG.getConstant(NumBytes, getPointerTy(), true),
DAG.getConstant(0, getPointerTy(), true), InFlag, CLI.DL);
Chain, DAG.getConstant(NumBytes, CLI.DL, getPointerTy(), true),
DAG.getConstant(0, CLI.DL, getPointerTy(), true), InFlag, CLI.DL);
InFlag = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we
@ -487,7 +487,7 @@ SDValue BPFTargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const {
NegateCC(LHS, RHS, CC);
return DAG.getNode(BPFISD::BR_CC, DL, Op.getValueType(), Chain, LHS, RHS,
DAG.getConstant(CC, MVT::i64), Dest);
DAG.getConstant(CC, DL, MVT::i64), Dest);
}
SDValue BPFTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
@ -500,7 +500,7 @@ SDValue BPFTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
NegateCC(LHS, RHS, CC);
SDValue TargetCC = DAG.getConstant(CC, MVT::i64);
SDValue TargetCC = DAG.getConstant(CC, DL, MVT::i64);
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
SDValue Ops[] = {LHS, RHS, TargetCC, TrueV, FalseV};