[llvm] r236030 - [bpf] fix build
Alexei Starovoitov
alexei.starovoitov at gmail.com
Tue Apr 28 13:38:56 PDT 2015
Author: ast
Date: Tue Apr 28 15:38:56 2015
New Revision: 236030
URL: http://llvm.org/viewvc/llvm-project?rev=236030&view=rev
Log:
[bpf] fix build
Patch by Brenden Blanco.
Modified:
llvm/trunk/lib/Target/BPF/BPFISelDAGToDAG.cpp
llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
Modified: llvm/trunk/lib/Target/BPF/BPFISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelDAGToDAG.cpp?rev=236030&r1=236029&r2=236030&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelDAGToDAG.cpp Tue Apr 28 15:38:56 2015
@@ -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
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;
}
Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=236030&r1=236029&r2=236030&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Tue Apr 28 15:38:56 2015
@@ -303,7 +303,7 @@ SDValue BPFTargetLowering::LowerCall(Tar
}
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(Tar
// 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(SD
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_C
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};
More information about the llvm-commits
mailing list