svn commit: r292737 - in projects/cxl_iscsi: . contrib/bmake contrib/bmake/mk contrib/llvm/include/llvm-c contrib/llvm/include/llvm/CodeGen contrib/llvm/lib/CodeGen/AsmPrinter contrib/llvm/lib/Code...

Navdeep Parhar np at FreeBSD.org
Sat Dec 26 00:31:24 UTC 2015


Author: np
Date: Sat Dec 26 00:31:19 2015
New Revision: 292737
URL: https://svnweb.freebsd.org/changeset/base/292737

Log:
  Last catchup with head.

Added:
  projects/cxl_iscsi/contrib/llvm/patches/patch-08-clang-cc1as-dwarf2.diff
     - copied unchanged from r292736, head/contrib/llvm/patches/patch-08-clang-cc1as-dwarf2.diff
Deleted:
  projects/cxl_iscsi/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff
  projects/cxl_iscsi/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff
  projects/cxl_iscsi/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff
Modified:
  projects/cxl_iscsi/ObsoleteFiles.inc
  projects/cxl_iscsi/contrib/bmake/ChangeLog
  projects/cxl_iscsi/contrib/bmake/Makefile
  projects/cxl_iscsi/contrib/bmake/mk/ChangeLog
  projects/cxl_iscsi/contrib/bmake/mk/auto.obj.mk
  projects/cxl_iscsi/contrib/bmake/mk/install-mk
  projects/cxl_iscsi/contrib/bmake/os.sh
  projects/cxl_iscsi/contrib/bmake/suff.c
  projects/cxl_iscsi/contrib/llvm/include/llvm-c/Core.h
  projects/cxl_iscsi/contrib/llvm/include/llvm/CodeGen/CommandFlags.h
  projects/cxl_iscsi/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
  projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  projects/cxl_iscsi/contrib/llvm/lib/IR/AsmWriter.cpp
  projects/cxl_iscsi/contrib/llvm/lib/IR/Core.cpp
  projects/cxl_iscsi/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp
  projects/cxl_iscsi/contrib/llvm/lib/MC/MCContext.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIPrepareScratchRegs.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h
  projects/cxl_iscsi/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td
  projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFRegisterInfo.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/Mips/MipsISelLowering.h
  projects/cxl_iscsi/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCInstrQPX.td
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCInstrVSX.td
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp   (contents, props changed)
  projects/cxl_iscsi/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Transforms/Scalar/GVN.cpp
  projects/cxl_iscsi/contrib/llvm/lib/Transforms/Utils/Local.cpp
  projects/cxl_iscsi/contrib/llvm/patches/README.TXT
  projects/cxl_iscsi/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  projects/cxl_iscsi/contrib/llvm/tools/clang/lib/Basic/Version.cpp
  projects/cxl_iscsi/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp
  projects/cxl_iscsi/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
  projects/cxl_iscsi/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
  projects/cxl_iscsi/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp
  projects/cxl_iscsi/contrib/llvm/tools/llvm-lto/llvm-lto.cpp
  projects/cxl_iscsi/etc/mtree/BSD.debug.dist
  projects/cxl_iscsi/etc/mtree/BSD.usr.dist
  projects/cxl_iscsi/lib/clang/include/Makefile
  projects/cxl_iscsi/lib/clang/include/clang/Basic/Version.inc
  projects/cxl_iscsi/lib/clang/include/clang/Config/config.h
  projects/cxl_iscsi/lib/clang/include/llvm/Config/config.h
  projects/cxl_iscsi/lib/clang/include/llvm/Config/llvm-config.h
  projects/cxl_iscsi/lib/libc/Makefile
  projects/cxl_iscsi/lib/libc/net/gethostbynis.c
  projects/cxl_iscsi/lib/libc/net/netdb_private.h
  projects/cxl_iscsi/lib/libclang_rt/Makefile.inc
  projects/cxl_iscsi/share/mk/bsd.lib.mk
  projects/cxl_iscsi/share/mk/sys.mk
  projects/cxl_iscsi/sys/arm/arm/pmap-v6-new.c
  projects/cxl_iscsi/sys/dev/isci/scil/scic_sds_phy.h
  projects/cxl_iscsi/sys/dev/isp/isp.c
  projects/cxl_iscsi/sys/dev/isp/isp_freebsd.c
  projects/cxl_iscsi/sys/dev/isp/isp_library.c
  projects/cxl_iscsi/sys/dev/isp/isp_library.h
  projects/cxl_iscsi/sys/dev/isp/isp_pci.c
  projects/cxl_iscsi/sys/dev/isp/isp_target.c
  projects/cxl_iscsi/sys/dev/isp/ispvar.h
  projects/cxl_iscsi/sys/dev/netmap/netmap.c
  projects/cxl_iscsi/sys/mips/cavium/cvmx_config.h
  projects/cxl_iscsi/sys/netinet/if_ether.c
  projects/cxl_iscsi/sys/netinet/sctp_output.c
  projects/cxl_iscsi/tools/build/mk/OptionalObsoleteFiles.inc
  projects/cxl_iscsi/usr.bin/bmake/Makefile
Directory Properties:
  projects/cxl_iscsi/   (props changed)
  projects/cxl_iscsi/contrib/bmake/   (props changed)
  projects/cxl_iscsi/contrib/llvm/   (props changed)
  projects/cxl_iscsi/contrib/llvm/tools/clang/   (props changed)
  projects/cxl_iscsi/contrib/llvm/tools/llvm-dwarfdump/   (props changed)
  projects/cxl_iscsi/contrib/llvm/tools/llvm-lto/   (props changed)
  projects/cxl_iscsi/lib/libc/   (props changed)
  projects/cxl_iscsi/share/   (props changed)
  projects/cxl_iscsi/sys/   (props changed)

Modified: projects/cxl_iscsi/ObsoleteFiles.inc
==============================================================================
--- projects/cxl_iscsi/ObsoleteFiles.inc	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/ObsoleteFiles.inc	Sat Dec 26 00:31:19 2015	(r292737)
@@ -38,6 +38,88 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20151225: new clang import which bumps version from 3.7.0 to 3.7.1.
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/coverage_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/lsan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/msan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h
+OLD_DIRS+=usr/lib/clang/3.7.0/include/sanitizer
+OLD_FILES+=usr/lib/clang/3.7.0/include/__stddef_max_align_t.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_aes.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_pclmul.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/adxintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/altivec.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/ammintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/arm_acle.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/arm_neon.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx2intrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512bwintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512cdintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512dqintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512erintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512fintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vlbwintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vldqintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avx512vlintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/avxintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/bmi2intrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/bmiintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/cpuid.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/cuda_builtin_vars.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/emmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/f16cintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/fma4intrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/fmaintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/fxsrintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/htmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/htmxlintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/ia32intrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/immintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/lzcntintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/mm3dnow.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/mm_malloc.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/mmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/module.modulemap
+OLD_FILES+=usr/lib/clang/3.7.0/include/nmmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/pmmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/popcntintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/prfchwintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/rdseedintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/rtmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/s390intrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/shaintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/smmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/tbmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/tmmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/vadefs.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/vecintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/wmmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/x86intrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/xmmintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/xopintrin.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/xtestintrin.h
+OLD_DIRS+=usr/lib/clang/3.7.0/include
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-x86_64.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-arm.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.profile-x86_64.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.safestack-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.safestack-x86_64.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a
+OLD_DIRS+=usr/lib/clang/3.7.0/lib/freebsd
+OLD_DIRS+=usr/lib/clang/3.7.0/lib
+OLD_DIRS+=usr/lib/clang/3.7.0
 # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406)
 OLD_LIBS+=usr/lib/libelf.so.2
 # 20151115: Fox bad upgrade scheme

Modified: projects/cxl_iscsi/contrib/bmake/ChangeLog
==============================================================================
--- projects/cxl_iscsi/contrib/bmake/ChangeLog	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/bmake/ChangeLog	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1,3 +1,9 @@
+2015-12-20  Simon J. Gerraty  <sjg at bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20151220
+	  Merge with NetBSD make, pick up
+	  o suff.c: re-initialize suffNull when clearing suffixes.
+
 2015-12-01  Simon J. Gerraty  <sjg at bad.crufty.net>
 
 	* Makefile (MAKE_VERSION): 20151201

Modified: projects/cxl_iscsi/contrib/bmake/Makefile
==============================================================================
--- projects/cxl_iscsi/contrib/bmake/Makefile	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/bmake/Makefile	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1,7 +1,7 @@
-#	$Id: Makefile,v 1.48 2015/12/02 00:36:42 sjg Exp $
+#	$Id: Makefile,v 1.49 2015/12/20 22:54:40 sjg Exp $
 
 # Base version on src date
-MAKE_VERSION= 20151201
+MAKE_VERSION= 20151220
 
 PROG=	bmake
 

Modified: projects/cxl_iscsi/contrib/bmake/mk/ChangeLog
==============================================================================
--- projects/cxl_iscsi/contrib/bmake/mk/ChangeLog	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/bmake/mk/ChangeLog	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1,3 +1,9 @@
+2015-12-12  Simon J. Gerraty  <sjg at bad.crufty.net>
+
+	* install-mk (MK_VERSION): 20151212
+	* auto.obj.mk: do not require MAKEOBJDIRPREFIX to exist.
+	  only apply :tA to __objdir when comparing to .OBJDIR
+
 2015-11-14  Simon J. Gerraty  <sjg at bad.crufty.net>
 
 	* install-mk (MK_VERSION): 20151111

Modified: projects/cxl_iscsi/contrib/bmake/mk/auto.obj.mk
==============================================================================
--- projects/cxl_iscsi/contrib/bmake/mk/auto.obj.mk	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/bmake/mk/auto.obj.mk	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1,4 +1,4 @@
-# $Id: auto.obj.mk,v 1.11 2015/06/16 06:28:21 sjg Exp $
+# $Id: auto.obj.mk,v 1.12 2015/12/16 01:57:06 sjg Exp $
 #
 #	@(#) Copyright (c) 2004, Simon J. Gerraty
 #
@@ -40,12 +40,12 @@ MKOBJDIRS= auto
 .if !defined(NOOBJ) && !defined(NO_OBJ) && ${MKOBJDIRS:Uno} == auto
 # Use __objdir here so it is easier to tweak without impacting
 # the logic.
-.if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX})
+.if !empty(MAKEOBJDIRPREFIX)
 __objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR}
 .endif
 __objdir?= ${MAKEOBJDIR:Uobj}
-__objdir:= ${__objdir:tA}
-.if ${.OBJDIR} != ${__objdir}
+__objdir:= ${__objdir}
+.if ${.OBJDIR:tA} != ${__objdir:tA}
 # We need to chdir, make the directory if needed
 .if !exists(${__objdir}/) && \
 	(${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "")
@@ -53,11 +53,10 @@ __objdir:= ${__objdir:tA}
 __objdir_made != echo ${__objdir}/; umask ${OBJDIR_UMASK:U002}; \
         ${ECHO_TRACE} "[Creating objdir ${__objdir}...]" >&2; \
         ${Mkdirs}; Mkdirs ${__objdir}
-__objdir:= ${__objdir:tA}
 .endif
 # This causes make to use the specified directory as .OBJDIR
 .OBJDIR: ${__objdir}
-.if ${.OBJDIR} != ${__objdir} && ${__objdir_made:Uno:M${__objdir}/*} != ""
+.if ${.OBJDIR:tA} != ${__objdir:tA} && ${__objdir_made:Uno:M${__objdir}/*} != ""
 .error could not use ${__objdir}: .OBJDIR=${.OBJDIR}
 .endif
 .endif

Modified: projects/cxl_iscsi/contrib/bmake/mk/install-mk
==============================================================================
--- projects/cxl_iscsi/contrib/bmake/mk/install-mk	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/bmake/mk/install-mk	Sat Dec 26 00:31:19 2015	(r292737)
@@ -55,7 +55,7 @@
 #       Simon J. Gerraty <sjg at crufty.net>
 
 # RCSid:
-#	$Id: install-mk,v 1.117 2015/11/14 18:09:57 sjg Exp $
+#	$Id: install-mk,v 1.118 2015/12/16 01:57:06 sjg Exp $
 #
 #	@(#) Copyright (c) 1994 Simon J. Gerraty
 #
@@ -70,7 +70,7 @@
 #	sjg at crufty.net
 #
 
-MK_VERSION=20151111
+MK_VERSION=20151212
 OWNER=
 GROUP=
 MODE=444

Modified: projects/cxl_iscsi/contrib/bmake/os.sh
==============================================================================
--- projects/cxl_iscsi/contrib/bmake/os.sh	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/bmake/os.sh	Sat Dec 26 00:31:19 2015	(r292737)
@@ -17,7 +17,7 @@
 #	Simon J. Gerraty <sjg at crufty.net>
 
 # RCSid:
-#	$Id: os.sh,v 1.49 2015/10/25 00:05:40 sjg Exp $
+#	$Id: os.sh,v 1.50 2015/12/17 17:06:29 sjg Exp $
 #
 #	@(#) Copyright (c) 1994 Simon J. Gerraty
 #
@@ -56,10 +56,10 @@ Which() {
 	case "$1" in
 	/*)	test $t $1 && echo $1;;
 	*)
-        	# some shells cannot correctly handle `IFS`
-        	# in conjunction with the for loop.
-        	_dirs=`IFS=:; echo ${2:-$PATH}`
-        	for d in $_dirs
+		# some shells cannot correctly handle `IFS`
+		# in conjunction with the for loop.
+		_dirs=`IFS=:; echo ${2:-$PATH}`
+		for d in $_dirs
 		do
 			test $t $d/$1 && { echo $d/$1; break; }
 		done
@@ -70,11 +70,11 @@ Which() {
 # tr is insanely non-portable wrt char classes, so we need to
 # spell out the alphabet. sed y/// would work too.
 toUpper() {
-        ${TR:-tr} abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
+	${TR:-tr} abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
 }
 
 toLower() {
-        ${TR:-tr} ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
+	${TR:-tr} ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
 }
 
 K=
@@ -91,7 +91,7 @@ SunOS)
 	export CHOWN
 	
 	# Great! Solaris keeps moving arch(1)
-        # should just bite the bullet and use uname -p
+	# should just bite the bullet and use uname -p
 	arch=`Which arch /usr/bin:/usr/ucb`
 	
 	MAILER=/usr/ucb/Mail
@@ -105,8 +105,8 @@ SunOS)
 		MACHINE=$MACHINE_ARCH
 		;;
 	4*)
-                MACHINE_ARCH=`arch`
-                ;;
+		MACHINE_ARCH=`arch`
+		;;
 	5*)
 		K=-k
 		LOCAL_FS=ufs
@@ -116,8 +116,8 @@ SunOS)
 		# overwriting an existing file!!!!! We want one that works!
 		test -x /usr/xpg4/bin/ln && LN=${LN:-/usr/xpg4/bin/ln}
 		# wonderful, 5.8's tr again require's []'s
-                # but /usr/xpg4/bin/tr causes problems if LC_COLLATE is set!
-                # use toUpper/toLower instead.
+		# but /usr/xpg4/bin/tr causes problems if LC_COLLATE is set!
+		# use toUpper/toLower instead.
 		;;
 	esac
 	case "$OS/$MACHINE_ARCH" in
@@ -142,9 +142,9 @@ SunOS)
 		SHARE_ARCH=$OS/$HOST
 		;;
 	OpenBSD)
-	        arch=`Which arch /usr/bin:/usr/ucb:$PATH`
-                MACHINE_ARCH=`$arch -s`
-                ;;
+		arch=`Which arch /usr/bin:/usr/ucb:$PATH`
+		MACHINE_ARCH=`$arch -s`
+		;;
 	esac
 	NAWK=awk
 	export NAWK
@@ -218,17 +218,25 @@ export HOST_TARGET
 
 case `echo -n .` in -n*) N=; C="\c";; *) N=-n; C=;; esac
 
-export HOSTNAME HOST        
+Echo() {
+	case "$1" in
+	-n) _n=$N _c=$C; shift;;
+	*) _n= _c=;;
+	esac
+	echo $_n "$@" $_c
+}
+
+export HOSTNAME HOST	    
 export OS MACHINE MACHINE_ARCH OSREL OSMAJOR LOCAL_FS TMP_DIRS MAILER N C K PS_AXC
 export LN SHARE_ARCH TR
 
 case /$0 in
 */os.sh)
-        for v in $*
+	for v in $*
 	do
-                eval vv=\$$v
-                echo "$v='$vv'"
+		eval vv=\$$v
+		echo "$v='$vv'"
 	done
-        ;;
+	;;
 esac
 

Modified: projects/cxl_iscsi/contrib/bmake/suff.c
==============================================================================
--- projects/cxl_iscsi/contrib/bmake/suff.c	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/bmake/suff.c	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.74 2015/10/11 04:51:24 sjg Exp $	*/
+/*	$NetBSD: suff.c,v 1.75 2015/12/20 22:44:10 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.74 2015/10/11 04:51:24 sjg Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.75 2015/12/20 22:44:10 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)suff.c	8.4 (Berkeley) 3/21/94";
 #else
-__RCSID("$NetBSD: suff.c,v 1.74 2015/10/11 04:51:24 sjg Exp $");
+__RCSID("$NetBSD: suff.c,v 1.75 2015/12/20 22:44:10 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -553,7 +553,20 @@ Suff_ClearSuffixes(void)
 #endif
     sufflist = Lst_Init(FALSE);
     sNum = 0;
-    suffNull = emptySuff;
+    if (suffNull)
+	SuffFree(suffNull);
+    emptySuff = suffNull = bmake_malloc(sizeof(Suff));
+
+    suffNull->name =   	    bmake_strdup("");
+    suffNull->nameLen =     0;
+    suffNull->searchPath =  Lst_Init(FALSE);
+    Dir_Concat(suffNull->searchPath, dirSearchPath);
+    suffNull->children =    Lst_Init(FALSE);
+    suffNull->parents =	    Lst_Init(FALSE);
+    suffNull->ref =	    Lst_Init(FALSE);
+    suffNull->sNum =   	    sNum++;
+    suffNull->flags =  	    SUFF_NULL;
+    suffNull->refCount =    1;
 }
 
 /*-
@@ -2524,32 +2537,18 @@ Suff_SetNull(char *name)
 void
 Suff_Init(void)
 {
-    sufflist = Lst_Init(FALSE);
 #ifdef CLEANUP
     suffClean = Lst_Init(FALSE);
 #endif
     srclist = Lst_Init(FALSE);
     transforms = Lst_Init(FALSE);
 
-    sNum = 0;
     /*
      * Create null suffix for single-suffix rules (POSIX). The thing doesn't
      * actually go on the suffix list or everyone will think that's its
      * suffix.
      */
-    emptySuff = suffNull = bmake_malloc(sizeof(Suff));
-
-    suffNull->name =   	    bmake_strdup("");
-    suffNull->nameLen =     0;
-    suffNull->searchPath =  Lst_Init(FALSE);
-    Dir_Concat(suffNull->searchPath, dirSearchPath);
-    suffNull->children =    Lst_Init(FALSE);
-    suffNull->parents =	    Lst_Init(FALSE);
-    suffNull->ref =	    Lst_Init(FALSE);
-    suffNull->sNum =   	    sNum++;
-    suffNull->flags =  	    SUFF_NULL;
-    suffNull->refCount =    1;
-
+    Suff_ClearSuffixes();
 }
 
 

Modified: projects/cxl_iscsi/contrib/llvm/include/llvm-c/Core.h
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/include/llvm-c/Core.h	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/include/llvm-c/Core.h	Sat Dec 26 00:31:19 2015	(r292737)
@@ -2675,7 +2675,8 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilder
                              LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
                              const char *Name);
 LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
-                                 unsigned NumClauses, const char *Name);
+                                 LLVMValueRef PersFn, unsigned NumClauses,
+                                 const char *Name);
 LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn);
 LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef);
 

Modified: projects/cxl_iscsi/contrib/llvm/include/llvm/CodeGen/CommandFlags.h
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/include/llvm/CodeGen/CommandFlags.h	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/include/llvm/CodeGen/CommandFlags.h	Sat Dec 26 00:31:19 2015	(r292737)
@@ -21,7 +21,7 @@
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/IR/Module.h"
 #include "llvm/MC/MCTargetOptionsCommandFlags.h"
-#include "llvm//MC/SubtargetFeature.h"
+#include "llvm/MC/SubtargetFeature.h"
 #include "llvm/Support/CodeGen.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Host.h"

Modified: projects/cxl_iscsi/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -169,7 +169,7 @@ void WinException::endFunction(const Mac
     Asm->OutStreamer->PopSection();
   }
 
-  if (shouldEmitMoves)
+  if (shouldEmitMoves || shouldEmitPersonality)
     Asm->OutStreamer->EmitWinCFIEndProc();
 }
 

Modified: projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -439,7 +439,7 @@ ExpandUnalignedLoad(LoadSDNode *LD, Sele
                              ISD::ANY_EXTEND, dl, VT, Result);
 
       ValResult = Result;
-      ChainResult = Chain;
+      ChainResult = newLoad.getValue(1);
       return;
     }
 

Modified: projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1010,6 +1010,8 @@ SDValue DAGTypeLegalizer::GetVectorEleme
 
   // Calculate the element offset and add it to the pointer.
   unsigned EltSize = EltVT.getSizeInBits() / 8; // FIXME: should be ABI size.
+  assert(EltSize * 8 == EltVT.getSizeInBits() &&
+         "Converting bits to bytes lost precision");
 
   Index = DAG.getNode(ISD::MUL, dl, Index.getValueType(), Index,
                       DAG.getConstant(EltSize, dl, Index.getValueType()));

Modified: projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1528,9 +1528,25 @@ SDValue DAGTypeLegalizer::SplitVecOp_EXT
   if (CustomLowerNode(N, N->getValueType(0), true))
     return SDValue();
 
-  // Store the vector to the stack.
-  EVT EltVT = VecVT.getVectorElementType();
+  // Make the vector elements byte-addressable if they aren't already.
   SDLoc dl(N);
+  EVT EltVT = VecVT.getVectorElementType();
+  if (EltVT.getSizeInBits() < 8) {
+    SmallVector<SDValue, 4> ElementOps;
+    for (unsigned i = 0; i < VecVT.getVectorNumElements(); ++i) {
+      ElementOps.push_back(DAG.getAnyExtOrTrunc(
+          DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, EltVT, Vec,
+                      DAG.getConstant(i, dl, MVT::i8)),
+          dl, MVT::i8));
+    }
+
+    EltVT = MVT::i8;
+    VecVT = EVT::getVectorVT(*DAG.getContext(), EltVT,
+                             VecVT.getVectorNumElements());
+    Vec = DAG.getNode(ISD::BUILD_VECTOR, dl, VecVT, ElementOps);
+  }
+
+  // Store the vector to the stack.
   SDValue StackPtr = DAG.CreateStackTemporary(VecVT);
   SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr,
                                MachinePointerInfo(), false, false, 0);

Modified: projects/cxl_iscsi/contrib/llvm/lib/IR/AsmWriter.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/IR/AsmWriter.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/IR/AsmWriter.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -794,6 +794,10 @@ void SlotTracker::processFunction() {
   ST_DEBUG("begin processFunction!\n");
   fNext = 0;
 
+  // Process function metadata if it wasn't hit at the module-level.
+  if (!ShouldInitializeAllMetadata)
+    processFunctionMetadata(*TheFunction);
+
   // Add all the function arguments with no names.
   for(Function::const_arg_iterator AI = TheFunction->arg_begin(),
       AE = TheFunction->arg_end(); AI != AE; ++AI)
@@ -807,8 +811,6 @@ void SlotTracker::processFunction() {
     if (!BB.hasName())
       CreateFunctionSlot(&BB);
 
-    processFunctionMetadata(*TheFunction);
-
     for (auto &I : BB) {
       if (!I.getType()->isVoidTy() && !I.hasName())
         CreateFunctionSlot(&I);
@@ -836,11 +838,11 @@ void SlotTracker::processFunction() {
 
 void SlotTracker::processFunctionMetadata(const Function &F) {
   SmallVector<std::pair<unsigned, MDNode *>, 4> MDs;
-  for (auto &BB : F) {
-    F.getAllMetadata(MDs);
-    for (auto &MD : MDs)
-      CreateMetadataSlot(MD.second);
+  F.getAllMetadata(MDs);
+  for (auto &MD : MDs)
+    CreateMetadataSlot(MD.second);
 
+  for (auto &BB : F) {
     for (auto &I : BB)
       processInstructionMetadata(I);
   }

Modified: projects/cxl_iscsi/contrib/llvm/lib/IR/Core.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/IR/Core.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/IR/Core.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -2257,7 +2257,14 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilder
 }
 
 LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
-                                 unsigned NumClauses, const char *Name) {
+                                 LLVMValueRef PersFn, unsigned NumClauses,
+                                 const char *Name) {
+  // The personality used to live on the landingpad instruction, but now it
+  // lives on the parent function. For compatibility, take the provided
+  // personality and put it on the parent function.
+  if (PersFn)
+    unwrap(B)->GetInsertBlock()->getParent()->setPersonalityFn(
+        cast<Function>(unwrap(PersFn)));
   return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), NumClauses, Name));
 }
 

Modified: projects/cxl_iscsi/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -63,14 +63,21 @@ const char* LTOCodeGenerator::getVersion
 #endif
 }
 
+static void handleLTODiagnostic(const DiagnosticInfo &DI) {
+  DiagnosticPrinterRawOStream DP(errs());
+  DI.print(DP);
+  errs() << "\n";
+}
+
 LTOCodeGenerator::LTOCodeGenerator()
-    : Context(getGlobalContext()), IRLinker(new Module("ld-temp.o", Context)) {
+    : Context(getGlobalContext()), IRLinker(new Module("ld-temp.o", Context),
+                                            handleLTODiagnostic) {
   initializeLTOPasses();
 }
 
 LTOCodeGenerator::LTOCodeGenerator(std::unique_ptr<LLVMContext> Context)
     : OwnedContext(std::move(Context)), Context(*OwnedContext),
-      IRLinker(new Module("ld-temp.o", *OwnedContext)) {
+      IRLinker(new Module("ld-temp.o", *OwnedContext), handleLTODiagnostic) {
   initializeLTOPasses();
 }
 

Modified: projects/cxl_iscsi/contrib/llvm/lib/MC/MCContext.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/MC/MCContext.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/MC/MCContext.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -82,6 +82,7 @@ void MCContext::reset() {
 
   UsedNames.clear();
   Symbols.clear();
+  SectionSymbols.clear();
   Allocator.Reset();
   Instances.clear();
   CompilationDir.clear();

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -264,6 +264,12 @@ void AMDGPUAsmPrinter::getSIProgramInfo(
   for (const MachineBasicBlock &MBB : MF) {
     for (const MachineInstr &MI : MBB) {
       // TODO: CodeSize should account for multiple functions.
+
+      // TODO: Should we count size of debug info?
+      if (MI.isDebugValue())
+        continue;
+
+      // FIXME: This is reporting 0 for many instructions.
       CodeSize += MI.getDesc().Size;
 
       unsigned numOperands = MI.getNumOperands();

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -134,13 +134,17 @@ static Value* GEPToVectorIndex(GetElemen
 //
 // TODO: Check isTriviallyVectorizable for calls and handle other
 // instructions.
-static bool canVectorizeInst(Instruction *Inst) {
+static bool canVectorizeInst(Instruction *Inst, User *User) {
   switch (Inst->getOpcode()) {
   case Instruction::Load:
-  case Instruction::Store:
   case Instruction::BitCast:
   case Instruction::AddrSpaceCast:
     return true;
+  case Instruction::Store: {
+    // Must be the stored pointer operand, not a stored value.
+    StoreInst *SI = cast<StoreInst>(Inst);
+    return SI->getPointerOperand() == User;
+  }
   default:
     return false;
   }
@@ -166,7 +170,7 @@ static bool tryPromoteAllocaToVector(All
   for (User *AllocaUser : Alloca->users()) {
     GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser);
     if (!GEP) {
-      if (!canVectorizeInst(cast<Instruction>(AllocaUser)))
+      if (!canVectorizeInst(cast<Instruction>(AllocaUser), Alloca))
         return false;
 
       WorkList.push_back(AllocaUser);
@@ -184,7 +188,7 @@ static bool tryPromoteAllocaToVector(All
 
     GEPVectorIdx[GEP] = Index;
     for (User *GEPUser : AllocaUser->users()) {
-      if (!canVectorizeInst(cast<Instruction>(GEPUser)))
+      if (!canVectorizeInst(cast<Instruction>(GEPUser), AllocaUser))
         return false;
 
       WorkList.push_back(GEPUser);
@@ -240,7 +244,12 @@ static bool collectUsesWithPtrTypes(Valu
   for (User *User : Val->users()) {
     if(std::find(WorkList.begin(), WorkList.end(), User) != WorkList.end())
       continue;
-    if (isa<CallInst>(User)) {
+    if (CallInst *CI = dyn_cast<CallInst>(User)) {
+      // TODO: We might be able to handle some cases where the callee is a
+      // constantexpr bitcast of a function.
+      if (!CI->getCalledFunction())
+        return false;
+
       WorkList.push_back(User);
       continue;
     }
@@ -250,6 +259,12 @@ static bool collectUsesWithPtrTypes(Valu
     if (UseInst && UseInst->getOpcode() == Instruction::PtrToInt)
       return false;
 
+    if (StoreInst *SI = dyn_cast_or_null<StoreInst>(UseInst)) {
+      // Reject if the stored value is not the pointer operand.
+      if (SI->getPointerOperand() != Val)
+        return false;
+    }
+
     if (!User->getType()->isPointerTy())
       continue;
 

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td	Sat Dec 26 00:31:19 2015	(r292737)
@@ -14,8 +14,7 @@
 let Namespace = "AMDGPU" in {
 
 foreach Index = 0-15 in {
-  // Indices are used in a variety of ways here, so don't set a size/offset.
-  def sub#Index : SubRegIndex<-1, -1>;
+  def sub#Index : SubRegIndex<32, !shl(Index, 5)>;
 }
 
 def INDIRECT_BASE_ADDR : Register <"INDIRECT_BASE_ADDR">;

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -71,12 +71,26 @@ void AMDGPUMCObjectWriter::writeObject(M
   }
 }
 
+static unsigned getFixupKindNumBytes(unsigned Kind) {
+  switch (Kind) {
+  case FK_Data_1:
+    return 1;
+  case FK_Data_2:
+    return 2;
+  case FK_Data_4:
+    return 4;
+  case FK_Data_8:
+    return 8;
+  default:
+    llvm_unreachable("Unknown fixup kind!");
+  }
+}
+
 void AMDGPUAsmBackend::applyFixup(const MCFixup &Fixup, char *Data,
                                   unsigned DataSize, uint64_t Value,
                                   bool IsPCRel) const {
 
   switch ((unsigned)Fixup.getKind()) {
-    default: llvm_unreachable("Unknown fixup kind");
     case AMDGPU::fixup_si_sopp_br: {
       uint16_t *Dst = (uint16_t*)(Data + Fixup.getOffset());
       *Dst = (Value - 4) / 4;
@@ -96,6 +110,24 @@ void AMDGPUAsmBackend::applyFixup(const 
       *Dst = Value + 4;
       break;
     }
+    default: {
+      // FIXME: Copied from AArch64
+      unsigned NumBytes = getFixupKindNumBytes(Fixup.getKind());
+      if (!Value)
+        return; // Doesn't change encoding.
+      MCFixupKindInfo Info = getFixupKindInfo(Fixup.getKind());
+
+      // Shift the value into position.
+      Value <<= Info.TargetOffset;
+
+      unsigned Offset = Fixup.getOffset();
+      assert(Offset + NumBytes <= DataSize && "Invalid fixup offset!");
+
+      // For each byte of the fragment that the fixup touches, mask in the
+      // bits from the fixup value.
+      for (unsigned i = 0; i != NumBytes; ++i)
+        Data[Offset + i] |= uint8_t((Value >> (i * 8)) & 0xff);
+    }
   }
 }
 

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -157,6 +157,7 @@ SITargetLowering::SITargetLowering(Targe
 
   setTruncStoreAction(MVT::i64, MVT::i32, Expand);
   setTruncStoreAction(MVT::v8i32, MVT::v8i16, Expand);
+  setTruncStoreAction(MVT::v16i32, MVT::v16i8, Expand);
   setTruncStoreAction(MVT::v16i32, MVT::v16i16, Expand);
 
   setOperationAction(ISD::LOAD, MVT::i1, Custom);
@@ -2252,10 +2253,8 @@ MachineSDNode *SITargetLowering::buildSc
                                                   SDValue Ptr) const {
   const SIInstrInfo *TII =
       static_cast<const SIInstrInfo *>(Subtarget->getInstrInfo());
-  uint64_t Rsrc = TII->getDefaultRsrcDataFormat() | AMDGPU::RSRC_TID_ENABLE |
-                  0xffffffff; // Size
 
-  return buildRSRC(DAG, DL, Ptr, 0, Rsrc);
+  return buildRSRC(DAG, DL, Ptr, 0, TII->getScratchRsrcWords23());
 }
 
 SDValue SITargetLowering::CreateLiveInRegister(SelectionDAG &DAG,

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -2778,3 +2778,16 @@ uint64_t SIInstrInfo::getDefaultRsrcData
 
   return RsrcDataFormat;
 }
+
+uint64_t SIInstrInfo::getScratchRsrcWords23() const {
+  uint64_t Rsrc23 = getDefaultRsrcDataFormat() |
+                    AMDGPU::RSRC_TID_ENABLE |
+                    0xffffffff; // Size;
+
+  // If TID_ENABLE is set, DATA_FORMAT specifies stride bits [14:17].
+  // Clear them unless we want a huge stride.
+  if (ST.getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
+    Rsrc23 &= ~AMDGPU::RSRC_DATA_FORMAT;
+
+  return Rsrc23;
+}

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h	Sat Dec 26 00:31:19 2015	(r292737)
@@ -353,7 +353,7 @@ public:
   }
 
   uint64_t getDefaultRsrcDataFormat() const;
-
+  uint64_t getScratchRsrcWords23() const;
 };
 
 namespace AMDGPU {

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td	Sat Dec 26 00:31:19 2015	(r292737)
@@ -1548,6 +1548,12 @@ defm V_WRITELANE_B32 : VOP2SI_3VI_m <
 // These instructions only exist on SI and CI
 let SubtargetPredicate = isSICI in {
 
+let isCommutable = 1 in {
+defm V_MAC_LEGACY_F32 : VOP2InstSI <vop2<0x6>, "v_mac_legacy_f32",
+  VOP_F32_F32_F32
+>;
+} // End isCommutable = 1
+
 defm V_MIN_LEGACY_F32 : VOP2InstSI <vop2<0xd>, "v_min_legacy_f32",
   VOP_F32_F32_F32, AMDGPUfmin_legacy
 >;
@@ -1562,12 +1568,6 @@ defm V_LSHL_B32 : VOP2InstSI <vop2<0x19>
 } // End isCommutable = 1
 } // End let SubtargetPredicate = SICI
 
-let isCommutable = 1 in {
-defm V_MAC_LEGACY_F32 : VOP2_VI3_Inst <vop23<0x6, 0x28e>, "v_mac_legacy_f32",
-  VOP_F32_F32_F32
->;
-} // End isCommutable = 1
-
 defm V_BFM_B32 : VOP2_VI3_Inst <vop23<0x1e, 0x293>, "v_bfm_b32",
   VOP_I32_I32_I32
 >;

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIPrepareScratchRegs.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIPrepareScratchRegs.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIPrepareScratchRegs.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -135,8 +135,7 @@ bool SIPrepareScratchRegs::runOnMachineF
       unsigned ScratchRsrcReg =
           RS.scavengeRegister(&AMDGPU::SReg_128RegClass, 0);
 
-      uint64_t Rsrc = AMDGPU::RSRC_DATA_FORMAT | AMDGPU::RSRC_TID_ENABLE |
-                      0xffffffff; // Size
+      uint64_t Rsrc23 = TII->getScratchRsrcWords23();
 
       unsigned Rsrc0 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub0);
       unsigned Rsrc1 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub1);
@@ -152,11 +151,11 @@ bool SIPrepareScratchRegs::runOnMachineF
               .addReg(ScratchRsrcReg, RegState::ImplicitDefine);
 
       BuildMI(MBB, I, DL, TII->get(AMDGPU::S_MOV_B32), Rsrc2)
-              .addImm(Rsrc & 0xffffffff)
+              .addImm(Rsrc23 & 0xffffffff)
               .addReg(ScratchRsrcReg, RegState::ImplicitDefine);
 
       BuildMI(MBB, I, DL, TII->get(AMDGPU::S_MOV_B32), Rsrc3)
-              .addImm(Rsrc >> 32)
+              .addImm(Rsrc23 >> 32)
               .addReg(ScratchRsrcReg, RegState::ImplicitDefine);
 
       // Scratch Offset

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -26,23 +26,25 @@ using namespace llvm;
 
 SIRegisterInfo::SIRegisterInfo() : AMDGPURegisterInfo() {}
 
-BitVector SIRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
-  BitVector Reserved(getNumRegs());
-  Reserved.set(AMDGPU::EXEC);
+void SIRegisterInfo::reserveRegisterTuples(BitVector &Reserved, unsigned Reg) const {
+  MCRegAliasIterator R(Reg, this, true);
 
-  // EXEC_LO and EXEC_HI could be allocated and used as regular register,
-  // but this seems likely to result in bugs, so I'm marking them as reserved.
-  Reserved.set(AMDGPU::EXEC_LO);
-  Reserved.set(AMDGPU::EXEC_HI);
+  for (; R.isValid(); ++R)
+    Reserved.set(*R);
+}
 
+BitVector SIRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
+  BitVector Reserved(getNumRegs());
   Reserved.set(AMDGPU::INDIRECT_BASE_ADDR);
-  Reserved.set(AMDGPU::FLAT_SCR);
-  Reserved.set(AMDGPU::FLAT_SCR_LO);
-  Reserved.set(AMDGPU::FLAT_SCR_HI);
+
+  // EXEC_LO and EXEC_HI could be allocated and used as regular register, but
+  // this seems likely to result in bugs, so I'm marking them as reserved.
+  reserveRegisterTuples(Reserved, AMDGPU::EXEC);
+  reserveRegisterTuples(Reserved, AMDGPU::FLAT_SCR);
 
   // Reserve some VGPRs to use as temp registers in case we have to spill VGPRs
-  Reserved.set(AMDGPU::VGPR255);
-  Reserved.set(AMDGPU::VGPR254);
+  reserveRegisterTuples(Reserved, AMDGPU::VGPR254);
+  reserveRegisterTuples(Reserved, AMDGPU::VGPR255);
 
   // Tonga and Iceland can only allocate a fixed number of SGPRs due
   // to a hw bug.
@@ -54,10 +56,7 @@ BitVector SIRegisterInfo::getReservedReg
 
     for (unsigned i = Limit; i < NumSGPRs; ++i) {
       unsigned Reg = AMDGPU::SGPR_32RegClass.getRegister(i);
-      MCRegAliasIterator R = MCRegAliasIterator(Reg, this, true);
-
-      for (; R.isValid(); ++R)
-        Reserved.set(*R);
+      reserveRegisterTuples(Reserved, Reg);
     }
   }
 

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h	Sat Dec 26 00:31:19 2015	(r292737)
@@ -23,7 +23,10 @@
 namespace llvm {
 
 struct SIRegisterInfo : public AMDGPURegisterInfo {
+private:
+  void reserveRegisterTuples(BitVector &, unsigned Reg) const;
 
+public:
   SIRegisterInfo();
 
   BitVector getReservedRegs(const MachineFunction &MF) const override;

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -15,6 +15,7 @@
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/ADT/Triple.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCAssembler.h"
@@ -9104,6 +9105,10 @@ bool ARMAsmParser::parseDirectiveArch(SM
     return false;
   }
 
+  Triple T;
+  STI.setDefaultFeatures(T.getARMCPUForArch(Arch));
+  setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
+
   getTargetStreamer().emitArch(ID);
   return false;
 }

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -50,6 +50,7 @@ private:
 
   // Complex Pattern for address selection.
   bool SelectAddr(SDValue Addr, SDValue &Base, SDValue &Offset);
+  bool SelectFIAddr(SDValue Addr, SDValue &Base, SDValue &Offset);
 };
 }
 
@@ -67,7 +68,7 @@ bool BPFDAGToDAGISel::SelectAddr(SDValue
       Addr.getOpcode() == ISD::TargetGlobalAddress)
     return false;
 
-  // Addresses of the form FI+const or FI|const
+  // Addresses of the form Addr+const or Addr|const
   if (CurDAG->isBaseWithConstantOffset(Addr)) {
     ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand(1));
     if (isInt<32>(CN->getSExtValue())) {
@@ -89,6 +90,31 @@ bool BPFDAGToDAGISel::SelectAddr(SDValue
   return true;
 }
 
+// ComplexPattern used on BPF FI instruction
+bool BPFDAGToDAGISel::SelectFIAddr(SDValue Addr, SDValue &Base, SDValue &Offset) {
+  SDLoc DL(Addr);
+
+  if (!CurDAG->isBaseWithConstantOffset(Addr))
+    return false;
+
+  // Addresses of the form Addr+const or Addr|const
+  ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand(1));
+  if (isInt<32>(CN->getSExtValue())) {
+
+    // If the first operand is a FI, get the TargetFI Node
+    if (FrameIndexSDNode *FIN =
+            dyn_cast<FrameIndexSDNode>(Addr.getOperand(0)))
+      Base = CurDAG->getTargetFrameIndex(FIN->getIndex(), MVT::i64);
+    else
+      return false;
+
+    Offset = CurDAG->getTargetConstant(CN->getSExtValue(), DL, MVT::i64);
+    return true;
+  }
+
+  return false;
+}
+
 SDNode *BPFDAGToDAGISel::Select(SDNode *Node) {
   unsigned Opcode = Node->getOpcode();
 
@@ -104,13 +130,6 @@ SDNode *BPFDAGToDAGISel::Select(SDNode *
   // tablegen selection should be handled here.
   switch (Opcode) {
   default: break;
-
-  case ISD::UNDEF: {
-    errs() << "BUG: "; Node->dump(CurDAG); errs() << '\n';
-    report_fatal_error("shouldn't see UNDEF during Select");
-    break;
-  }
-
   case ISD::INTRINSIC_W_CHAIN: {
     unsigned IntNo = cast<ConstantSDNode>(Node->getOperand(1))->getZExtValue();
     switch (IntNo) {

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp	Sat Dec 26 00:31:19 2015	(r292737)
@@ -102,6 +102,7 @@ BPFTargetLowering::BPFTargetLowering(con
 
   setOperationAction(ISD::BR_CC, MVT::i64, Custom);
   setOperationAction(ISD::BR_JT, MVT::Other, Expand);
+  setOperationAction(ISD::BRIND, MVT::Other, Expand);
   setOperationAction(ISD::BRCOND, MVT::Other, Expand);
   setOperationAction(ISD::SETCC, MVT::i64, Expand);
   setOperationAction(ISD::SELECT, MVT::i64, Expand);
@@ -128,9 +129,6 @@ BPFTargetLowering::BPFTargetLowering(con
   setOperationAction(ISD::SUBC, MVT::i64, Expand);
   setOperationAction(ISD::SUBE, MVT::i64, Expand);
 
-  // no UNDEF allowed
-  setOperationAction(ISD::UNDEF, MVT::i64, Expand);
-
   setOperationAction(ISD::ROTR, MVT::i64, Expand);
   setOperationAction(ISD::ROTL, MVT::i64, Expand);
   setOperationAction(ISD::SHL_PARTS, MVT::i64, Expand);

Modified: projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td
==============================================================================
--- projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td	Sat Dec 26 00:26:02 2015	(r292736)
+++ projects/cxl_iscsi/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td	Sat Dec 26 00:31:19 2015	(r292737)
@@ -54,7 +54,8 @@ def i64immSExt32 : PatLeaf<(imm),
                 [{return isInt<32>(N->getSExtValue()); }]>;
 
 // Addressing modes.
-def ADDRri : ComplexPattern<i64, 2, "SelectAddr", [frameindex], []>;
+def ADDRri : ComplexPattern<i64, 2, "SelectAddr", [], []>;
+def FIri : ComplexPattern<i64, 2, "SelectFIAddr", [add, or], []>;
 
 // Address operands
 def MEMri : Operand<i64> {
@@ -260,6 +261,15 @@ def MOV_rr : MOV_RR<"mov">;
 def MOV_ri : MOV_RI<"mov">;
 }
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list