[llvm] r270433 - Reverts "[BPF] Remove exit-on-error flag in test (PR27766)"

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 06:02:11 PDT 2016


Author: rengolin
Date: Mon May 23 08:02:11 2016
New Revision: 270433

URL: http://llvm.org/viewvc/llvm-project?rev=270433&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
    llvm/trunk/lib/Target/BPF/BPFISelLowering.h
    llvm/trunk/test/CodeGen/BPF/many_args1.ll

Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=270433&r1=270432&r2=270433&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Mon May 23 08:02:11 2016
@@ -209,8 +209,6 @@ SDValue BPFTargetLowering::LowerFormalAr
   return Chain;
 }
 
-const unsigned long BPFTargetLowering::MaxArgs = 5;
-
 SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
                                      SmallVectorImpl<SDValue> &InVals) const {
   SelectionDAG &DAG = CLI.DAG;
@@ -243,8 +241,9 @@ SDValue BPFTargetLowering::LowerCall(Tar
 
   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(Tar
   Chain = DAG.getCALLSEQ_START(
       Chain, DAG.getConstant(NumBytes, CLI.DL, PtrVT, true), CLI.DL);
 
-  SmallVector<std::pair<unsigned, SDValue>, MaxArgs> RegsToPass;
+  SmallVector<std::pair<unsigned, SDValue>, 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];
 

Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.h?rev=270433&r1=270432&r2=270433&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.h (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.h Mon May 23 08:02:11 2016
@@ -58,9 +58,6 @@ private:
                           SelectionDAG &DAG,
                           SmallVectorImpl<SDValue> &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<SDValue> &InVals) const override;

Modified: llvm/trunk/test/CodeGen/BPF/many_args1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/BPF/many_args1.ll?rev=270433&r1=270432&r2=270433&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/BPF/many_args1.ll (original)
+++ llvm/trunk/test/CodeGen/BPF/many_args1.ll Mon May 23 08:02:11 2016
@@ -1,4 +1,4 @@
-; RUN: not llc -march=bpf < %s 2> %t1
+; RUN: not llc -march=bpf -exit-on-error < %s 2> %t1
 ; RUN: FileCheck %s < %t1
 ; CHECK: too many args
 




More information about the llvm-commits mailing list