aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/bmake/mk/meta2deps.sh2
-rw-r--r--contrib/llvm/lib/Transforms/Scalar/SCCP.cpp2
-rw-r--r--contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp2
-rw-r--r--contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff88
-rw-r--r--contrib/pf/pflogd/pflogd.82
-rw-r--r--contrib/tcpdump/tcpdump.c2
6 files changed, 94 insertions, 4 deletions
diff --git a/contrib/bmake/mk/meta2deps.sh b/contrib/bmake/mk/meta2deps.sh
index 2a79be17a331..0c934afd1c5f 100755
--- a/contrib/bmake/mk/meta2deps.sh
+++ b/contrib/bmake/mk/meta2deps.sh
@@ -52,7 +52,7 @@
# $SB/obj-i386/bsd/gnu/lib/csu
# $SB/obj-i386/bsd/gnu/lib/libgcc
# $SB/obj-i386/bsd/include
-# $SB/obj-i386/bsd/lib/csu/i386-elf
+# $SB/obj-i386/bsd/lib/csu/i386
# $SB/obj-i386/bsd/lib/libc
# $SB/src/bsd/include
# $SB/src/bsd/sys/i386/include
diff --git a/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp b/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp
index bc068f78c576..305175ff8f73 100644
--- a/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1055,7 +1055,7 @@ void SCCPSolver::visitLoadInst(LoadInst &I) {
// load null -> null
if (isa<ConstantPointerNull>(Ptr) && I.getPointerAddressSpace() == 0)
- return markConstant(IV, &I, Constant::getNullValue(I.getType()));
+ return markConstant(IV, &I, UndefValue::get(I.getType()));
// Transform load (constant global) into the value loaded.
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Ptr)) {
diff --git a/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index 919b45d3c7b1..add5432aa276 100644
--- a/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -86,7 +86,7 @@ static void ConnectProlog(Loop *L, Value *BECount, unsigned Count,
if (L->contains(PN)) {
NewPN->addIncoming(PN->getIncomingValueForBlock(NewPH), OrigPH);
} else {
- NewPN->addIncoming(Constant::getNullValue(PN->getType()), OrigPH);
+ NewPN->addIncoming(UndefValue::get(PN->getType()), OrigPH);
}
Value *V = PN->getIncomingValueForBlock(Latch);
diff --git a/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff b/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff
new file mode 100644
index 000000000000..1750e7438954
--- /dev/null
+++ b/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff
@@ -0,0 +1,88 @@
+Pull in r241142 from upstream llvm trunk (by David Majnemer):
+
+ [SCCP] Turn loads of null into undef instead of zero initialized values
+
+ Surprisingly, this is a correctness issue: the mmx type exists for
+ calling convention purposes, LLVM doesn't have a zero representation for
+ them.
+
+ This partially fixes PR23999.
+
+Pull in r241143 from upstream llvm trunk (by David Majnemer):
+
+ [LoopUnroll] Use undef for phis with no value live
+
+ We would create a phi node with a zero initialized operand instead of
+ undef in the case where no value was originally available. This was
+ problematic for x86_mmx which has no null value.
+
+These fix a "Cannot create a null constant of that type!" error when
+compiling the graphics/sdl2_gfx port with MMX enabled.
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/285149
+
+Index: lib/Transforms/Scalar/SCCP.cpp
+===================================================================
+--- lib/Transforms/Scalar/SCCP.cpp
++++ lib/Transforms/Scalar/SCCP.cpp
+@@ -1054,7 +1054,7 @@
+
+ // load null -> null
+ if (isa<ConstantPointerNull>(Ptr) && I.getPointerAddressSpace() == 0)
+- return markConstant(IV, &I, Constant::getNullValue(I.getType()));
++ return markConstant(IV, &I, UndefValue::get(I.getType()));
+
+ // Transform load (constant global) into the value loaded.
+ if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Ptr)) {
+Index: lib/Transforms/Utils/LoopUnrollRuntime.cpp
+===================================================================
+--- lib/Transforms/Utils/LoopUnrollRuntime.cpp
++++ lib/Transforms/Utils/LoopUnrollRuntime.cpp
+@@ -81,7 +81,7 @@
+ if (L->contains(PN)) {
+ NewPN->addIncoming(PN->getIncomingValueForBlock(NewPH), OrigPH);
+ } else {
+- NewPN->addIncoming(Constant::getNullValue(PN->getType()), OrigPH);
++ NewPN->addIncoming(UndefValue::get(PN->getType()), OrigPH);
+ }
+
+ Value *V = PN->getIncomingValueForBlock(Latch);
+Index: test/Transforms/LoopUnroll/X86/mmx.ll
+===================================================================
+--- test/Transforms/LoopUnroll/X86/mmx.ll
++++ test/Transforms/LoopUnroll/X86/mmx.ll
+@@ -0,0 +1,21 @@
++; RUN: opt < %s -S -loop-unroll | FileCheck %s
++target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
++target triple = "x86_64-unknown-linux-gnu"
++
++define x86_mmx @f() #0 {
++entry:
++ br label %for.body
++
++for.body: ; preds = %for.body, %entry
++ %phi = phi i32 [ 1, %entry ], [ %add, %for.body ]
++ %add = add i32 %phi, 1
++ %cmp = icmp eq i32 %phi, 0
++ br i1 %cmp, label %exit, label %for.body
++
++exit: ; preds = %for.body
++ %ret = phi x86_mmx [ undef, %for.body ]
++ ; CHECK: ret x86_mmx %ret
++ ret x86_mmx %ret
++}
++
++attributes #0 = { "target-cpu"="x86-64" }
+Index: test/Transforms/SCCP/crash.ll
+===================================================================
+--- test/Transforms/SCCP/crash.ll
++++ test/Transforms/SCCP/crash.ll
+@@ -27,3 +27,8 @@
+ %B = extractvalue [4 x i32] %A, 1
+ ret i32 %B
+ }
++
++define x86_mmx @test3() {
++ %load = load x86_mmx* null
++ ret x86_mmx %load
++}
diff --git a/contrib/pf/pflogd/pflogd.8 b/contrib/pf/pflogd/pflogd.8
index 38c954c9ccfa..d730a6b060e3 100644
--- a/contrib/pf/pflogd/pflogd.8
+++ b/contrib/pf/pflogd/pflogd.8
@@ -125,9 +125,11 @@ By default,
.Nm
will use
.Ar pflog0 .
+.It Fl p Ar pidfile
Writes a file containing the process ID of the program to
.Pa /var/run .
The file name has the form
+.Ao Ar pidfile Ac Ns .pid .
The default is
.Ar pflogd .
.It Fl s Ar snaplen
diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c
index c8ca0bf5a4b3..aca877c5c3f9 100644
--- a/contrib/tcpdump/tcpdump.c
+++ b/contrib/tcpdump/tcpdump.c
@@ -82,7 +82,7 @@ extern int SIZE_BUF;
#include <libcapsicum.h>
#include <libcapsicum_dns.h>
#include <libcapsicum_service.h>
-#include <nv.h>
+#include <sys/nv.h>
#include <sys/capability.h>
#include <sys/ioccom.h>
#include <net/bpf.h>