From 2546b5ac5f1a945326a99fcb02ee80ec987fe947 Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Mon, 23 May 2016 13:02:11 +0000 Subject: Reverts "[BPF] Remove exit-on-error flag in test (PR27766)" This patch reverts r270419 because it broke a lot of buildbots, mostly Windows. We'd like help in investigating the issues, but for now, it should stay out. llvm-svn: 270433 --- llvm/lib/Target/BPF/BPFISelLowering.cpp | 9 ++++----- llvm/lib/Target/BPF/BPFISelLowering.h | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/BPF/BPFISelLowering.cpp b/llvm/lib/Target/BPF/BPFISelLowering.cpp index d5ace85b8e5..066dc5e31e1 100644 --- a/llvm/lib/Target/BPF/BPFISelLowering.cpp +++ b/llvm/lib/Target/BPF/BPFISelLowering.cpp @@ -209,8 +209,6 @@ SDValue BPFTargetLowering::LowerFormalArguments( return Chain; } -const unsigned long BPFTargetLowering::MaxArgs = 5; - SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl &InVals) const { SelectionDAG &DAG = CLI.DAG; @@ -243,8 +241,9 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, unsigned NumBytes = CCInfo.getNextStackOffset(); - if (Outs.size() > MaxArgs) + if (Outs.size() >= 6) { fail(CLI.DL, DAG, "too many args to ", Callee); + } for (auto &Arg : Outs) { ISD::ArgFlagsTy Flags = Arg.Flags; @@ -258,10 +257,10 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, Chain = DAG.getCALLSEQ_START( Chain, DAG.getConstant(NumBytes, CLI.DL, PtrVT, true), CLI.DL); - SmallVector, MaxArgs> RegsToPass; + SmallVector, 5> RegsToPass; // Walk arg assignments - for (unsigned i = 0, e = std::min(ArgLocs.size(), MaxArgs); i != e; ++i) { + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { CCValAssign &VA = ArgLocs[i]; SDValue Arg = OutVals[i]; diff --git a/llvm/lib/Target/BPF/BPFISelLowering.h b/llvm/lib/Target/BPF/BPFISelLowering.h index 8663b67a7f0..ec71dca2fae 100644 --- a/llvm/lib/Target/BPF/BPFISelLowering.h +++ b/llvm/lib/Target/BPF/BPFISelLowering.h @@ -58,9 +58,6 @@ private: SelectionDAG &DAG, SmallVectorImpl &InVals) const; - // Maximum number of arguments to a call - static const unsigned long MaxArgs; - // Lower a call into CALLSEQ_START - BPFISD:CALL - CALLSEQ_END chain SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl &InVals) const override; -- cgit v1.2.3