svn commit: r368489 - head/contrib/llvm-project/clang/lib/Basic/Targets

2020-12-09 Thread Dimitry Andric
Author: dim
Date: Wed Dec  9 18:37:43 2020
New Revision: 368489
URL: https://svnweb.freebsd.org/changeset/base/368489

Log:
  Merge commit 28de0fb48 from llvm git (by Luís Marques):
  
[RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines
  
The RISCV target did not set the GCC atomic compare and swap defines,
unlike other targets. This broke builds for things like glib on
RISCV.
  
Patch by Kristof Provost (kprovost)
  
Differential Revision: https://reviews.llvm.org/D91784
  
  This should fix building glib20 on RISC-V and unblock a number of
  dependent ports.
  
  Requested by: kp
  MFC after:3 days

Modified:
  head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp

Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
==
--- head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Wed Dec  9 
17:17:45 2020(r368488)
+++ head/contrib/llvm-project/clang/lib/Basic/Targets/RISCV.cpp Wed Dec  9 
18:37:43 2020(r368489)
@@ -115,8 +115,14 @@ void RISCVTargetInfo::getTargetDefines(const LangOptio
 Builder.defineMacro("__riscv_muldiv");
   }
 
-  if (HasA)
+  if (HasA) {
 Builder.defineMacro("__riscv_atomic");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
+Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
+if (Is64Bit)
+  Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+  }
 
   if (HasF || HasD) {
 Builder.defineMacro("__riscv_flen", HasD ? "64" : "32");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368309 - head/contrib/llvm-project/llvm/lib/Support/Unix

2020-12-03 Thread Dimitry Andric
Author: dim
Date: Thu Dec  3 19:29:18 2020
New Revision: 368309
URL: https://svnweb.freebsd.org/changeset/base/368309

Log:
  Merge commit d989ffd10 from llvm git (by Dimitry Andric):
  
Implement computeHostNumHardwareThreads() for FreeBSD
  
This retrieves CPU affinity via FreeBSD's cpuset(2) API, and makes
LLVM respect affinity settings configured by the user via the
cpuset(1) command.
  
In particular, this allows to reduce the number of threads used on
machines with high core counts, which can interact badly with
parallelized build systems. This is particularly noticable with lld,
which spawns lots of threads even for linking e.g. hello_world!
  
This fix is related to PR48193, but does not adress the more
fundamental problem, which is that LLVM by default grabs as many CPUs
and/or threads as possible.
  
Reviewed By: MaskRay
  
Differential Revision: https://reviews.llvm.org/D92271
  
  Originally by:mjg
  MFC after:1 week

Modified:
  head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc

Modified: head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
==
--- head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 19:26:21 2020(r368308)
+++ head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 19:29:18 2020(r368309)
@@ -28,6 +28,7 @@
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -282,7 +283,13 @@ SetThreadPriorityResult llvm::set_thread_priority(Thre
 #include 
 
 int computeHostNumHardwareThreads() {
-#ifdef __linux__
+#if defined(__FreeBSD__)
+  cpuset_t mask;
+  CPU_ZERO();
+  if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(mask),
+ ) == 0)
+return CPU_COUNT();
+#elif defined(__linux__)
   cpu_set_t Set;
   if (sched_getaffinity(0, sizeof(Set), ) == 0)
 return CPU_COUNT();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368308 - head/contrib/llvm-project/llvm/lib/Support/Unix

2020-12-03 Thread Dimitry Andric
Author: dim
Date: Thu Dec  3 19:26:21 2020
New Revision: 368308
URL: https://svnweb.freebsd.org/changeset/base/368308

Log:
  Revert r367815, so we can apply the slightly different version that
  landed upstream:
  
  For llvm's internal function which retrieves the number of available
  "hardware threads", use cpuset_getaffinity(2) on FreeBSD, so it will
  honor processor sets configured by the cpuset(1) command.
  
  This should make it possible to avoid e.g. lld creating a huge number of
  threads on a machine with many cores, even for linking simple programs.
  
  This will also be submitted upstream.
  
  Submitted by: mjg

Modified:
  head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc

Modified: head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
==
--- head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 17:12:31 2020(r368307)
+++ head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Thu Dec 
 3 19:26:21 2020(r368308)
@@ -26,10 +26,6 @@
 #include  // For pthread_getthreadid_np() / pthread_set_name_np()
 #endif
 
-#if defined(__FreeBSD__)
-#include 
-#endif
-
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include 
 #include 
@@ -286,13 +282,6 @@ SetThreadPriorityResult llvm::set_thread_priority(Thre
 #include 
 
 int computeHostNumHardwareThreads() {
-#ifdef __FreeBSD__
-  cpuset_t mask;
-  CPU_ZERO();
-  if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(mask),
- ) == 0)
-return CPU_COUNT();
-#endif
 #ifdef __linux__
   cpu_set_t Set;
   if (sched_getaffinity(0, sizeof(Set), ) == 0)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r368192 - head

2020-11-30 Thread Dimitry Andric
Author: dim
Date: Mon Nov 30 19:18:50 2020
New Revision: 368192
URL: https://svnweb.freebsd.org/changeset/base/368192

Log:
  Add a few missed entries to ObsoleteFiles.inc:
  
  * libzfs.so was bumped from 3 to 4 in r364746
  * libcap_random.so.1 was removed in r350307, but its .so symlink was not

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon Nov 30 17:03:26 2020(r368191)
+++ head/ObsoleteFiles.inc  Mon Nov 30 19:18:50 2020(r368192)
@@ -117,6 +117,10 @@ OLD_FILES+=boot/lua/logo-fbsdbw.lua
 OLD_FILES+=boot/lua/logo-orb.lua
 OLD_FILES+=boot/lua/logo-orbbw.lua
 
+# 20200825: merged OpenZFS support
+OLD_LIBS+=lib/libzfs.so.3
+OLD_LIBS+=usr/lib32/libzfs.so.3
+
 # 20200923: memfd_test moved to /usr/tests/sys/posixshm
 OLD_FILES+=usr/tests/sys/kern/memfd_test
 
@@ -2366,6 +2370,7 @@ OLD_FILES+=usr/include/sys/inflate.h
 # 20190722: cap_random(3) removed
 OLD_LIBS+=lib/casper/libcap_random.so.1
 OLD_FILES+=usr/include/casper/cap_random.h
+OLD_LIBS+=usr/lib/casper/libcap_random.so
 OLD_FILES+=usr/share/man/man3/cap_random.3.gz
 OLD_FILES+=usr/share/man/man3/cap_random_buf.3.gz
 # 20190708: vm_page_hold() and _unhold() removed
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r367815 - head/contrib/llvm-project/llvm/lib/Support/Unix

2020-11-18 Thread Dimitry Andric
Author: dim
Date: Wed Nov 18 19:55:24 2020
New Revision: 367815
URL: https://svnweb.freebsd.org/changeset/base/367815

Log:
  For llvm's internal function which retrieves the number of available
  "hardware threads", use cpuset_getaffinity(2) on FreeBSD, so it will
  honor processor sets configured by the cpuset(1) command.
  
  This should make it possible to avoid e.g. lld creating a huge number of
  threads on a machine with many cores, even for linking simple programs.
  
  This will also be submitted upstream.
  
  Submitted by: mjg
  MFC after:1 week

Modified:
  head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc

Modified: head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
==
--- head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Wed Nov 
18 19:47:24 2020(r367814)
+++ head/contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc   Wed Nov 
18 19:55:24 2020(r367815)
@@ -26,6 +26,10 @@
 #include  // For pthread_getthreadid_np() / pthread_set_name_np()
 #endif
 
+#if defined(__FreeBSD__)
+#include 
+#endif
+
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include 
 #include 
@@ -282,6 +286,13 @@ SetThreadPriorityResult llvm::set_thread_priority(Thre
 #include 
 
 int computeHostNumHardwareThreads() {
+#ifdef __FreeBSD__
+  cpuset_t mask;
+  CPU_ZERO();
+  if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(mask),
+ ) == 0)
+return CPU_COUNT();
+#endif
 #ifdef __linux__
   cpu_set_t Set;
   if (sched_getaffinity(0, sizeof(Set), ) == 0)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r367809 - head/contrib/elftoolchain/elfcopy

2020-11-18 Thread Dimitry Andric
Author: dim
Date: Wed Nov 18 18:40:58 2020
New Revision: 367809
URL: https://svnweb.freebsd.org/changeset/base/367809

Log:
  When elftoolchain's objcopy (or strip) is rewriting a file in-place,
  make it create the temporary file in the same directory as the source
  file by default, instead of always using $TMPDIR or /tmp. If creating
  that file fails because the directory is not writable, also fallback to
  $TMPDIR or /tmp.
  
  This has also been submitted upstream as:
  https://sourceforge.net/p/elftoolchain/tickets/597/
  
  Reported by:  cem
  PR:   250872
  MFC after:2 weeks

Modified:
  head/contrib/elftoolchain/elfcopy/archive.c
  head/contrib/elftoolchain/elfcopy/elfcopy.h
  head/contrib/elftoolchain/elfcopy/main.c

Modified: head/contrib/elftoolchain/elfcopy/archive.c
==
--- head/contrib/elftoolchain/elfcopy/archive.c Wed Nov 18 17:50:33 2020
(r367808)
+++ head/contrib/elftoolchain/elfcopy/archive.c Wed Nov 18 18:40:58 2020
(r367809)
@@ -68,7 +68,7 @@ process_ar_obj(struct elfcopy *ecp, struct ar_obj *obj
int  fd;
 
/* Output to a temporary file. */
-   create_tempfile(, );
+   create_tempfile(NULL, , );
if ((ecp->eout = elf_begin(fd, ELF_C_WRITE, NULL)) == NULL)
errx(EXIT_FAILURE, "elf_begin() failed: %s",
elf_errmsg(-1));

Modified: head/contrib/elftoolchain/elfcopy/elfcopy.h
==
--- head/contrib/elftoolchain/elfcopy/elfcopy.h Wed Nov 18 17:50:33 2020
(r367808)
+++ head/contrib/elftoolchain/elfcopy/elfcopy.h Wed Nov 18 18:40:58 2020
(r367809)
@@ -298,7 +298,7 @@ voidcreate_scn(struct elfcopy *_ecp);
 void   create_srec(struct elfcopy *_ecp, int _ifd, int _ofd, const char *_ofn);
 void   create_symtab(struct elfcopy *_ecp);
 void   create_symtab_data(struct elfcopy *_ecp);
-void   create_tempfile(char **_fn, int *_fd);
+void   create_tempfile(const char *_src, char **_fn, int *_fd);
 void   finalize_external_symtab(struct elfcopy *_ecp);
 void   free_elf(struct elfcopy *_ecp);
 void   free_sec_act(struct elfcopy *_ecp);

Modified: head/contrib/elftoolchain/elfcopy/main.c
==
--- head/contrib/elftoolchain/elfcopy/main.cWed Nov 18 17:50:33 2020
(r367808)
+++ head/contrib/elftoolchain/elfcopy/main.cWed Nov 18 18:40:58 2020
(r367809)
@@ -512,44 +512,57 @@ free_elf(struct elfcopy *ecp)
 
 /* Create a temporary file. */
 void
-create_tempfile(char **fn, int *fd)
+create_tempfile(const char *src, char **fn, int *fd)
 {
+   static const char _TEMPDIR[] = "/tmp/";
+   static const char _TEMPFILE[] = "ecp.";
const char  *tmpdir;
-   char*cp, *tmpf;
-   size_t   tlen, plen;
+   char*tmpf;
+   size_t   tlen, slen, plen;
 
-#define_TEMPFILE "ecp."
-#define_TEMPFILEPATH "/tmp/ecp."
-
if (fn == NULL || fd == NULL)
return;
-   /* Repect TMPDIR environment variable. */
-   tmpdir = getenv("TMPDIR");
-   if (tmpdir != NULL && *tmpdir != '\0') {
-   tlen = strlen(tmpdir);
-   plen = strlen(_TEMPFILE);
-   tmpf = malloc(tlen + plen + 2);
+   for (;;) {
+   if (src == NULL) {
+   /* Respect TMPDIR environment variable. */
+   tmpdir = getenv("TMPDIR");
+   if (tmpdir == NULL || *tmpdir == '\0')
+   tmpdir = _TEMPDIR;
+   tlen = strlen(tmpdir);
+   slen = tmpdir[tlen - 1] == '/' ? 0 : 1;
+   } else {
+   /* Create temporary file relative to source file. */
+   if ((tmpdir = strrchr(src, '/')) == NULL) {
+   /* No path, only use a template filename. */
+   tlen = 0;
+   } else {
+   /* Append the template after the slash. */
+   tlen = ++tmpdir - src;
+   tmpdir = src;
+   }
+   slen = 0;
+   }
+   plen = strlen(_TEMPFILE) + 1;
+   tmpf = malloc(tlen + slen + plen);
if (tmpf == NULL)
err(EXIT_FAILURE, "malloc failed");
-   strncpy(tmpf, tmpdir, tlen);
-   cp = [tlen - 1];
-   if (*cp++ != '/')
-   *cp++ = '/';
-   strncpy(cp, _TEMPFILE, plen);
-   cp[plen] = '\0';
-   } else {
-   tmpf = strdup(_TEMPFILEPATH);
-   if (tmpf == NULL)
-   err(EXIT_FAILURE, "strdup 

svn commit: r367712 - head/tools/build/mk

2020-11-15 Thread Dimitry Andric
Author: dim
Date: Sun Nov 15 22:49:28 2020
New Revision: 367712
URL: https://svnweb.freebsd.org/changeset/base/367712

Log:
  Ensure make delete-old does not unlink the llvm-cxxfilt and its manpage,
  after r367304 and r367324, when WITH_LLVM_CXXFILT is enabled.
  
  Noticed by:   "Herbert J. Skuhra" 
  MFC after:3 days
  X-MFC-With:   r367304

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Nov 15 20:24:59 
2020(r367711)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Nov 15 22:49:28 
2020(r367712)
@@ -1538,7 +1538,6 @@ OLD_FILES+=usr/bin/lli
 OLD_FILES+=usr/bin/llvm-as
 OLD_FILES+=usr/bin/llvm-bcanalyzer
 OLD_FILES+=usr/bin/llvm-cxxdump
-OLD_FILES+=usr/bin/llvm-cxxfilt
 OLD_FILES+=usr/bin/llvm-diff
 OLD_FILES+=usr/bin/llvm-dis
 OLD_FILES+=usr/bin/llvm-dwarfdump
@@ -1562,7 +1561,6 @@ OLD_FILES+=usr/share/man/man1/llc.1.gz
 OLD_FILES+=usr/share/man/man1/lli.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-as.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1
@@ -1577,6 +1575,11 @@ OLD_FILES+=usr/share/man/man1/opt.1.gz
 
 .if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
 OLD_FILES+=usr/bin/clang-format
+.endif
+
+.if ${MK_CLANG_EXTRAS} == no && ${MK_LLVM_CXXFILT} == no
+OLD_FILES+=usr/bin/llvm-cxxfilt
+OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
 .endif
 
 .if ${MK_CPP} == no
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r367623 - head/contrib/llvm-project/lld/ELF

2020-11-12 Thread Dimitry Andric
Author: dim
Date: Thu Nov 12 19:25:31 2020
New Revision: 367623
URL: https://svnweb.freebsd.org/changeset/base/367623

Log:
  Merge commit 8df4e6094 from llvm git (by Fangrui Song):
  
[ELF] Don't consider SHF_ALLOC ".debug*" sections debug sections
  
Fixes PR48071
  
* The Rust compiler produces SHF_ALLOC `.debug_gdb_scripts` (which
  normally does not have the flag)
* `.debug_gdb_scripts` sections are removed from `inputSections` due
  to --strip-debug/--strip-all
* When processing --gc-sections, pieces of a SHF_MERGE section can be
  marked live separately
  
`=>` segfault when marking liveness of a `.debug_gdb_scripts` which
is not split into pieces (because it is not in `inputSections`)
  
This patch circumvents the problem by not treating SHF_ALLOC
".debug*" as debug sections (to prevent --strip-debug's stripping)
(which is still useful on its own).
  
Reviewed By: grimar
  
Differential Revision: https://reviews.llvm.org/D91291
  
  This should fix lld segfaulting when linking the rust-based parts of the
  devel/py-maturin port.
  
  Reported by:  Nick Venenga 
  PR:   250783
  MFC after:3 days

Modified:
  head/contrib/llvm-project/lld/ELF/InputSection.h

Modified: head/contrib/llvm-project/lld/ELF/InputSection.h
==
--- head/contrib/llvm-project/lld/ELF/InputSection.hThu Nov 12 18:24:37 
2020(r367622)
+++ head/contrib/llvm-project/lld/ELF/InputSection.hThu Nov 12 19:25:31 
2020(r367623)
@@ -391,7 +391,8 @@ class InputSection : public InputSectionBase { (privat
 };
 
 inline bool isDebugSection(const InputSectionBase ) {
-  return sec.name.startswith(".debug") || sec.name.startswith(".zdebug");
+  return (sec.flags & llvm::ELF::SHF_ALLOC) == 0 &&
+ (sec.name.startswith(".debug") || sec.name.startswith(".zdebug"));
 }
 
 // The list of all input sections.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r367485 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-11-08 Thread Dimitry Andric
Author: dim
Date: Sun Nov  8 12:47:35 2020
New Revision: 367485
URL: https://svnweb.freebsd.org/changeset/base/367485

Log:
  Merge commit 354d3106c from llvm git (by Kai Luo):
  
[PowerPC] Skip combining (uint_to_fp x) if x is not simple type
  
Current powerpc64le backend hits
```
Combining: t7: f64 = uint_to_fp t6
llc: llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:291:
llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() &&
"Expected a SimpleValueType!"' failed.
```
This patch fixes it by skipping combination if `t6` is not simple
type.
Fixed https://bugs.llvm.org/show_bug.cgi?id=47660.
  
Reviewed By: #powerpc, steven.zhang
  
Differential Revision: https://reviews.llvm.org/D88388
  
  This should fix the llvm assertion mentioned above when building the
  following ports for powerpc64le:
  
  * audio/traverso
  * databases/percona57-pam-for-mysql
  * databases/percona57-server
  * emulators/citra
  * emulators/citra-qt5
  * games/7kaa
  * graphics/dia
  * graphics/mandelbulber
  * graphics/pcl-pointclouds
  * net-p2p/libtorrent-rasterbar
  * textproc/htmldoc
  
  Requested by: pkubaj
  MFC after:3 days

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Sun Nov  8 11:12:00 2020(r367484)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Sun Nov  8 12:47:35 2020(r367485)
@@ -14257,6 +14257,8 @@ SDValue PPCTargetLowering::combineFPToIntToFP(SDNode *
   // from the hardware.
   if (Op.getValueType() != MVT::f32 && Op.getValueType() != MVT::f64)
 return SDValue();
+  if (!Op.getOperand(0).getValueType().isSimple())
+return SDValue();
   if (Op.getOperand(0).getValueType().getSimpleVT() <= MVT(MVT::i1) ||
   Op.getOperand(0).getValueType().getSimpleVT() > MVT(MVT::i64))
 return SDValue();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r367337 - head/contrib/libcxxrt

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 17:51:09 2020
New Revision: 367337
URL: https://svnweb.freebsd.org/changeset/base/367337

Log:
  Make vector-related functions in libcxxrt's demangler static
  
  Follow-up to r367323 by re-adding static to a number of the functions
  copied from elftc's libelftc_vstr.c. This was requested by upstream.
  
  PR:   250702
  MFC after:3 days

Modified:
  head/contrib/libcxxrt/libelftc_dem_gnu3.c

Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c
==
--- head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 17:22:12 2020
(r367336)
+++ head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 17:51:09 2020
(r367337)
@@ -153,7 +153,7 @@ get_strlen_sum(const struct vector_str *v)
 /**
  * @brief Deallocate resource in vector_str.
  */
-void
+static void
 vector_str_dest(struct vector_str *v)
 {
size_t i;
@@ -174,7 +174,7 @@ vector_str_dest(struct vector_str *v)
  * @param l Length of the string.
  * @return -1 at failed, 0 at not found, 1 at found.
  */
-int
+static int
 vector_str_find(const struct vector_str *v, const char *o, size_t l)
 {
size_t i;
@@ -197,7 +197,7 @@ vector_str_find(const struct vector_str *v, const char
  * @param l Length of the string.
  * @return NULL at failed or NUL terminated new allocated string.
  */
-char *
+static char *
 vector_str_get_flat(const struct vector_str *v, size_t *l)
 {
ssize_t elem_pos, elem_size, rtn_size;
@@ -263,7 +263,7 @@ vector_str_grow(struct vector_str *v)
  * @brief Initialize vector_str.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_init(struct vector_str *v)
 {
 
@@ -287,7 +287,7 @@ vector_str_init(struct vector_str *v)
  * @brief Remove last element in vector_str.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_pop(struct vector_str *v)
 {
 
@@ -309,7 +309,7 @@ vector_str_pop(struct vector_str *v)
  * @brief Push back string to vector.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_push(struct vector_str *v, const char *str, size_t len)
 {
 
@@ -333,7 +333,7 @@ vector_str_push(struct vector_str *v, const char *str,
  * @brief Push front org vector to det vector.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_push_vector_head(struct vector_str *dst, struct vector_str *org)
 {
size_t i, j, tmp_cap;
@@ -373,7 +373,7 @@ vector_str_push_vector_head(struct vector_str *dst, st
  * @brief Push org vector to the tail of det vector.
  * @return false at failed, true at success.
  */
-bool
+static bool
 vector_str_push_vector(struct vector_str *dst, struct vector_str *org)
 {
size_t i, j, tmp_cap;
@@ -416,7 +416,7 @@ vector_str_push_vector(struct vector_str *dst, struct 
  * If r_len is not NULL, string length will be returned.
  * @return NULL at failed or NUL terminated new allocated string.
  */
-char *
+static char *
 vector_str_substr(const struct vector_str *v, size_t begin, size_t end,
 size_t *r_len)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r367304 - in head: share/man/man5 share/mk tools/build/options usr.bin usr.bin/clang usr.bin/clang/llvm-cxxfilt

2020-11-04 Thread Dimitry Andric
On 4 Nov 2020, at 17:38, Shawn Webb  wrote:
> 
> On Wed, Nov 04, 2020 at 11:26:51AM -0500, Ed Maste wrote:
>> On Tue, 3 Nov 2020 at 14:57, Dimitry Andric  wrote:
>>> 
>>> Author: dim
>>> Date: Tue Nov  3 19:57:28 2020
>>> New Revision: 367304
>>> URL: https://svnweb.freebsd.org/changeset/base/367304
>>> 
>>> Log:
>>>  Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
>> 
>> A previous argument against the LLVM versions of binutils replacements
>> is that they were excessively large, but this does not look like a
>> substantial problem here. LLVM's cxxfilt is indeed many times the size
>> of ELF Tool Chain's, but still small enough that for a tool chain
>> component it's not a concern, in my opinion.
>> 
>> ELF Tool Chain:
>> $ size obj/c++filt
>>   text   databss dec   hex   filename
>>  66966   1008   8400   76374   0x12a56   obj/c++filt
>> 
>> LLVM:
>> $ size obj/llvm-cxxfilt
>>text   databss  dec   hex   filename
>>  378138   1756   9165   389059   0x5efc3   obj/llvm-cxxfilt
>> 
>> A remaining issue is that both nm and addr2line can also demangle C++ 
>> symbols.
> 
> This brings a question: is there any guidance as to what FreeBSD
> considers "too large of a component" for a toolchain component (or any
> other various components, like src.git/stand)?

I think this guidance originates from the world of embedded systems,
where storage size is a more limiting factor than on recent desktop or
server class machines. On my desktops I won't care too much whether an
executable is 1M or 100MB, but on a small SD card things add up very
quickly!

That said, llvm-related tools such as llvm-ar or llvm-cxxfilt are pretty
big, mainly because all of them are written in C++ with a lot of
templates, and we link the llvm and clang .a files statically into them.

It would save some space to stuff all those library files into a shared
library, and link the tools against that, but the disadvantage is that
it will take a *lot* of memory and CPU time to link that (huge) shared
library. I experimented a little with that in the past, and it's very
difficult to make it work on 32-bit systems.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r367324 - in head/share: man/man5 mk

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 11:23:19 2020
New Revision: 367324
URL: https://svnweb.freebsd.org/changeset/base/367324

Log:
  Turn on WITH_LLVM_CXXFILT by default
  
  LLVM's demangler supports more modern C++ constructs such as lambdas and
  unnamed types, and is actively maintained. The command line tool is
  usable as a drop-in replacement for GNU c++filt, or elftoolchain's
  cxxfilt. The latter is still available by using WITHOUT_LLVM_CXXFILT, if
  needed.
  
  PR:   250702
  MFC after:2 weeks

Modified:
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Wed Nov  4 11:13:36 2020
(r367323)
+++ head/share/man/man5/src.conf.5  Wed Nov  4 11:23:19 2020
(r367324)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd November 3, 2020
+.Dd November 4, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -919,8 +919,8 @@ Set to disable debugging assertions in LLVM.
 Set to not build the
 .Xr llvm-cov 1
 tool.
-.It Va WITH_LLVM_CXXFILT
-Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
+.It Va WITHOUT_LLVM_CXXFILT
+Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.
 .It Va WITHOUT_LLVM_TARGET_AARCH64
 Set to not build LLVM target support for AArch64.
 The

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Nov  4 11:13:36 2020(r367323)
+++ head/share/mk/src.opts.mk   Wed Nov  4 11:23:19 2020(r367324)
@@ -135,6 +135,7 @@ __DEFAULT_YES_OPTIONS = \
 LLD_IS_LD \
 LLVM_ASSERTIONS \
 LLVM_COV \
+LLVM_CXXFILT \
 LLVM_TARGET_ALL \
 LOADER_GELI \
 LOADER_LUA \
@@ -210,7 +211,6 @@ __DEFAULT_NO_OPTIONS = \
 GNU_GREP_COMPAT \
 HESIOD \
 LIBSOFT \
-LLVM_CXXFILT \
 LOADER_FIREWIRE \
 LOADER_VERBOSE \
 LOADER_VERIEXEC_PASS_MANIFEST \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r367323 - head/contrib/libcxxrt

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 11:13:36 2020
New Revision: 367323
URL: https://svnweb.freebsd.org/changeset/base/367323

Log:
  Update libcxxrt's private copy of elftoolchain demangler
  
  This updates the private copy of libelftc_dem_gnu3.c in libcxxrt with
  the most recent version from upstream r3877. Similar to r367322, this
  fixes a number of possible assertions, and allows it to correctly
  demangle several names that it could not handle before.
  
  PR:   250702
  MFC after:3 days

Modified:
  head/contrib/libcxxrt/libelftc_dem_gnu3.c

Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c
==
--- head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 11:02:05 2020
(r367322)
+++ head/contrib/libcxxrt/libelftc_dem_gnu3.c   Wed Nov  4 11:13:36 2020
(r367323)
@@ -1,5 +1,6 @@
 /*-
- * Copyright (c) 2007, 2008 Hyogeol Lee 
+ * Copyright (c) 2007 Hyogeol Lee 
+ * Copyright (c) 2015-2017 Kai Wang 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,12 +55,17 @@ struct vector_str {
 };
 
 #define BUFFER_GROWFACTOR  1.618
-#define VECTOR_DEF_CAPACITY8
+#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR)
+
+#defineELFTC_FAILURE   0
 #defineELFTC_ISDIGIT(C)(isdigit((C) & 0xFF))
+#defineELFTC_SUCCESS   1
 
+#define VECTOR_DEF_CAPACITY8
+
 enum type_qualifier {
TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT,
-   TYPE_CST, TYPE_VEC
+   TYPE_CST, TYPE_VEC, TYPE_RREF
 };
 
 struct vector_type_qualifier {
@@ -73,35 +79,57 @@ enum read_cmd {
READ_TYPE, READ_FUNC, READ_PTRMEM
 };
 
+struct read_cmd_item {
+   enum read_cmd cmd;
+   void *data;
+};
+
 struct vector_read_cmd {
size_t size, capacity;
-   enum read_cmd *r_container;
+   struct read_cmd_item *r_container;
 };
 
+enum push_qualifier {
+   PUSH_ALL_QUALIFIER,
+   PUSH_CV_QUALIFIER,
+   PUSH_NON_CV_QUALIFIER,
+};
+
 struct cpp_demangle_data {
struct vector_stroutput;/* output string vector */
-   struct vector_stroutput_tmp;
struct vector_strsubst; /* substitution string vector */
struct vector_strtmpl;
struct vector_strclass_type;
+   struct vector_str   *cur_output;/* ptr to current output vec */
struct vector_read_cmd   cmd;
-   bool paren; /* parenthesis opened */
-   bool pfirst;/* first element of parameter */
bool mem_rst;   /* restrict member function */
bool mem_vat;   /* volatile member function */
bool mem_cst;   /* const member function */
+   bool mem_ref;   /* lvalue-ref member func */
+   bool mem_rref;  /* rvalue-ref member func */
+   bool is_tmpl;   /* template args */
+   bool is_functype;   /* function type */
+   bool ref_qualifier; /* ref qualifier */
+   enum type_qualifier  ref_qualifier_type; /* ref qualifier type */
+   enum push_qualifier  push_qualifier; /* which qualifiers to push */
int  func_type;
const char  *cur;   /* current mangled name ptr */
const char  *last_sname;/* last source name */
-   int  push_head;
 };
 
+struct type_delimit {
+   bool paren;
+   bool firstp;
+};
+
 #defineCPP_DEMANGLE_TRY_LIMIT  128
 #defineFLOAT_SPRINTF_TRY_LIMIT 5
 #defineFLOAT_QUADRUPLE_BYTES   16
 #defineFLOAT_EXTENED_BYTES 10
 
 #define SIMPLE_HASH(x,y)   (64 * x + y)
+#define DEM_PUSH_STR(d,s)  cpp_demangle_push_str((d), (s), strlen((s)))
+#define VEC_PUSH_STR(d,s)  vector_str_push((d), (s), strlen((s)))
 
 static size_t  get_strlen_sum(const struct vector_str *v);
 static boolvector_str_grow(struct vector_str *v);
@@ -125,7 +153,7 @@ get_strlen_sum(const struct vector_str *v)
 /**
  * @brief Deallocate resource in vector_str.
  */
-static void
+void
 vector_str_dest(struct vector_str *v)
 {
size_t i;
@@ -146,7 +174,7 @@ vector_str_dest(struct vector_str *v)
  * @param l Length of the string.
  * @return -1 at failed, 0 at not found, 1 at found.
  */
-static int
+int
 vector_str_find(const struct vector_str *v, const char *o, size_t l)
 {
size_t i;
@@ -169,7 +197,7 @@ vector_str_find(const struct vector_str *v, const char
  * @param l Length of the string.
  * @return NULL at failed or NUL terminated new allocated string.
  */
-static char *
+char *
 vector_str_get_flat(const struct vector_str *v, size_t *l)
 {
ssize_t elem_pos, elem_size, 

svn commit: r367322 - head/contrib/elftoolchain/libelftc

2020-11-04 Thread Dimitry Andric
Author: dim
Date: Wed Nov  4 11:02:05 2020
New Revision: 367322
URL: https://svnweb.freebsd.org/changeset/base/367322

Log:
  Merge elftoolchain r3877 (by jkoshy):
  
Incorporate fixes from Dimitry Andric:
  
- Use a BUFFER_GROW() macro to avoid rounding errors in capacity
  calculations.
- Fix a bug introduced in [r3531].
- Fix handling of nested template parameters.
  
Ticket: #581
  
  This should fix a number of assertions on elftoolchain's cxxfilt, and
  allow it to correctly demangle several names that it could not handle
  before.
  
  Obtained from:https://sourceforge.net/p/elftoolchain/code/3877/
  PR:   250702
  MFC after:3 days

Modified:
  head/contrib/elftoolchain/libelftc/_libelftc.h
  head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
  head/contrib/elftoolchain/libelftc/libelftc_vstr.c

Modified: head/contrib/elftoolchain/libelftc/_libelftc.h
==
--- head/contrib/elftoolchain/libelftc/_libelftc.h  Wed Nov  4 10:38:25 
2020(r367321)
+++ head/contrib/elftoolchain/libelftc/_libelftc.h  Wed Nov  4 11:02:05 
2020(r367322)
@@ -56,6 +56,7 @@ struct vector_str {
 };
 
 #define BUFFER_GROWFACTOR  1.618
+#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR)
 
 #defineELFTC_FAILURE   0
 #defineELFTC_ISDIGIT(C)(isdigit((C) & 0xFF))

Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
==
--- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c  Wed Nov  4 
10:38:25 2020(r367321)
+++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c  Wed Nov  4 
11:02:05 2020(r367322)
@@ -2135,10 +2135,10 @@ cpp_demangle_read_sname(struct cpp_demangle_data *ddat
if (err == 0)
return (0);
 
-   assert(ddata->output.size > 0);
+   assert(ddata->cur_output->size > 0);
if (vector_read_cmd_find(>cmd, READ_TMPL) == NULL)
ddata->last_sname =
-   ddata->output.container[ddata->output.size - 1];
+   ddata->cur_output->container[ddata->output.size - 1];
 
ddata->cur += len;
 
@@ -2421,7 +2421,7 @@ cpp_demangle_read_tmpl_args(struct cpp_demangle_data *
return (0);
 
limit = 0;
-   v = >output;
+   v = ddata->cur_output;
for (;;) {
idx = v->size;
if (!cpp_demangle_read_tmpl_arg(ddata))
@@ -3909,7 +3909,7 @@ vector_read_cmd_push(struct vector_read_cmd *v, enum r
return (0);
 
if (v->size == v->capacity) {
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
if ((tmp_r_ctn = malloc(sizeof(*tmp_r_ctn) * tmp_cap)) == NULL)
return (0);
for (i = 0; i < v->size; ++i)
@@ -3974,7 +3974,7 @@ vector_type_qualifier_push(struct vector_type_qualifie
return (0);
 
if (v->size == v->capacity) {
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
if ((tmp_ctn = malloc(sizeof(enum type_qualifier) * tmp_cap))
== NULL)
return (0);

Modified: head/contrib/elftoolchain/libelftc/libelftc_vstr.c
==
--- head/contrib/elftoolchain/libelftc/libelftc_vstr.c  Wed Nov  4 10:38:25 
2020(r367321)
+++ head/contrib/elftoolchain/libelftc/libelftc_vstr.c  Wed Nov  4 11:02:05 
2020(r367322)
@@ -152,7 +152,7 @@ vector_str_grow(struct vector_str *v)
 
assert(v->capacity > 0);
 
-   tmp_cap = v->capacity * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(v->capacity);
 
assert(tmp_cap > v->capacity);
 
@@ -253,7 +253,7 @@ vector_str_push_vector_head(struct vector_str *dst, st
if (dst == NULL || org == NULL)
return (false);
 
-   tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(dst->size + org->size);
 
if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL)
return (false);
@@ -293,7 +293,7 @@ vector_str_push_vector(struct vector_str *dst, struct 
if (dst == NULL || org == NULL)
return (false);
 
-   tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR;
+   tmp_cap = BUFFER_GROW(dst->size + org->size);
 
if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL)
return (false);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r367304 - in head: share/man/man5 share/mk tools/build/options usr.bin usr.bin/clang usr.bin/clang/llvm-cxxfilt

2020-11-03 Thread Dimitry Andric
Author: dim
Date: Tue Nov  3 19:57:28 2020
New Revision: 367304
URL: https://svnweb.freebsd.org/changeset/base/367304

Log:
  Add WITH_LLVM_CXXFILT option to install llvm-cxxfilt as c++filt
  
  Since elftoolchain's cxxfilt is rather far behind on features, and we
  ran into several bugs, add an option to use llvm-cxxfilt as an drop-in
  replacement.
  
  It supports the same options as elftoolchain cxxfilt, though it doesn't
  have support for old ARM (C++ Annotated Reference Manual, not the CPU)
  and GNU v2 manglings. But these are irrelevant in 2020.
  
  Note: as we already compile the required libraries as part of libllvm,
  this will not add any significant build time either.
  
  PR:   250702
  Reviewed by:  emaste, yuri
  Differential Revision: https://reviews.freebsd.org/D27071
  MFC after:2 weeks

Added:
  head/tools/build/options/WITHOUT_LLVM_CXXFILT   (contents, props changed)
  head/tools/build/options/WITH_LLVM_CXXFILT   (contents, props changed)
Modified:
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk
  head/usr.bin/Makefile
  head/usr.bin/clang/Makefile
  head/usr.bin/clang/llvm-cxxfilt/Makefile

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Tue Nov  3 19:50:42 2020
(r367303)
+++ head/share/man/man5/src.conf.5  Tue Nov  3 19:57:28 2020
(r367304)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd September 15, 2020
+.Dd November 3, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -919,6 +919,8 @@ Set to disable debugging assertions in LLVM.
 Set to not build the
 .Xr llvm-cov 1
 tool.
+.It Va WITH_LLVM_CXXFILT
+Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.
 .It Va WITHOUT_LLVM_TARGET_AARCH64
 Set to not build LLVM target support for AArch64.
 The

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Tue Nov  3 19:50:42 2020(r367303)
+++ head/share/mk/src.opts.mk   Tue Nov  3 19:57:28 2020(r367304)
@@ -210,6 +210,7 @@ __DEFAULT_NO_OPTIONS = \
 GNU_GREP_COMPAT \
 HESIOD \
 LIBSOFT \
+LLVM_CXXFILT \
 LOADER_FIREWIRE \
 LOADER_VERBOSE \
 LOADER_VERIEXEC_PASS_MANIFEST \

Added: head/tools/build/options/WITHOUT_LLVM_CXXFILT
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_LLVM_CXXFILT   Tue Nov  3 19:57:28 
2020(r367304)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.

Added: head/tools/build/options/WITH_LLVM_CXXFILT
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_LLVM_CXXFILT  Tue Nov  3 19:57:28 2020
(r367304)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Install LLVM's llvm-cxxfilt as c++filt, instead of ELF Tool Chain's cxxfilt.

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Tue Nov  3 19:50:42 2020(r367303)
+++ head/usr.bin/Makefile   Tue Nov  3 19:57:28 2020(r367304)
@@ -260,7 +260,9 @@ SUBDIR.${MK_TOOLCHAIN}+=ar
 SUBDIR.${MK_TOOLCHAIN}+=   c89
 SUBDIR.${MK_TOOLCHAIN}+=   c99
 SUBDIR.${MK_TOOLCHAIN}+=   ctags
+.if ${MK_LLVM_CXXFILT} == "no"
 SUBDIR.${MK_TOOLCHAIN}+=   cxxfilt
+.endif
 SUBDIR.${MK_TOOLCHAIN}+=   objcopy
 SUBDIR.${MK_TOOLCHAIN}+=   file2c
 SUBDIR.${MK_TOOLCHAIN}+=   gprof

Modified: head/usr.bin/clang/Makefile
==
--- head/usr.bin/clang/Makefile Tue Nov  3 19:50:42 2020(r367303)
+++ head/usr.bin/clang/Makefile Tue Nov  3 19:57:28 2020(r367304)
@@ -16,6 +16,10 @@ SUBDIR+= llvm-nm
 SUBDIR+=   llvm-objdump
 SUBDIR+=   llvm-symbolizer
 
+.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLVM_CXXFILT} != "no"
+SUBDIR+=   llvm-cxxfilt
+.endif
+
 .if ${MK_CLANG_EXTRAS} != "no"
 SUBDIR+=   bugpoint
 SUBDIR+=   llc
@@ -23,7 +27,6 @@ SUBDIR+=  lli
 SUBDIR+=   llvm-as
 SUBDIR+=   llvm-bcanalyzer
 SUBDIR+=   llvm-cxxdump
-SUBDIR+=   llvm-cxxfilt
 SUBDIR+=   llvm-diff
 SUBDIR+=   llvm-dis
 SUBDIR+=   llvm-dwarfdump

Modified: head/usr.bin/clang/llvm-cxxfilt/Makefile
==
--- head/usr.bin/clang/llvm-cxxfilt/MakefileTue Nov  3 19:50:42 2020
(r367303)
+++ head/usr.bin/clang/llvm-cxxfilt/MakefileTue Nov  3 19:57:28 2020
(r367304)
@@ -1,8 +1,15 @@
 # $FreeBSD$
 
+.include 
+
 PROG_CXX=  llvm-cxxfilt
 
 SRCDIR= 

svn commit: r366683 - head/contrib/llvm-project/clang/lib/Sema

2020-10-13 Thread Dimitry Andric
Author: dim
Date: Tue Oct 13 19:42:22 2020
New Revision: 366683
URL: https://svnweb.freebsd.org/changeset/base/366683

Log:
  Merge commit 35ecc7fe4 from llvm git (by Hubert Tong):
  
[clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast
  
Fix premature decision in the presence of type-dependent expression
operands on whether AltiVec vector initializations from single
expressions are "splat" operations.
  
Verify that the instantiation is able to determine the correct cast
semantics for both the scalar type and the vector type case.
  
Note that, because the change only affects the single-expression case
(and the target type is an AltiVec-style vector type), the
replacement of a parenthesized list with a parenthesized expression
does not change the semantics of the program in a program-observable
manner.
  
Reviewed By: aaron.ballman
  
Differential Revision: https://reviews.llvm.org/D88526
  
  This should fix 'Assertion failed: (isScalarType()), function
  getScalarTypeKind, file /usr/src/contrib/llvm-project/clang/lib/AST
  /Type.cpp, line 2146', when building the graphics/opencv-core port for
  powerpc64le.
  
  Requested by: pkubaj
  MFC after:4 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp

Modified: head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
==
--- head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp   Tue Oct 13 
19:34:36 2020(r366682)
+++ head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp   Tue Oct 13 
19:42:22 2020(r366683)
@@ -7402,7 +7402,7 @@ Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc
 }
 if (PE || PLE->getNumExprs() == 1) {
   Expr *E = (PE ? PE->getSubExpr() : PLE->getExpr(0));
-  if (!E->getType()->isVectorType())
+  if (!E->isTypeDependent() && !E->getType()->isVectorType())
 isVectorLiteral = true;
 }
 else
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r366655 - in head: contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/Driver/ToolChains contrib/llvm-project/llvm/lib/CodeGen contrib/llvm-project/llvm/lib/C...

2020-10-12 Thread Dimitry Andric
Author: dim
Date: Mon Oct 12 21:35:29 2020
New Revision: 366655
URL: https://svnweb.freebsd.org/changeset/base/366655

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-0-g176249bd673 (aka 11.0.0 release).
  
  MFC after:4 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/Driver/Options.td
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td
==
--- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Oct 
12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Oct 
12 21:35:29 2020(r366655)
@@ -1435,11 +1435,11 @@ def fno_pch_validate_input_files_content:
   Group, Flags<[DriverOption]>;
 def fpch_instantiate_templates:
   Flag <["-"], "fpch-instantiate-templates">,
-  Group, Flags<[CC1Option]>,
+  Group, Flags<[CC1Option, CoreOption]>,
   HelpText<"Instantiate templates already while building a PCH">;
 def fno_pch_instantiate_templates:
   Flag <["-"], "fno-pch-instantiate-templates">,
-  Group, Flags<[CC1Option]>;
+  Group, Flags<[CC1Option, CoreOption]>;
 defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
   "code for uses of this PCH that assumes an explicit object file will be 
built for the PCH">;
 defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate 
",

Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
==
--- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp Mon Oct 
12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp Mon Oct 
12 21:35:29 2020(r366655)
@@ -1197,7 +1197,11 @@ void Clang::AddPreprocessingOptions(Compilation , co
 if (YcArg && JA.getKind() >= Action::PrecompileJobClass &&
 JA.getKind() <= Action::AssembleJobClass) {
   CmdArgs.push_back(Args.MakeArgString("-building-pch-with-obj"));
-  CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
+  // -fpch-instantiate-templates is the default when creating
+  // precomp using /Yc
+  if (Args.hasFlag(options::OPT_fpch_instantiate_templates,
+   options::OPT_fno_pch_instantiate_templates, true))
+CmdArgs.push_back(Args.MakeArgString("-fpch-instantiate-templates"));
 }
 if (YcArg || YuArg) {
   StringRef ThroughHeader = YcArg ? YcArg->getValue() : YuArg->getValue();

Modified: 
head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
==
--- head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp  
Mon Oct 12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp  
Mon Oct 12 21:35:29 2020(r366655)
@@ -5751,10 +5751,8 @@ SDValue TargetLowering::getNegatedExpression(SDValue O
 
 // If we already have the use of the negated floating constant, it is free
 // to negate it even it has multiple uses.
-if (!Op.hasOneUse() && CFP.use_empty()) {
-  RemoveDeadNode(CFP);
+if (!Op.hasOneUse() && CFP.use_empty())
   break;
-}
 Cost = NegatibleCost::Neutral;
 return CFP;
   }

Modified: head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp
==
--- head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp   Mon Oct 
12 21:31:49 2020(r366654)
+++ head/contrib/llvm-project/llvm/lib/CodeGen/TailDuplicator.cpp   Mon Oct 
12 21:35:29 2020(r366655)
@@ -627,6 +627,14 @@ bool TailDuplicator::shouldTailDuplicate(bool IsSimple
 if (PreRegAlloc && MI.isCall())
   return false;
 
+// TailDuplicator::appendCopies will erroneously place COPYs after
+// INLINEASM_BR instructions after 4b0aa5724fea, which demonstrates the 
same
+// bug that was fixed in f7a53d82c090.
+// FIXME: Use findPHICopyInsertPoint() to find the correct insertion point
+//for the COPY when replacing PHIs.
+if (MI.getOpcode() == TargetOpcode::INLINEASM_BR)
+  return false;
+
 if (MI.isBundle())
   InstrCount += MI.getBundleSize();
 else if (!MI.isPHI() && 

svn commit: r366339 - in head: contrib/llvm-project/lld/docs contrib/llvm-project/llvm/include/llvm-c contrib/llvm-project/llvm/include/llvm/ADT contrib/llvm-project/llvm/lib/CodeGen contrib/llvm-p...

2020-10-01 Thread Dimitry Andric
Author: dim
Date: Thu Oct  1 19:06:07 2020
New Revision: 366339
URL: https://svnweb.freebsd.org/changeset/base/366339

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-rc5-0-g60a25202a7d.
  
  MFC after:4 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
  head/contrib/llvm-project/llvm/include/llvm-c/Core.h
  head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/PHIEliminationUtils.cpp
  
head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  head/contrib/llvm-project/llvm/lib/IR/Core.cpp
  head/contrib/llvm-project/llvm/lib/IR/Globals.cpp
  head/contrib/llvm-project/llvm/lib/Support/APFloat.cpp
  
head/contrib/llvm-project/llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
==
--- head/contrib/llvm-project/lld/docs/ReleaseNotes.rst Thu Oct  1 18:58:06 
2020(r366338)
+++ head/contrib/llvm-project/lld/docs/ReleaseNotes.rst Thu Oct  1 19:06:07 
2020(r366339)
@@ -5,11 +5,6 @@ lld 11.0.0 Release Notes
 .. contents::
 :local:
 
-.. warning::
-   These are in-progress notes for the upcoming LLVM 11.0.0 release.
-   Release notes for previous releases can be found on
-   `the Download Page `_.
-
 Introduction
 
 
@@ -176,12 +171,3 @@ MinGW Improvements
   ``--disable-runtime-pseudo-reloc``), the ``--no-seh`` flag and options
   for selecting file and section alignment (``--file-alignment`` and
   ``--section-alignment``).
-
-MachO Improvements
---
-
-* Item 1.
-
-WebAssembly Improvements
-
-

Modified: head/contrib/llvm-project/llvm/include/llvm-c/Core.h
==
--- head/contrib/llvm-project/llvm/include/llvm-c/Core.hThu Oct  1 
18:58:06 2020(r366338)
+++ head/contrib/llvm-project/llvm/include/llvm-c/Core.hThu Oct  1 
19:06:07 2020(r366339)
@@ -3636,7 +3636,7 @@ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMB
 /* Get the number of clauses on the landingpad instruction */
 unsigned LLVMGetNumClauses(LLVMValueRef LandingPad);
 
-/* Get the value of the clause at idnex Idx on the landingpad instruction */
+/* Get the value of the clause at index Idx on the landingpad instruction */
 LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx);
 
 /* Add a catch or filter clause to the landingpad instruction */
@@ -3936,6 +3936,26 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, 
 LLVMAtomicOrdering SuccessOrdering,
 LLVMAtomicOrdering FailureOrdering,
 LLVMBool SingleThread);
+
+/**
+ * Get the number of elements in the mask of a ShuffleVector instruction.
+ */
+unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst);
+
+/**
+ * \returns a constant that specifies that the result of a \c ShuffleVectorInst
+ * is undefined.
+ */
+int LLVMGetUndefMaskElem(void);
+
+/**
+ * Get the mask value at position Elt in the mask of a ShuffleVector
+ * instruction.
+ *
+ * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is undef
+ * at that position.
+ */
+int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
 
 LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst);
 void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread);

Modified: head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h
==
--- head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h   Thu Oct 
 1 18:58:06 2020(r366338)
+++ head/contrib/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h   Thu Oct 
 1 19:06:07 2020(r366339)
@@ -378,6 +378,9 @@ class SmallPtrSetImpl : public SmallPtrSetImplBase { (
   iterator find(ConstPtrType Ptr) const {
 return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)));
   }
+  bool contains(ConstPtrType Ptr) const {
+return 

svn commit: r365849 - head/contrib/llvm-project/llvm/lib/Target/X86

2020-09-17 Thread Dimitry Andric
Author: dim
Date: Thu Sep 17 19:47:41 2020
New Revision: 365849
URL: https://svnweb.freebsd.org/changeset/base/365849

Log:
  Merge commit 46673763f from llvm git (by Craig Topper):
  
[X86] Place new constant node in topological order in
X86DAGToDAGISel::matchBitExtract
  
Fixes PR47482
  
  This should fix 'Assertion failed: (Op->getNodeId() != -1 && "Node has
  already selected predecessor node"), function DoInstructionSelection,
  file
  
/usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp,
  line 1149' when compiling part of the project_painter project, while
  targeting the bdver2 (or higher) CPU.
  
  Reported by:  jkim
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

Modified: head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp   Thu Sep 
17 19:43:25 2020(r365848)
+++ head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp   Thu Sep 
17 19:47:41 2020(r365849)
@@ -3496,6 +3496,7 @@ bool X86DAGToDAGISel::matchBitExtract(SDNode *Node) {
   // Shift NBits left by 8 bits, thus producing 'control'.
   // This makes the low 8 bits to be zero.
   SDValue C8 = CurDAG->getConstant(8, DL, MVT::i8);
+  insertDAGNode(*CurDAG, SDValue(Node, 0), C8);
   SDValue Control = CurDAG->getNode(ISD::SHL, DL, MVT::i32, NBits, C8);
   insertDAGNode(*CurDAG, SDValue(Node, 0), Control);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365848 - in head/contrib/llvm-project/clang: include/clang/Basic include/clang/Sema lib/AST lib/Headers lib/Sema lib/Serialization

2020-09-17 Thread Dimitry Andric
Author: dim
Date: Thu Sep 17 19:43:25 2020
New Revision: 365848
URL: https://svnweb.freebsd.org/changeset/base/365848

Log:
  Merge commit e09107ab8 from llvm git (by Raul Tambre):
  
[Sema] Introduce BuiltinAttr, per-declaration builtin-ness
  
Instead of relying on whether a certain identifier is a builtin,
introduce BuiltinAttr to specify a declaration as having builtin
semantics.
  
This fixes incompatible redeclarations of builtins, as reverting the
identifier as being builtin due to one incompatible redeclaration
would have broken rest of the builtin calls.
Mostly-compatible redeclarations of builtins also no longer have
builtin semantics. They don't call the builtin nor inherit their
attributes.
A long-standing FIXME regarding builtins inside a namespace enclosed
in extern "C" not being recognized is also addressed.
  
Due to the more correct handling attributes for builtin functions are
added in more places, resulting in more useful warnings.
Tests are updated to reflect that.
  
Intrinsics without an inline definition in intrin.h had `inline` and
`static` removed as they had no effect and caused them to no longer
be recognized as builtins otherwise.
  
A pthread_create() related test is XFAIL-ed, as it relied on it being
recognized as a builtin based on its name.
The builtin declaration syntax is too restrictive and doesn't allow
custom structs, function pointers, etc.
It seems to be the only case and fixing this would require reworking
the current builtin syntax, so this seems acceptable.
  
Fixes PR45410.
  
Reviewed By: rsmith, yutsumi
  
Differential Revision: https://reviews.llvm.org/D77491
  
  This should fix 'Assertion failed: (i < getNumParams() && "Illegal
  param #"), function getParamDecl, file
  /usr/src/contrib/llvm-project/clang/include/clang/AST/Decl.h, line 2430'
  when building the graphics/pgplot port.
  
  Note that there may also have been other ports which triggered this
  assertion, if they redeclare standard functions with incompatible
  arguments.
  
  Reported by:  zeising
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/Basic/Attr.td
  head/contrib/llvm-project/clang/include/clang/Basic/Builtins.def
  head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h
  head/contrib/llvm-project/clang/include/clang/Sema/Sema.h
  head/contrib/llvm-project/clang/lib/AST/Decl.cpp
  head/contrib/llvm-project/clang/lib/Headers/intrin.h
  head/contrib/llvm-project/clang/lib/Sema/SemaDecl.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaLookup.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTReader.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTWriter.cpp

Modified: head/contrib/llvm-project/clang/include/clang/Basic/Attr.td
==
--- head/contrib/llvm-project/clang/include/clang/Basic/Attr.td Thu Sep 17 
19:41:10 2020(r365847)
+++ head/contrib/llvm-project/clang/include/clang/Basic/Attr.td Thu Sep 17 
19:43:25 2020(r365848)
@@ -3444,3 +3444,11 @@ def ReleaseHandle : InheritableParamAttr {
   let Subjects = SubjectList<[ParmVar]>;
   let Documentation = [ReleaseHandleDocs];
 }
+
+def Builtin : InheritableAttr {
+  let Spellings = [];
+  let Args = [UnsignedArgument<"ID">];
+  let Subjects = SubjectList<[Function]>;
+  let SemaHandler = 0;
+  let Documentation = [Undocumented];
+}

Modified: head/contrib/llvm-project/clang/include/clang/Basic/Builtins.def
==
--- head/contrib/llvm-project/clang/include/clang/Basic/Builtins.defThu Sep 
17 19:41:10 2020(r365847)
+++ head/contrib/llvm-project/clang/include/clang/Basic/Builtins.defThu Sep 
17 19:43:25 2020(r365848)
@@ -1017,6 +1017,7 @@ LIBBUILTIN(strncasecmp, "icC*cC*z", "f",   "strings.h"
 LIBBUILTIN(_exit, "vi",   "fr","unistd.h", ALL_GNU_LANGUAGES)
 LIBBUILTIN(vfork, "p","fj","unistd.h", ALL_LANGUAGES)
 // POSIX pthread.h
+// FIXME: Should specify argument types.
 LIBBUILTIN(pthread_create, "",  "fC<2,3>", "pthread.h", ALL_GNU_LANGUAGES)
 
 // POSIX setjmp.h

Modified: head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h
==
--- head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h   
Thu Sep 17 19:41:10 2020(r365847)
+++ head/contrib/llvm-project/clang/include/clang/Basic/IdentifierTable.h   
Thu Sep 17 19:43:25 2020(r365848)
@@ -225,18 +225,6 @@ class alignas(IdentifierInfoAlignment) IdentifierInfo 
   }
   void setObjCKeywordID(tok::ObjCKeywordKind ID) { ObjCOrBuiltinID = ID; }
 
-  /// True if setNotBuiltin() was called.
-  bool 

svn commit: r365807 - in head: contrib/llvm-project/clang/include/clang/AST contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic co...

2020-09-16 Thread Dimitry Andric
Author: dim
Date: Wed Sep 16 16:58:29 2020
New Revision: 365807
URL: https://svnweb.freebsd.org/changeset/base/365807

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-rc2-91-g6e042866c30.
  
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/AST/ASTContext.h
  head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
  head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
  head/contrib/llvm-project/clang/lib/AST/DeclBase.cpp
  head/contrib/llvm-project/clang/lib/AST/ItaniumMangle.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.h
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CodeGenTypes.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/Sparc.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/OpenBSD.h
  head/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
  head/contrib/llvm-project/clang/lib/Frontend/InitHeaderSearch.cpp
  head/contrib/llvm-project/clang/lib/Headers/altivec.h
  head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaType.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp
  
head/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
  head/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/DynamicType.cpp
  head/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c
  head/contrib/llvm-project/compiler-rt/lib/builtins/cpu_model.c
  head/contrib/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c
  
head/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
  head/contrib/llvm-project/libunwind/src/AddressSpace.hpp
  head/contrib/llvm-project/lld/COFF/Writer.cpp
  head/contrib/llvm-project/lld/ELF/DWARF.cpp
  head/contrib/llvm-project/lld/ELF/DWARF.h
  head/contrib/llvm-project/lld/ELF/LinkerScript.cpp
  head/contrib/llvm-project/lld/ELF/LinkerScript.h
  head/contrib/llvm-project/lld/ELF/OutputSections.cpp
  head/contrib/llvm-project/lld/ELF/SyntheticSections.cpp
  head/contrib/llvm-project/lld/docs/ELF/linker_script.rst
  head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
  head/contrib/llvm-project/llvm/include/llvm/Analysis/InstructionSimplify.h
  head/contrib/llvm-project/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
  head/contrib/llvm-project/llvm/include/llvm/IR/IRBuilder.h
  head/contrib/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/MachineCopyPropagation.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/RegAllocFast.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  
head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/TargetLoweringBase.cpp
  head/contrib/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  head/contrib/llvm-project/llvm/lib/IR/IRBuilder.cpp
  head/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/SVEInstrFormats.td
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
  
head/contrib/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  
head/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/compiler-rt/   (props changed)
  head/contrib/llvm-project/libunwind/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: 

svn commit: r365588 - head/lib/libcompiler_rt

2020-09-10 Thread Dimitry Andric
Author: dim
Date: Thu Sep 10 16:47:12 2020
New Revision: 365588
URL: https://svnweb.freebsd.org/changeset/base/365588

Log:
  Follow-up r364753 by only using arm's stdatomic.c implementation, as it
  already covers the functions in compiler-rt's atomic.c, leading to
  conflicts when linking.
  
  PR:   230888
  MFC after:3 days
  X-MFC-With:   r364753

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:08 2020
(r365587)
+++ head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:12 2020
(r365588)
@@ -124,7 +124,8 @@ SRCF+=  umodti3
 
 # Enable compiler-rt's atomic implementation only for clang, as it uses clang
 # specific builtins, and gcc packages usually come with their own libatomic.
-.if "${COMPILER_TYPE}" == "clang"
+# Exclude arm which has its own implementations of atomic functions, below.
+.if "${COMPILER_TYPE}" == "clang" && ${MACHINE_CPUARCH} != "arm"
 SRCF+= atomic
 .endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365509 - head/lib/libcompiler_rt

2020-09-09 Thread Dimitry Andric
Author: dim
Date: Wed Sep  9 20:48:57 2020
New Revision: 365509
URL: https://svnweb.freebsd.org/changeset/base/365509

Log:
  Follow-up r364753 by enabling compiler-rt's atomic implementation only
  for clang, as it uses clang specific builtins, and does not compile
  correctly with gcc. Note that gcc packages usually come with their own
  libatomic, providing these primitives.
  
  PR:   230888
  MFC after:3 days
  X-MFC-With:   r364753

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incWed Sep  9 19:07:34 2020
(r365508)
+++ head/lib/libcompiler_rt/Makefile.incWed Sep  9 20:48:57 2020
(r365509)
@@ -18,7 +18,6 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
-SRCF+= atomic
 SRCF+= bswapdi2
 SRCF+= bswapsi2
 SRCF+= clear_cache
@@ -122,6 +121,12 @@ SRCF+= udivti3
 SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
+
+# Enable compiler-rt's atomic implementation only for clang, as it uses clang
+# specific builtins, and gcc packages usually come with their own libatomic.
+.if "${COMPILER_TYPE}" == "clang"
+SRCF+= atomic
+.endif
 
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365507 - head/contrib/llvm-project/llvm/lib/Support

2020-09-09 Thread Dimitry Andric
Author: dim
Date: Wed Sep  9 18:11:04 2020
New Revision: 365507
URL: https://svnweb.freebsd.org/changeset/base/365507

Log:
  Merge commit e6bb4c8e7 from llvm git (by Craig Topper):
  
[X86] SSE4_A should only imply SSE3 not SSSE3 in the frontend.
  
SSE4_1 and SSE4_2 due imply SSSE3. So I guess I got confused when
switching the code to being table based in D83273.
  
Fixes PR47464
  
  This should fix builds with -march=amdfam10 emitting SSSE3 instructions
  such as pshufb, which lead to programs crashing with SIGILL on such
  processors.
  
  Reported by:  avg
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp

Modified: head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp
==
--- head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp  Wed Sep 
 9 18:07:13 2020(r365506)
+++ head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp  Wed Sep 
 9 18:11:04 2020(r365507)
@@ -522,7 +522,7 @@ static constexpr FeatureBitset ImpliedFeaturesAVX5124F
 static constexpr FeatureBitset ImpliedFeaturesAVX5124VNNIW = {};
 
 // SSE4_A->FMA4->XOP chain.
-static constexpr FeatureBitset ImpliedFeaturesSSE4_A = FeatureSSSE3;
+static constexpr FeatureBitset ImpliedFeaturesSSE4_A = FeatureSSE3;
 static constexpr FeatureBitset ImpliedFeaturesFMA4 = FeatureAVX | 
FeatureSSE4_A;
 static constexpr FeatureBitset ImpliedFeaturesXOP = FeatureFMA4;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365429 - head/contrib/llvm-project/openmp/runtime/src

2020-09-07 Thread Dimitry Andric
Author: dim
Date: Mon Sep  7 20:10:03 2020
New Revision: 365429
URL: https://svnweb.freebsd.org/changeset/base/365429

Log:
  Merge commit 47b0262d3 from llvm git (by me):
  
Add  include to kmp_os.h, to get the va_list type, required
after cde8f4c164a2. Sort system includes, while here.
  
  The original merged commit works fine by itself on head, but fails to
  compile on stable branches because stdarg.h is not implicitly pulled in.
  
  MFC after:immediately, to fix failing builds on stable/{11,12}

Modified:
  head/contrib/llvm-project/openmp/runtime/src/kmp_os.h

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_os.h
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_os.h   Mon Sep  7 
20:05:18 2020(r365428)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_os.h   Mon Sep  7 
20:10:03 2020(r365429)
@@ -14,8 +14,9 @@
 #define KMP_OS_H
 
 #include "kmp_config.h"
-#include 
 #include 
+#include 
+#include 
 
 #define KMP_FTN_PLAIN 1
 #define KMP_FTN_APPEND 2
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365373 - in head: lib/libc/stdlib/jemalloc tools/build/options

2020-09-06 Thread Dimitry Andric
Author: dim
Date: Sun Sep  6 09:08:06 2020
New Revision: 365373
URL: https://svnweb.freebsd.org/changeset/base/365373

Log:
  Follow-up r365371 by removing sentences which indicate the state of the
  MK_MALLOC_PRODUCTION option on -CURRENT.
  
  Also, for the sake of backwards compatibility, support the old way of
  enabling 'production malloc', e.g. by adding a define in make.conf(5).
  
  MFC after:1 week
  X-MFC-With:   r365371

Modified:
  head/lib/libc/stdlib/jemalloc/Makefile.inc
  head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
  head/tools/build/options/WITH_MALLOC_PRODUCTION

Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc
==
--- head/lib/libc/stdlib/jemalloc/Makefile.inc  Sun Sep  6 00:36:51 2020
(r365372)
+++ head/lib/libc/stdlib/jemalloc/Makefile.inc  Sun Sep  6 09:08:06 2020
(r365373)
@@ -45,6 +45,6 @@ MLINKS+= \
jemalloc.3 nallocx.3 \
jemalloc.3 malloc.conf.5
 
-.if ${MK_MALLOC_PRODUCTION} != "no"
+.if ${MK_MALLOC_PRODUCTION} != "no" || defined(MALLOC_PRODUCTION)
 CFLAGS+=   -DMALLOC_PRODUCTION
 .endif

Modified: head/tools/build/options/WITHOUT_MALLOC_PRODUCTION
==
--- head/tools/build/options/WITHOUT_MALLOC_PRODUCTION  Sun Sep  6 00:36:51 
2020(r365372)
+++ head/tools/build/options/WITHOUT_MALLOC_PRODUCTION  Sun Sep  6 09:08:06 
2020(r365373)
@@ -2,4 +2,3 @@
 Set to enable assertions and statistics gathering in
 .Xr malloc 3 .
 It also defaults the A and J runtime options to on.
-Enabled by default on -CURRENT.

Modified: head/tools/build/options/WITH_MALLOC_PRODUCTION
==
--- head/tools/build/options/WITH_MALLOC_PRODUCTION Sun Sep  6 00:36:51 
2020(r365372)
+++ head/tools/build/options/WITH_MALLOC_PRODUCTION Sun Sep  6 09:08:06 
2020(r365373)
@@ -2,4 +2,3 @@
 Set to disable assertions and statistics gathering in
 .Xr malloc 3 .
 It also defaults the A and J runtime options to off.
-Disabled by default on -CURRENT.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365371 - in head: . contrib/jemalloc contrib/jemalloc/doc lib/libc/stdlib/jemalloc share/man/man5 share/mk tools/build/options

2020-09-05 Thread Dimitry Andric
Author: dim
Date: Sat Sep  5 23:30:17 2020
New Revision: 365371
URL: https://svnweb.freebsd.org/changeset/base/365371

Log:
  Turn MALLOC_PRODUCTION into a regular src.conf(5) option
  
  For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
  been used to turn off potentially expensive debug checks and statistics
  gathering in the implementation of malloc(3).
  
  It seems more consistent to turn this into a regular src.conf(5) option,
  e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
  be toggled similar to any other source build option, and turned on or
  off by default for e.g. stable branches.
  
  Reviewed by:  imp, #manpages
  MFC after:1 week
  Differential Revision: https://reviews.freebsd.org/D26337

Added:
  head/tools/build/options/WITHOUT_MALLOC_PRODUCTION   (contents, props changed)
  head/tools/build/options/WITH_MALLOC_PRODUCTION   (contents, props changed)
Modified:
  head/UPDATING
  head/contrib/jemalloc/FREEBSD-diffs
  head/contrib/jemalloc/doc/jemalloc.3
  head/lib/libc/stdlib/jemalloc/Makefile.inc
  head/share/man/man5/make.conf.5
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk

Modified: head/UPDATING
==
--- head/UPDATING   Sat Sep  5 22:48:27 2020(r365370)
+++ head/UPDATING   Sat Sep  5 23:30:17 2020(r365371)
@@ -22,9 +22,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
debugging flags in userland, and various verbose features in the
kernel.  Many developers choose to disable these features on build
machines to maximize performance.  (To completely disable malloc
-   debugging, define MALLOC_PRODUCTION in /etc/make.conf, or to merely
-   disable the most expensive debugging functionality run
-   "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+   debugging, define WITH_MALLOC_PRODUCTION in /etc/src.conf and rebuild
+   world, or to merely disable the most expensive debugging functionality
+   at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
 20200824:
OpenZFS support has been integrated. Do not upgrade root pools until

Modified: head/contrib/jemalloc/FREEBSD-diffs
==
--- head/contrib/jemalloc/FREEBSD-diffs Sat Sep  5 22:48:27 2020
(r365370)
+++ head/contrib/jemalloc/FREEBSD-diffs Sat Sep  5 23:30:17 2020
(r365371)
@@ -14,7 +14,7 @@ index 7fecda7c..d5ca5e86 100644
 +--with-malloc-conf=abort_conf:false.
 +Additionally, --enable-debug is enabled in development
 +versions of FreeBSD (controlled by the
-+MALLOC_PRODUCTION make variable).
++MK_MALLOC_PRODUCTION make variable).
 +



Modified: head/contrib/jemalloc/doc/jemalloc.3
==
--- head/contrib/jemalloc/doc/jemalloc.3Sat Sep  5 22:48:27 2020
(r365370)
+++ head/contrib/jemalloc/doc/jemalloc.3Sat Sep  5 23:30:17 2020
(r365371)
@@ -43,7 +43,7 @@ The following configuration options are enabled in lib
 \fB\-\-with\-malloc\-conf=abort_conf:false\fR\&. Additionally,
 \fB\-\-enable\-debug\fR
 is enabled in development versions of FreeBSD (controlled by the
-\fBMALLOC_PRODUCTION\fR
+\fBMK_MALLOC_PRODUCTION\fR
 make variable)\&.
 .SH "SYNOPSIS"
 .sp

Modified: head/lib/libc/stdlib/jemalloc/Makefile.inc
==
--- head/lib/libc/stdlib/jemalloc/Makefile.inc  Sat Sep  5 22:48:27 2020
(r365370)
+++ head/lib/libc/stdlib/jemalloc/Makefile.inc  Sat Sep  5 23:30:17 2020
(r365371)
@@ -45,6 +45,6 @@ MLINKS+= \
jemalloc.3 nallocx.3 \
jemalloc.3 malloc.conf.5
 
-.if defined(MALLOC_PRODUCTION)
+.if ${MK_MALLOC_PRODUCTION} != "no"
 CFLAGS+=   -DMALLOC_PRODUCTION
 .endif

Modified: head/share/man/man5/make.conf.5
==
--- head/share/man/man5/make.conf.5 Sat Sep  5 22:48:27 2020
(r365370)
+++ head/share/man/man5/make.conf.5 Sat Sep  5 23:30:17 2020
(r365371)
@@ -401,12 +401,6 @@ console driver to
 and allow access over FireWire(IEEE1394) using
 .Xr dconschat 8 .
 Currently, only i386 and amd64 are supported.
-.It Va MALLOC_PRODUCTION
-.Pq Vt bool
-Set this to disable assertions and statistics gathering in
-.Xr malloc 3 .
-It also defaults the A and J runtime options to off.
-Disabled by default on -CURRENT.
 .It Va MAN_ARCH
 .Pq Vt str
 Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Sat Sep  5 22:48:27 2020
(r365370)
+++ head/share/man/man5/src.conf.5  Sat Sep  5 23:30:17 2020
(r365371)

svn commit: r365307 - head/contrib/llvm-project/llvm/include/llvm/ADT

2020-09-03 Thread Dimitry Andric
Author: dim
Date: Thu Sep  3 18:34:01 2020
New Revision: 365307
URL: https://svnweb.freebsd.org/changeset/base/365307

Log:
  Merge commit f26fc568402f from llvm git (by me):
  
Eliminate the sizing template parameter N from CoalescingBitVector
  
Since the parameter is not used anywhere, and the default size of 16
apparently causes PR47359, remove it. This ensures that IntervalMap
will automatically determine the optimal size, using its NodeSizer
struct.
  
Reviewed By: dblaikie
  
Differential Revision: https://reviews.llvm.org/D87044
  
  This should fix 'Assertion failed: (Elements + Grow <= Nodes * Capacity
  && "Not enough room for elements"), function distribute, file
  /usr/src/contrib/llvm-project/llvm/lib/Support/IntervalMap.cpp, line
  123.' when building the x11-toolkits/py-wxPython40 port on a i386 host.
  
  Reported by:  zeising
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h

Modified: head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h
==
--- head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h   
Thu Sep  3 18:27:13 2020(r365306)
+++ head/contrib/llvm-project/llvm/include/llvm/ADT/CoalescingBitVector.h   
Thu Sep  3 18:34:01 2020(r365307)
@@ -34,15 +34,14 @@ namespace llvm {
 /// performance for non-sequential find() operations.
 ///
 /// \tparam IndexT - The type of the index into the bitvector.
-/// \tparam N - The first N coalesced intervals of set bits are stored 
in-place.
-template  class CoalescingBitVector {
+template  class CoalescingBitVector {
   static_assert(std::is_unsigned::value,
 "Index must be an unsigned integer.");
 
-  using ThisT = CoalescingBitVector;
+  using ThisT = CoalescingBitVector;
 
   /// An interval map for closed integer ranges. The mapped values are unused.
-  using MapT = IntervalMap;
+  using MapT = IntervalMap;
 
   using UnderlyingIterator = typename MapT::const_iterator;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365306 - head/lib/clang/libllvm

2020-09-03 Thread Dimitry Andric
Author: dim
Date: Thu Sep  3 18:27:13 2020
New Revision: 365306
URL: https://svnweb.freebsd.org/changeset/base/365306

Log:
  Add a few more files to libllvm, which are required when doing sanitized
  builds, for example with -fsanitize=undefined.
  
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/lib/clang/libllvm/Makefile

Modified: head/lib/clang/libllvm/Makefile
==
--- head/lib/clang/libllvm/Makefile Thu Sep  3 18:21:58 2020
(r365305)
+++ head/lib/clang/libllvm/Makefile Thu Sep  3 18:27:13 2020
(r365306)
@@ -850,11 +850,14 @@ SRCS_MIN+=ProfileData/ProfileSummaryBuilder.cpp
 SRCS_MIN+= ProfileData/SampleProf.cpp
 SRCS_MIN+= ProfileData/SampleProfReader.cpp
 SRCS_MIN+= ProfileData/SampleProfWriter.cpp
+SRCS_MIN+= Remarks/BitstreamRemarkParser.cpp
 SRCS_MIN+= Remarks/BitstreamRemarkSerializer.cpp
 SRCS_MIN+= Remarks/RemarkFormat.cpp
+SRCS_MIN+= Remarks/RemarkParser.cpp
 SRCS_MIN+= Remarks/RemarkSerializer.cpp
 SRCS_MIN+= Remarks/RemarkStreamer.cpp
 SRCS_MIN+= Remarks/RemarkStringTable.cpp
+SRCS_MIN+= Remarks/YAMLRemarkParser.cpp
 SRCS_MIN+= Remarks/YAMLRemarkSerializer.cpp
 SRCS_MIN+= Support/AArch64TargetParser.cpp
 SRCS_MIN+= Support/ABIBreak.cpp
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r365305 - in head: . tools/build/mk

2020-09-03 Thread Dimitry Andric
Author: dim
Date: Thu Sep  3 18:21:58 2020
New Revision: 365305
URL: https://svnweb.freebsd.org/changeset/base/365305

Log:
  Ensure zpool-features(5) doesn't get removed by make delete-old.
  
  Apparently, somewhere in 2012 ZFS-on-FreeBSD moved it from section 5 to
  7, but ZFS-on-Linux never did.

Modified:
  head/ObsoleteFiles.inc
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Sep  3 17:07:58 2020(r365304)
+++ head/ObsoleteFiles.inc  Thu Sep  3 18:21:58 2020(r365305)
@@ -7605,8 +7605,6 @@ OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a
 # 20121230: remove wrongly created directories for auditdistd
 OLD_DIRS+=var/dist
 OLD_DIRS+=var/remote
-# 20121114: zpool-features manual page moved from section 5 to 7
-OLD_FILES+=usr/share/man/man5/zpool-features.5.gz
 # 20121022: remove harp, hfa and idt man page
 OLD_FILES+=usr/share/man/man4/harp.4.gz
 OLD_FILES+=usr/share/man/man4/hfa.4.gz

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Thu Sep  3 17:07:58 
2020(r365304)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Thu Sep  3 18:21:58 
2020(r365305)
@@ -1173,7 +1173,7 @@ OLD_FILES+=usr/sbin/zfsd
 OLD_FILES+=usr/sbin/zhack
 OLD_FILES+=usr/sbin/zdb
 OLD_FILES+=usr/share/man/man3/libbe.3.gz
-OLD_FILES+=usr/share/man/man7/zpool-features.7.gz
+OLD_FILES+=usr/share/man/man5/zpool-features.5.gz
 OLD_FILES+=usr/share/man/man8/bectl.8.gz
 OLD_FILES+=usr/share/man/man8/gptzfsboot.8.gz
 OLD_FILES+=usr/share/man/man8/zdb.8.gz
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r364822 - in head/crypto/openssl/crypto: aes/asm bn/asm chacha/asm ec/asm modes/asm poly1305/asm sha/asm

2020-08-26 Thread Dimitry Andric
On 26 Aug 2020, at 19:13, Ian Lepore  wrote:
> 
> On Wed, 2020-08-26 at 19:04 +0200, Mateusz Guzik wrote:
>> On 8/26/20, Jung-uk Kim  wrote:
>>> Author: jkim
>>> Date: Wed Aug 26 16:55:28 2020
>>> New Revision: 364822
>>> URL: https://svnweb.freebsd.org/changeset/base/364822
>>> 
>>> Log:
>>>  Fix Clang version detection.
>>> 
>>>  We prepend "FreeBSD" to Clang version string.  This broke
>>> compiler test
>>> for
>>>  AVX instruction support.
>>> 
>> 
>> What about other software checking in similar fashion? imo the right
>> fix is to stop mucking with the way clang reports itself
>> 
> 
> Maybe it would be better to not modify the start of the string.
> Instead of
> 
> FreeBSD clang version 9.0.1 (g...@github.com:llvm/llvm-project.git
> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
> 
> maybe
> 
> clang version 9.0.1 for FreeBSD (g...@github.com:llvm/llvm-project.git
> c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)

We have been doing this since, well, forever. And this way actually
originates from upstream, we only define the CLANG_VENDOR macro. I see
no reason to change this after all those years.

A better question is, why these perl scripts "suddenly" started failing?
Or have they also failed since forever, and it was only noticed now?

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r364782 - head/lib/libcompiler_rt

2020-08-25 Thread Dimitry Andric
On 25 Aug 2020, at 21:57, Dimitry Andric  wrote:
> 
> Author: dim
> Date: Tue Aug 25 19:57:11 2020
> New Revision: 364782
> URL: https://svnweb.freebsd.org/changeset/base/364782
> 
> Log:
>  After r364753, there should be no need to suppress -Watomic-alignment
>  warnings anymore for compiler-rt's atomic.c. This occurred because the
>  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
>  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
>  and that triggers the warning.
> 
>  MFC after:   2 weeks
>  X-MFC-With:  r364753

Forgot to mention, Noticed by: arichardson. :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r364784 - head/lib/libgcc_eh

2020-08-25 Thread Dimitry Andric
Author: dim
Date: Tue Aug 25 20:07:11 2020
New Revision: 364784
URL: https://svnweb.freebsd.org/changeset/base/364784

Log:
  After r364423, which ensures the callbacks that dl_iterate_phdr(3)
  performs are protected by an exclusive lock, even for statically linked
  programs, it is safe to re-enable libunwind's FrameHeaderCache, which I
  temporarily disabled in r364263.
  
  Meanwhile upstream has also used the _LIBUNWIND_USE_FRAME_HEADER_CACHE
  for this purpose, so the only thing needed is to add this as a
  compile-time command line flag.
  
  While here, reformat the CFLAGS lines a little bit.
  
  MFC after:6 weeks
  X-MFC-With:   r364284, r364423

Modified:
  head/lib/libgcc_eh/Makefile.inc

Modified: head/lib/libgcc_eh/Makefile.inc
==
--- head/lib/libgcc_eh/Makefile.inc Tue Aug 25 20:04:35 2020
(r364783)
+++ head/lib/libgcc_eh/Makefile.inc Tue Aug 25 20:07:11 2020
(r364784)
@@ -25,7 +25,10 @@ CFLAGS.${file}+= -fno-exceptions -funwind-tables
 CXXFLAGS.${file}+= -fno-exceptions -funwind-tables
 .endfor
 
-CFLAGS+=   -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY
+CFLAGS+=   -I${UNWINDINCDIR}
+CFLAGS+=   -I${.CURDIR}
+CFLAGS+=   -D_LIBUNWIND_IS_NATIVE_ONLY
+CFLAGS+=   -D_LIBUNWIND_USE_FRAME_HEADER_CACHE
 CXXFLAGS+= -fno-rtti
 CXXSTD?=   c++11
 STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364782 - head/lib/libcompiler_rt

2020-08-25 Thread Dimitry Andric
Author: dim
Date: Tue Aug 25 19:57:11 2020
New Revision: 364782
URL: https://svnweb.freebsd.org/changeset/base/364782

Log:
  After r364753, there should be no need to suppress -Watomic-alignment
  warnings anymore for compiler-rt's atomic.c. This occurred because the
  IS_LOCK_FREE_8 macro was not correctly defined to 0 for mips, and this
  caused the compiler to emit a runtime call to __atomic_is_lock_free(),
  and that triggers the warning.
  
  MFC after:2 weeks
  X-MFC-With:   r364753

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incTue Aug 25 19:04:54 2020
(r364781)
+++ head/lib/libcompiler_rt/Makefile.incTue Aug 25 19:57:11 2020
(r364782)
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-.include 
-
 CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
 
 CRTSRC=${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
@@ -124,10 +122,6 @@ SRCF+= udivti3
 SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
-
-.if "${COMPILER_TYPE}" == "clang"
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
 
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364753 - in head: contrib/llvm-project/compiler-rt/lib/builtins lib/libcompiler_rt sys/sys

2020-08-25 Thread Dimitry Andric
Author: dim
Date: Tue Aug 25 06:49:10 2020
New Revision: 364753
URL: https://svnweb.freebsd.org/changeset/base/364753

Log:
  Add atomic and bswap functions to libcompiler_rt
  
  There have been several mentions on our mailing lists about missing
  atomic functions in our system libraries (e.g. __atomic_load_8 and
  friends), and recently I saw __bswapdi2 and __bswapsi2 mentioned too.
  
  To address this, add implementations for the functions from compiler-rt
  to the system compiler support libraries, e.g. libcompiler_rt.a and and
  libgcc_s.so.
  
  This also needs a small fixup in compiler-rt's atomic.c, to ensure that
  32-bit mips can build correctly.
  
  Bump __FreeBSD_version to make it easier for port maintainers to detect
  when these functions were added.
  
  MFC after:2 weeks
  Differential Revision: https://reviews.freebsd.org/D26159

Modified:
  head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  head/lib/libcompiler_rt/Makefile.inc
  head/sys/sys/param.h

Modified: head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
==
--- head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 
05:15:40 2020(r364752)
+++ head/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c Tue Aug 25 
06:49:10 2020(r364753)
@@ -125,8 +125,8 @@ static __inline Lock *lock_for_pointer(void *ptr) {
 #define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
 #define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
 
-/// 32 bit PowerPC doesn't support 8-byte lock_free atomics
-#if !defined(__powerpc64__) && defined(__powerpc__)
+/// 32 bit MIPS and PowerPC don't support 8-byte lock_free atomics
+#if defined(__mips__) || (!defined(__powerpc64__) && defined(__powerpc__))
 #define IS_LOCK_FREE_8 0
 #else
 #define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incTue Aug 25 05:15:40 2020
(r364752)
+++ head/lib/libcompiler_rt/Makefile.incTue Aug 25 06:49:10 2020
(r364753)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include 
+
 CRTARCH=   ${MACHINE_CPUARCH:C/amd64/x86_64/}
 
 CRTSRC=${SRCTOP}/contrib/llvm-project/compiler-rt/lib/builtins
@@ -18,6 +20,9 @@ SRCF+=ashldi3
 SRCF+= ashlti3
 SRCF+= ashrdi3
 SRCF+= ashrti3
+SRCF+= atomic
+SRCF+= bswapdi2
+SRCF+= bswapsi2
 SRCF+= clear_cache
 SRCF+= clzdi2
 SRCF+= clzsi2
@@ -120,6 +125,10 @@ SRCF+= umoddi3
 SRCF+= umodsi3
 SRCF+= umodti3
 
+.if "${COMPILER_TYPE}" == "clang"
+CFLAGS.atomic.c+=  -Wno-atomic-alignment
+.endif
+
 # Avoid using SSE2 instructions on i386, if unsupported.
 .if ${MACHINE_CPUARCH} == "i386" && empty(MACHINE_CPU:Msse2)
 SRCS+= floatdidf.c
@@ -212,12 +221,6 @@ CFLAGS+=   -DEMIT_SYNC_ATOMICS
 SRCF+= stdatomic
 .endif
 
-.if "${COMPILER_TYPE}" == "clang" && \
-(${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe")
-SRCS+=  atomic.c
-CFLAGS.atomic.c+=  -Wno-atomic-alignment
-.endif
-
 .for file in ${SRCF}
 .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == 
"") \
 && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S)
@@ -239,19 +242,11 @@ SRCS+=aeabi_memmove.S
 SRCS+= aeabi_memset.S
 SRCS+= aeabi_uidivmod.S
 SRCS+= aeabi_uldivmod.S
-SRCS+= bswapdi2.S
-SRCS+= bswapsi2.S
 SRCS+= switch16.S
 SRCS+= switch32.S
 SRCS+= switch8.S
 SRCS+= switchu8.S
 SRCS+= sync_synchronize.S
-.endif
-
-# On some archs GCC-6.3 requires bswap32 built-in.
-.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv"
-SRCS+= bswapdi2.c
-SRCS+= bswapsi2.c
 .endif
 
 .if ${MACHINE_ARCH:Mriscv*sf}

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hTue Aug 25 05:15:40 2020(r364752)
+++ head/sys/sys/param.hTue Aug 25 06:49:10 2020(r364753)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1300112  /* Master, propagated to newvers */
+#define __FreeBSD_version 1300113  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364733 - head/share/mk

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 20:40:26 2020
New Revision: 364733
URL: https://svnweb.freebsd.org/changeset/base/364733

Log:
  After r364732, we can now enable MK_OPENMP for aarch64 by default.
  
  PR:   248864
  MFC after:2 weeks

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Mon Aug 24 20:37:18 2020(r364732)
+++ head/share/mk/src.opts.mk   Mon Aug 24 20:40:26 2020(r364733)
@@ -359,7 +359,8 @@ BROKEN_OPTIONS+=HYPERV
 BROKEN_OPTIONS+=NVME
 .endif
 
-.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc64"
+.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \
+${__T} == "powerpc64"
 __DEFAULT_YES_OPTIONS+=OPENMP
 .else
 __DEFAULT_NO_OPTIONS+=OPENMP
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364732 - head/contrib/llvm-project/openmp/runtime/src

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 20:37:18 2020
New Revision: 364732
URL: https://svnweb.freebsd.org/changeset/base/364732

Log:
  Merge commit cde8f4c16 from llvm git (by me):
  
Move special va_list handling to kmp_os.h
  
Instead of copying and pasting the same #ifdef expressions in
multiple places, define a type and a pair of macros in kmp_os.h, to
handle whether va_list is pointer-like or not:
  
* kmp_va_list is the type to use for __kmp_fork_call()
* kmp_va_deref() dereferences a va_list, if necessary
* kmp_va_addr_of() takes the address of a va_list, if necessary
  
Also add FreeBSD to the list of OSes that has a non pointer-like
va_list. This can now be easily extended to other OSes too.
  
Reviewed By: AndreyChurbanov
  
Differential Revision: https://reviews.llvm.org/D86397
  
  This should enable building of LLVM's OpenMP on AArch64. Addition to
  share/mk will follow in a subsequent commit.
  
  PR:   248864
  MFC after:2 weeks

Modified:
  head/contrib/llvm-project/openmp/runtime/src/kmp.h
  head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
  head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
  head/contrib/llvm-project/openmp/runtime/src/kmp_os.h
  head/contrib/llvm-project/openmp/runtime/src/kmp_runtime.cpp

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp.h
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp.h  Mon Aug 24 20:28:21 
2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp.h  Mon Aug 24 20:37:18 
2020(r364732)
@@ -3459,13 +3459,7 @@ enum fork_context_e {
 extern int __kmp_fork_call(ident_t *loc, int gtid,
enum fork_context_e fork_context, kmp_int32 argc,
microtask_t microtask, launch_t invoker,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   va_list *ap
-#else
-   va_list ap
-#endif
-   );
+   kmp_va_list ap);
 
 extern void __kmp_join_call(ident_t *loc, int gtid
 #if OMPT_SUPPORT

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp   Mon Aug 
24 20:28:21 2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_csupport.cpp   Mon Aug 
24 20:37:18 2020(r364732)
@@ -308,13 +308,7 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, km
 __kmp_fork_call(loc, gtid, fork_context_intel, argc,
 VOLATILE_CAST(microtask_t) microtask, // "wrapped" task
 VOLATILE_CAST(launch_t) __kmp_invoke_task_func,
-/* TODO: revert workaround for Intel(R) 64 tracker #96 */
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-
-#else
-ap
-#endif
-);
+kmp_va_addr_of(ap));
 #if INCLUDE_SSC_MARKS
 SSC_MARK_JOINING();
 #endif
@@ -408,16 +402,10 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, k
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nteams >= 1);
   KMP_DEBUG_ASSERT(this_thr->th.th_teams_size.nth >= 1);
 
-  __kmp_fork_call(loc, gtid, fork_context_intel, argc,
-  VOLATILE_CAST(microtask_t)
-  __kmp_teams_master, // "wrapped" task
-  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-  
-#else
-  ap
-#endif
-  );
+  __kmp_fork_call(
+  loc, gtid, fork_context_intel, argc,
+  VOLATILE_CAST(microtask_t) __kmp_teams_master, // "wrapped" task
+  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master, kmp_va_addr_of(ap));
   __kmp_join_call(loc, gtid
 #if OMPT_SUPPORT
   ,

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp
==
--- head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp   Mon Aug 
24 20:28:21 2020(r364731)
+++ head/contrib/llvm-project/openmp/runtime/src/kmp_gsupport.cpp   Mon Aug 
24 20:37:18 2020(r364732)
@@ -376,13 +376,7 @@ static
   va_start(ap, argc);
 
   rc = __kmp_fork_call(loc, gtid, fork_context_gnu, argc, wrapper,
-   __kmp_invoke_task_func,
-#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
-   
-#else
-   ap
-#endif
-   );
+   __kmp_invoke_task_func, kmp_va_addr_of(ap));
 
   va_end(ap);
 

Modified: head/contrib/llvm-project/openmp/runtime/src/kmp_os.h

svn commit: r364718 - in head: contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic...

2020-08-24 Thread Dimitry Andric
Author: dim
Date: Mon Aug 24 17:43:23 2020
New Revision: 364718
URL: https://svnweb.freebsd.org/changeset/base/364718

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  release/11.x llvmorg-11.0.0-rc2-0-g414f32a9e86.
  
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h
  head/contrib/llvm-project/clang/include/clang/Driver/Options.td
  head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/OSTargets.h
  head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  head/contrib/llvm-project/clang/lib/Basic/Targets/Sparc.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/WebAssembly.h
  head/contrib/llvm-project/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/libunwind/src/AddressSpace.hpp
  head/contrib/llvm-project/lld/docs/ReleaseNotes.rst
  head/contrib/llvm-project/lld/docs/conf.py
  head/contrib/llvm-project/llvm/include/llvm/MC/MCDwarf.h
  head/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  head/contrib/llvm-project/llvm/lib/Support/X86TargetParser.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64RegisterInfo.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64StackOffset.h
  head/contrib/llvm-project/llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  
head/contrib/llvm-project/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/libunwind/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h
==
--- head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 
24 17:31:17 2020(r364717)
+++ head/contrib/llvm-project/clang/include/clang/Basic/TargetOptions.h Mon Aug 
24 17:43:23 2020(r364718)
@@ -54,6 +54,10 @@ class TargetOptions { (public)
   /// be a list of strings starting with by '+' or '-'.
   std::vector Features;
 
+  /// The map of which features have been enabled disabled based on the command
+  /// line.
+  llvm::StringMap FeatureMap;
+
   /// Supported OpenCL extensions and optional core features.
   OpenCLOptions SupportedOpenCLOptions;
 

Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td
==
--- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 
24 17:31:17 2020(r364717)
+++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Mon Aug 
24 17:43:23 2020(r364718)
@@ -1780,7 +1780,7 @@ def fstack_protector_all : Flag<["-"], "fstack-protect
   HelpText<"Enable stack protectors for all functions">;
 def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, 
Group, Flags<[CC1Option]>,
   HelpText<"Enable stack clash protection">;
-def fnostack_clash_protection : Flag<["-"], "fnostack-clash-protection">, 
Group,
+def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, 
Group,
   HelpText<"Disable stack clash protection">;
 def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, 
Group,
   HelpText<"Enable stack protectors for some functions vulnerable to stack 
smashing. "

Modified: head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp
==
--- head/contrib/llvm-project/clang/lib/AST/ASTContext.cpp  Mon Aug 24 
17:31:17 2020(r364717)
+++ 

svn commit: r364485 - head/lib/clang/libllvm

2020-08-22 Thread Dimitry Andric
Author: dim
Date: Sat Aug 22 15:31:56 2020
New Revision: 364485
URL: https://svnweb.freebsd.org/changeset/base/364485

Log:
  Add a missed source file for LLVM's BPF target. This target is not
  enabled by default, so I forgot about it, apologies for the breakage.
  
  Reported by:  hrs
  MFC after:6 weeks
  X-MFC-With:   r364284

Modified:
  head/lib/clang/libllvm/Makefile

Modified: head/lib/clang/libllvm/Makefile
==
--- head/lib/clang/libllvm/Makefile Sat Aug 22 14:39:14 2020
(r364484)
+++ head/lib/clang/libllvm/Makefile Sat Aug 22 15:31:56 2020
(r364485)
@@ -1134,6 +1134,7 @@ SRCS_MIN+=Target/BPF/BPFMCInstLower.cpp
 SRCS_MIN+= Target/BPF/BPFMIChecking.cpp
 SRCS_MIN+= Target/BPF/BPFMIPeephole.cpp
 SRCS_MIN+= Target/BPF/BPFMISimplifyPatchable.cpp
+SRCS_MIN+= Target/BPF/BPFPreserveDIType.cpp
 SRCS_MIN+= Target/BPF/BPFRegisterInfo.cpp
 SRCS_MIN+= Target/BPF/BPFSelectionDAGInfo.cpp
 SRCS_MIN+= Target/BPF/BPFSubtarget.cpp
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r364438 - in head/cddl: contrib/opensolaris/lib/libdtrace/common usr.sbin/dtrace/tests/tools

2020-08-22 Thread Dimitry Andric
On 22 Aug 2020, at 16:27, Mark Johnston  wrote:
> 
> On Sat, Aug 22, 2020 at 12:40:49PM +0200, Antoine Brodin wrote:
>> On Thu, Aug 20, 2020 at 9:28 PM Mark Johnston  wrote:
>>> 
>>> Author: markj
>>> Date: Thu Aug 20 19:28:19 2020
>>> New Revision: 364438
>>> URL: https://svnweb.freebsd.org/changeset/base/364438
>>> 
>>> Log:
>>>  Enable creation of static userspace probes in incremental builds.
>>> 
>>>  To define USDT probes, dtrace -G makes use of relocations for undefined
>>>  symbols: the target address is overwritten with NOPs and the location is
>>>  recorded in the DOF section of the output object file.  To avoid link
>>>  errors, the original relocation is destroyed.  However, this means that
>>>  the same input object file cannot be processed multiple times, as
>>>  happens during incremental rebuilds.  Instead, only set the relocation
>>>  type to NONE, so that all information required to reconstruct USDT
>>>  probes is preserved.
>>> 
>>>  Reported by:  bdrewery
>>>  MFC after:3 weeks
>>>  Sponsored by: The FreeBSD Foundation
>>> 
>>> Modified:
>>>  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
>>>  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
>>>  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.h
>>>  head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
>> 
>> Hi,
>> 
>> This change seems broken on i386:
>> 
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5-devel-5.33.0.262.log
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5.28-5.28.3.log
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5.30-5.30.3.log
>> http://beefy17.nyi.freebsd.org/data/head-i386-default/p545731_s364466/logs/perl5-5.32.0.log
> 
> The links are dead, but I think the problem should be fixed by r364483.

They work, but only over IPv6, unfortunately. :-)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r364482 - head/lib/libc++

2020-08-22 Thread Dimitry Andric
On 22 Aug 2020, at 16:07, Shawn Webb  wrote:
> 
> On Sat, Aug 22, 2020 at 12:05:11PM +, Dimitry Andric wrote:
>> Author: dim
>> Date: Sat Aug 22 12:05:11 2020
>> New Revision: 364482
>> URL: https://svnweb.freebsd.org/changeset/base/364482
>> 
>> Log:
>>  Add a few new source files to libc++, in particular the implementation
>>  part of std::random_shuffle. These were split off at some point by
>>  upstream, but I forgot to add them to our Makefile.
>> 
>>  This should allow some ports which use std::random_shuffle to correctly
>>  link again.
>> 
>>  Reported by:thierry
>>  PR: 248795
>>  MFC after:  6 weeks
>>  X-MFX-With: r364284
>> 
>> Modified:
>>  head/lib/libc++/Makefile
>> 
>> Modified: head/lib/libc++/Makefile
>> ==
>> --- head/lib/libc++/Makefile Sat Aug 22 11:59:14 2020(r364481)
>> +++ head/lib/libc++/Makefile Sat Aug 22 12:05:11 2020(r364482)
>> @@ -16,6 +16,8 @@ SHLIB_LDSCRIPT=libc++.ldscript
>> 
>> SRCS+=   algorithm.cpp
>> SRCS+=   any.cpp
>> +SRCS+=  atomic.cpp
>> +SRCS+=  barrier.cpp
>> SRCS+=   bind.cpp
>> SRCS+=   charconv.cpp
>> SRCS+=   chrono.cpp
>> @@ -38,6 +40,7 @@ SRCS+= mutex_destructor.cpp
>> SRCS+=   new.cpp
>> SRCS+=   optional.cpp
>> SRCS+=   random.cpp
>> +SRCS+=  random_shuffle.cpp
>> SRCS+=   regex.cpp
>> SRCS+=   shared_mutex.cpp
>> SRCS+=   stdexcept.cpp
> 
> There's also these files:
> 
> https://github.com/HardenedBSD/hardenedBSD/commit/9410e679cc7888311f6efaf251f8d9a311c5b19d

We intentionally don't build a number of the lldb plugins, so these
should not be needed. Did you get build failures otherwise?

In case you require the full lldb functionality, it is better to install
the port.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r364482 - head/lib/libc++

2020-08-22 Thread Dimitry Andric
On 22 Aug 2020, at 14:05, Dimitry Andric  wrote:
> 
> Author: dim
> Date: Sat Aug 22 12:05:11 2020
> New Revision: 364482
> URL: https://svnweb.freebsd.org/changeset/base/364482
> 
> Log:
>  Add a few new source files to libc++, in particular the implementation
>  part of std::random_shuffle. These were split off at some point by
>  upstream, but I forgot to add them to our Makefile.
> 
>  This should allow some ports which use std::random_shuffle to correctly
>  link again.
> 
>  Reported by: thierry
>  PR:  248795

Oops, the first reporter was actually tobik (Tobias Kortkamp)!

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r364482 - head/lib/libc++

2020-08-22 Thread Dimitry Andric
Author: dim
Date: Sat Aug 22 12:05:11 2020
New Revision: 364482
URL: https://svnweb.freebsd.org/changeset/base/364482

Log:
  Add a few new source files to libc++, in particular the implementation
  part of std::random_shuffle. These were split off at some point by
  upstream, but I forgot to add them to our Makefile.
  
  This should allow some ports which use std::random_shuffle to correctly
  link again.
  
  Reported by:  thierry
  PR:   248795
  MFC after:6 weeks
  X-MFX-With:   r364284

Modified:
  head/lib/libc++/Makefile

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileSat Aug 22 11:59:14 2020(r364481)
+++ head/lib/libc++/MakefileSat Aug 22 12:05:11 2020(r364482)
@@ -16,6 +16,8 @@ SHLIB_LDSCRIPT=   libc++.ldscript
 
 SRCS+= algorithm.cpp
 SRCS+= any.cpp
+SRCS+= atomic.cpp
+SRCS+= barrier.cpp
 SRCS+= bind.cpp
 SRCS+= charconv.cpp
 SRCS+= chrono.cpp
@@ -38,6 +40,7 @@ SRCS+=mutex_destructor.cpp
 SRCS+= new.cpp
 SRCS+= optional.cpp
 SRCS+= random.cpp
+SRCS+= random_shuffle.cpp
 SRCS+= regex.cpp
 SRCS+= shared_mutex.cpp
 SRCS+= stdexcept.cpp
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364480 - head/contrib/llvm-project/lldb/source/Target

2020-08-22 Thread Dimitry Andric
Author: dim
Date: Sat Aug 22 10:55:55 2020
New Revision: 364480
URL: https://svnweb.freebsd.org/changeset/base/364480

Log:
  Merge commit 1ce07cd614be from llvm git (by me):
  
Instantiate Error in Target::GetEntryPointAddress() only when
necessary
  
When Target::GetEntryPointAddress() calls
exe_module->GetObjectFile()->GetEntryPointAddress(), and the returned
entry_addr is valid, it can immediately be returned.
  
However, just before that, an llvm::Error value has been setup, but
in this case it is not consumed before returning, like is done
further below in the function.
  
In https://bugs.freebsd.org/248745 we got a bug report for this,
where a very simple test case aborts and dumps core:
  
* thread #1, name = 'testcase', stop reason = breakpoint 1.1
frame #0: 0x002018d4 testcase`main(argc=1, 
argv=0x7fffea18) at testcase.c:3:5
   1int main(int argc, char *argv[])
   2{
-> 3return 0;
   4}
(lldb) p argc
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior 
to being destroyed).
  
Thread 1 received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3   thr_kill.S: No such file or directory.
(gdb) bt
#0  thr_kill () at thr_kill.S:3
#1  0x0008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67
#3  0x0451b5f5 in fatalUncheckedError () at 
/usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112
#4  0x019cf008 in GetEntryPointAddress () at 
/usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267
#5  0x01bccbd8 in ConstructorSetup () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67
#6  0x01bcd2c0 in ThreadPlanCallFunction () at 
/usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114
#7  0x020076d4 in InferiorCallMmap () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97
#8  0x01f4be33 in DoAllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604
#9  0x01fe51b9 in AllocatePage () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347
#10 0x01fe5385 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383
#11 0x01974da2 in AllocateMemory () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301
#12 CanJIT () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331
#13 0x01a1bf3d in Evaluate () at 
/usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190
#14 0x019ce7a2 in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372
#15 0x01ad784c in EvaluateExpression () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414
#16 0x01ad86ae in DoExecute () at 
/usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646
#17 0x01a5e3ed in Execute () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003
#18 0x01a6c4a3 in HandleCommand () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762
#19 0x01a6f98c in IOHandlerInputComplete () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760
#20 0x01a90b08 in Run () at 
/usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548
#21 0x019a6c6a in ExecuteIOHandlers () at 
/usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903
#22 0x01a70337 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946
#23 0x01d9d812 in RunCommandInterpreter () at 
/usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169
#24 0x01918be8 in MainLoop () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675
#25 0x0191a114 in main () at 
/usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890
  
Fix the incorrect error catch by only instantiating an Error object
if it is necessary.
  
Reviewed By: JDevlieghere
  
Differential Revision: https://reviews.llvm.org/D86355
  
  This should fix lldb aborting as described in the scenario above.
  
  Reported by:  dmgk
  PR:   248745

Modified:
  head/contrib/llvm-project/lldb/source/Target/Target.cpp

Modified: head/contrib/llvm-project/lldb/source/Target/Target.cpp
==
--- head/contrib/llvm-project/lldb/source/Target/Target.cpp Sat Aug 22 
07:43:38 2020

svn commit: r364455 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-08-21 Thread Dimitry Andric
Author: dim
Date: Fri Aug 21 10:06:01 2020
New Revision: 364455
URL: https://svnweb.freebsd.org/changeset/base/364455

Log:
  Merge commit 95e18b2d9d5f from llvm git (by Kang Zhang):
  
[PowerPC] Fix a typo for InstAlias of mfsprg
  
D77531 has a type for mfsprg, it should be mtsprg. This patch is to
fix this typo.
  
  This should fix booting powerpc64 kernels, after LLVM 11 was imported.
  
  PR:   248763

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td  Fri Aug 
21 09:50:03 2020(r364454)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td  Fri Aug 
21 10:06:01 2020(r364455)
@@ -1026,8 +1026,8 @@ def : InstAlias<"mfamr $Rx", (MFSPR8 g8rc:$Rx, 29)>;
 foreach SPRG = 0-3 in {
   def : InstAlias<"mfsprg $RT, "#SPRG, (MFSPR8 g8rc:$RT, !add(SPRG, 272))>;
   def : InstAlias<"mfsprg"#SPRG#" $RT", (MFSPR8 g8rc:$RT, !add(SPRG, 272))>;
-  def : InstAlias<"mfsprg "#SPRG#", $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
-  def : InstAlias<"mfsprg"#SPRG#" $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
+  def : InstAlias<"mtsprg "#SPRG#", $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
+  def : InstAlias<"mtsprg"#SPRG#" $RT", (MTSPR8 !add(SPRG, 272), g8rc:$RT)>;
 }
 
 def : InstAlias<"mfasr $RT", (MFSPR8 g8rc:$RT, 280)>;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364435 - head/usr.sbin/kldxref

2020-08-20 Thread Dimitry Andric
Author: dim
Date: Thu Aug 20 18:50:46 2020
New Revision: 364435
URL: https://svnweb.freebsd.org/changeset/base/364435

Log:
  Bump kldxref's MAXSEGS to 16, to stop complaints about the kernel
  supposedly having too many segments, when lld 11 links it. Such kernels
  should load just fine.
  
  Note that we may still do some tweaking of our kernel linker scripts, to
  lower the number of segments, although the exact benefit is not entirely
  clear.

Modified:
  head/usr.sbin/kldxref/ef.c

Modified: head/usr.sbin/kldxref/ef.c
==
--- head/usr.sbin/kldxref/ef.c  Thu Aug 20 18:31:50 2020(r364434)
+++ head/usr.sbin/kldxref/ef.c  Thu Aug 20 18:50:46 2020(r364435)
@@ -49,7 +49,7 @@
 
 #include "ef.h"
 
-#defineMAXSEGS 3
+#defineMAXSEGS 16
 struct ef_file {
char*ef_name;
struct elf_file *ef_efile;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364400 - head/lib/clang

2020-08-19 Thread Dimitry Andric
Author: dim
Date: Wed Aug 19 17:05:30 2020
New Revision: 364400
URL: https://svnweb.freebsd.org/changeset/base/364400

Log:
  Fix the mips64 world build after r364284.
  
  Linking the full version of clang 11 results in errors similar to:
  
  lld: error: 
/usr/src/contrib/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:736:(.text._ZN5clang4ento22CreateAnalysisConsumerERNS_16CompilerInstanceE+0xE0):
 relocation R_MIPS_CALL16 out of range: 48920 is not in [-32768, 32767]; 
references operator new(unsigned long)
  
  Add -mxgot to the compilation flags for llvm libraries to work around
  this error. This may be too big of a hammer, but it can always be
  refined later.
  
  MFC after:6 weeks

Modified:
  head/lib/clang/llvm.build.mk

Modified: head/lib/clang/llvm.build.mk
==
--- head/lib/clang/llvm.build.mkWed Aug 19 16:09:36 2020
(r364399)
+++ head/lib/clang/llvm.build.mkWed Aug 19 17:05:30 2020
(r364400)
@@ -106,3 +106,8 @@ CXXSTD?=c++14
 CXXFLAGS+= -fno-exceptions
 CXXFLAGS+= -fno-rtti
 CXXFLAGS.clang+= -stdlib=libc++
+
+.if ${MACHINE_ARCH:Mmips64}
+STATIC_CFLAGS+= -mxgot
+STATIC_CXXFLAGS+= -mxgot
+.endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364314 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-08-17 Thread Dimitry Andric
Author: dim
Date: Mon Aug 17 16:37:46 2020
New Revision: 364314
URL: https://svnweb.freebsd.org/changeset/base/364314

Log:
  Merge commit 4d52ebb9b9c7 from llvm git (by Chen Zheng):
  
[PowerPC] Make StartMI ignore COPY like instructions.
  
Reviewed By: lkail
  
Differential Revision: https://reviews.llvm.org/D85659
  
  This fixes an assertion failure when building world for powerpc. It was
  reported upstream as .

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.h

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp  Mon Aug 
17 16:34:10 2020(r364313)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp  Mon Aug 
17 16:37:46 2020(r364314)
@@ -2653,22 +2653,35 @@ const unsigned *PPCInstrInfo::getLoadOpcodesForSpillAr
   return LoadSpillOpcodesArray[getSpillTarget()];
 }
 
-void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr , MachineInstr 
,
+void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr *StartMI, MachineInstr 
*EndMI,
  unsigned RegNo) const {
   // Conservatively clear kill flag for the register if the instructions are in
   // different basic blocks and in SSA form, because the kill flag may no 
longer
   // be right. There is no need to bother with dead flags since defs with no
   // uses will be handled by DCE.
-  MachineRegisterInfo  = StartMI.getParent()->getParent()->getRegInfo();
-  if (MRI.isSSA() && (StartMI.getParent() != EndMI.getParent())) {
+  MachineRegisterInfo  = StartMI->getParent()->getParent()->getRegInfo();
+  if (MRI.isSSA() && (StartMI->getParent() != EndMI->getParent())) {
 MRI.clearKillFlags(RegNo);
 return;
   }
 
   // Instructions between [StartMI, EndMI] should be in same basic block.
-  assert((StartMI.getParent() == EndMI.getParent()) &&
+  assert((StartMI->getParent() == EndMI->getParent()) &&
  "Instructions are not in same basic block");
 
+  // If before RA, StartMI may be def through COPY, we need to adjust it to the
+  // real def. See function getForwardingDefMI.
+  if (MRI.isSSA()) {
+bool Reads, Writes;
+std::tie(Reads, Writes) = StartMI->readsWritesVirtualRegister(RegNo);
+if (!Reads && !Writes) {
+  assert(Register::isVirtualRegister(RegNo) &&
+ "Must be a virtual register");
+  // Get real def and ignore copies.
+  StartMI = MRI.getVRegDef(RegNo);
+}
+  }
+
   bool IsKillSet = false;
 
   auto clearOperandKillInfo = [=] (MachineInstr , unsigned Index) {
@@ -2681,21 +2694,21 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr 
   // Set killed flag for EndMI.
   // No need to do anything if EndMI defines RegNo.
   int UseIndex =
-  EndMI.findRegisterUseOperandIdx(RegNo, false, ());
+  EndMI->findRegisterUseOperandIdx(RegNo, false, ());
   if (UseIndex != -1) {
-EndMI.getOperand(UseIndex).setIsKill(true);
+EndMI->getOperand(UseIndex).setIsKill(true);
 IsKillSet = true;
 // Clear killed flag for other EndMI operands related to RegNo. In some
 // upexpected cases, killed may be set multiple times for same register
 // operand in same MI.
-for (int i = 0, e = EndMI.getNumOperands(); i != e; ++i)
+for (int i = 0, e = EndMI->getNumOperands(); i != e; ++i)
   if (i != UseIndex)
-clearOperandKillInfo(EndMI, i);
+clearOperandKillInfo(*EndMI, i);
   }
 
   // Walking the inst in reverse order (EndMI -> StartMI].
-  MachineBasicBlock::reverse_iterator It = EndMI;
-  MachineBasicBlock::reverse_iterator E = EndMI.getParent()->rend();
+  MachineBasicBlock::reverse_iterator It = *EndMI;
+  MachineBasicBlock::reverse_iterator E = EndMI->getParent()->rend();
   // EndMI has been handled above, skip it here.
   It++;
   MachineOperand *MO = nullptr;
@@ -2721,13 +2734,13 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr 
   } else if ((MO = It->findRegisterDefOperand(RegNo, false, true,
   ( {
 // No use found, set dead for its def.
-assert(&*It ==  && "No new def between StartMI and EndMI.");
+assert(&*It == StartMI && "No new def between StartMI and EndMI.");
 MO->setIsDead(true);
 break;
   }
 }
 
-if ((&*It) == )
+if ((&*It) == StartMI)
   break;
   }
   // Ensure RegMo liveness is killed after EndMI.
@@ -3858,7 +3871,7 @@ bool PPCInstrInfo::simplifyToLI(MachineInstr , Mach
 // ForwardingOperandReg = LI imm1
 // y = op2 imm2, ForwardingOperandReg(killed)
 if (IsForwardingOperandKilled)
-  fixupIsDeadOrKill(DefMI, MI, ForwardingOperandReg);
+  fixupIsDeadOrKill(, , ForwardingOperandReg);
 
 LLVM_DEBUG(dbgs() << "With:\n");
 

svn commit: r364313 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-08-17 Thread Dimitry Andric
Author: dim
Date: Mon Aug 17 16:34:10 2020
New Revision: 364313
URL: https://svnweb.freebsd.org/changeset/base/364313

Log:
  Revert r364275, for reapplying the final upstream fix:
  
  Tentatively apply https://reviews.llvm.org/D85659, which fixes an
  assertion failure when building world for powerpc. This has been
  reported upstream as .

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.h

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp  Mon Aug 
17 16:28:59 2020(r364312)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp  Mon Aug 
17 16:34:10 2020(r364313)
@@ -2653,31 +2653,22 @@ const unsigned *PPCInstrInfo::getLoadOpcodesForSpillAr
   return LoadSpillOpcodesArray[getSpillTarget()];
 }
 
-void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr *StartMI, MachineInstr 
*EndMI,
+void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr , MachineInstr 
,
  unsigned RegNo) const {
   // Conservatively clear kill flag for the register if the instructions are in
   // different basic blocks and in SSA form, because the kill flag may no 
longer
   // be right. There is no need to bother with dead flags since defs with no
   // uses will be handled by DCE.
-  MachineRegisterInfo  = StartMI->getParent()->getParent()->getRegInfo();
-  if (MRI.isSSA() && (StartMI->getParent() != EndMI->getParent())) {
+  MachineRegisterInfo  = StartMI.getParent()->getParent()->getRegInfo();
+  if (MRI.isSSA() && (StartMI.getParent() != EndMI.getParent())) {
 MRI.clearKillFlags(RegNo);
 return;
   }
 
   // Instructions between [StartMI, EndMI] should be in same basic block.
-  assert((StartMI->getParent() == EndMI->getParent()) &&
+  assert((StartMI.getParent() == EndMI.getParent()) &&
  "Instructions are not in same basic block");
 
-  // If before RA, StartMI may be def through copy, we need to adjust it to the
-  // real def. See function getForwardingDefMI.
-  if (MRI.isSSA() && StartMI->findRegisterUseOperandIdx(RegNo) < 0 &&
-  StartMI->findRegisterDefOperandIdx(RegNo) < 0) {
-assert(Register::isVirtualRegister(RegNo) && "Must be a virtual register");
-// Get real def and ignore copies.
-StartMI = MRI.getVRegDef(RegNo);
-  }
-
   bool IsKillSet = false;
 
   auto clearOperandKillInfo = [=] (MachineInstr , unsigned Index) {
@@ -2690,21 +2681,21 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr *Sta
   // Set killed flag for EndMI.
   // No need to do anything if EndMI defines RegNo.
   int UseIndex =
-  EndMI->findRegisterUseOperandIdx(RegNo, false, ());
+  EndMI.findRegisterUseOperandIdx(RegNo, false, ());
   if (UseIndex != -1) {
-EndMI->getOperand(UseIndex).setIsKill(true);
+EndMI.getOperand(UseIndex).setIsKill(true);
 IsKillSet = true;
 // Clear killed flag for other EndMI operands related to RegNo. In some
 // upexpected cases, killed may be set multiple times for same register
 // operand in same MI.
-for (int i = 0, e = EndMI->getNumOperands(); i != e; ++i)
+for (int i = 0, e = EndMI.getNumOperands(); i != e; ++i)
   if (i != UseIndex)
-clearOperandKillInfo(*EndMI, i);
+clearOperandKillInfo(EndMI, i);
   }
 
   // Walking the inst in reverse order (EndMI -> StartMI].
-  MachineBasicBlock::reverse_iterator It = *EndMI;
-  MachineBasicBlock::reverse_iterator E = EndMI->getParent()->rend();
+  MachineBasicBlock::reverse_iterator It = EndMI;
+  MachineBasicBlock::reverse_iterator E = EndMI.getParent()->rend();
   // EndMI has been handled above, skip it here.
   It++;
   MachineOperand *MO = nullptr;
@@ -2730,13 +2721,13 @@ void PPCInstrInfo::fixupIsDeadOrKill(MachineInstr *Sta
   } else if ((MO = It->findRegisterDefOperand(RegNo, false, true,
   ( {
 // No use found, set dead for its def.
-assert(&*It == StartMI && "No new def between StartMI and EndMI.");
+assert(&*It ==  && "No new def between StartMI and EndMI.");
 MO->setIsDead(true);
 break;
   }
 }
 
-if ((&*It) == StartMI)
+if ((&*It) == )
   break;
   }
   // Ensure RegMo liveness is killed after EndMI.
@@ -3867,7 +3858,7 @@ bool PPCInstrInfo::simplifyToLI(MachineInstr , Mach
 // ForwardingOperandReg = LI imm1
 // y = op2 imm2, ForwardingOperandReg(killed)
 if (IsForwardingOperandKilled)
-  fixupIsDeadOrKill(, , ForwardingOperandReg);
+  fixupIsDeadOrKill(DefMI, MI, ForwardingOperandReg);
 
 LLVM_DEBUG(dbgs() << "With:\n");
 LLVM_DEBUG(MI.dump());
@@ -3959,9 +3950,9 @@ bool PPCInstrInfo::transformToNewImmFormFedByAdd(
 
 // Update kill flag
 if 

svn commit: r364081 - in head/lib/libclang_rt: fuzzer profile xray

2020-08-10 Thread Dimitry Andric
Author: dim
Date: Mon Aug 10 16:55:54 2020
New Revision: 364081
URL: https://svnweb.freebsd.org/changeset/base/364081

Log:
  Follow-up to r358851 (llvm-project 10.0.0-rc3 import), where I added
  subdirectories for compiler-rt's internal fuzzer, profile and xray
  headers, but forgot to add installing those headers themselves.
  
  MFC after:3 days

Modified:
  head/lib/libclang_rt/fuzzer/Makefile
  head/lib/libclang_rt/profile/Makefile
  head/lib/libclang_rt/xray/Makefile

Modified: head/lib/libclang_rt/fuzzer/Makefile
==
--- head/lib/libclang_rt/fuzzer/MakefileMon Aug 10 12:28:56 2020
(r364080)
+++ head/lib/libclang_rt/fuzzer/MakefileMon Aug 10 16:55:54 2020
(r364081)
@@ -23,4 +23,8 @@ SRCS+=fuzzer/FuzzerUtil.cpp
 SRCS+= fuzzer/FuzzerUtilLinux.cpp
 SRCS+= fuzzer/FuzzerUtilPosix.cpp
 
+.PATH: ${CRTSRC}/include/fuzzer
+INCSDIR=   ${CLANGDIR}/include/fuzzer
+INCS+= FuzzedDataProvider.h
+
 .include 

Modified: head/lib/libclang_rt/profile/Makefile
==
--- head/lib/libclang_rt/profile/Makefile   Mon Aug 10 12:28:56 2020
(r364080)
+++ head/lib/libclang_rt/profile/Makefile   Mon Aug 10 16:55:54 2020
(r364081)
@@ -25,4 +25,8 @@ SRCS+=profile/InstrProfilingUtil.c
 SRCS+= profile/InstrProfilingValue.c
 SRCS+= profile/InstrProfilingWriter.c
 
+.PATH: ${CRTSRC}/include/profile
+INCSDIR=   ${CLANGDIR}/include/profile
+INCS+= InstrProfData.inc
+
 .include 

Modified: head/lib/libclang_rt/xray/Makefile
==
--- head/lib/libclang_rt/xray/Makefile  Mon Aug 10 12:28:56 2020
(r364080)
+++ head/lib/libclang_rt/xray/Makefile  Mon Aug 10 16:55:54 2020
(r364081)
@@ -41,4 +41,10 @@ SRCS+=   xray/xray_trampoline_x86_64.S
 SRCS+= xray/xray_utils.cpp
 SRCS+= xray/xray_x86_64.cpp
 
+.PATH: ${CRTSRC}/include/xray
+INCSDIR=   ${CLANGDIR}/include/xray
+INCS+= xray_interface.h
+INCS+= xray_log_interface.h
+INCS+= xray_records.h
+
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364050 - head/tests/sys/net/routing

2020-08-08 Thread Dimitry Andric
Author: dim
Date: Sat Aug  8 11:06:27 2020
New Revision: 364050
URL: https://svnweb.freebsd.org/changeset/base/364050

Log:
  Use static inline for iface_{setup,delete}_addr in tests/sys/net/routing.
  
  This fixes possible link errors, similar to:
  
  ld: error: undefined symbol: iface_setup_addr
  >>> referenced by test_rtsock_l3.c:111 
(tests/sys/net/routing/test_rtsock_l3.c:111)
  >>>   test_rtsock_l3.o:(presetup_ipv4)
  >>> referenced by test_rtsock_l3.c:79 
(tests/sys/net/routing/test_rtsock_l3.c:79)
  >>>   test_rtsock_l3.o:(presetup_ipv6)
  >>> referenced by test_rtsock_l3.c:512 
(tests/sys/net/routing/test_rtsock_l3.c:512)
  >>>   test_rtsock_l3.o:(atfu_rtm_change_v4_gw_success_body)
  >>> referenced 10 more times
  
  In C (not C++), 'naked' inline is almost always a mistake. Either use
  static inline (this is appropriate for most cases), or extern inline.
  
  MFC after:3 days

Modified:
  head/tests/sys/net/routing/rtsock_common.h

Modified: head/tests/sys/net/routing/rtsock_common.h
==
--- head/tests/sys/net/routing/rtsock_common.h  Sat Aug  8 10:05:27 2020
(r364049)
+++ head/tests/sys/net/routing/rtsock_common.h  Sat Aug  8 11:06:27 2020
(r364050)
@@ -204,7 +204,7 @@ iface_open(char *ifname)
  * Sets primary IPv4 addr.
  * Returns 0 on success.
  */
-inline int
+static inline int
 iface_setup_addr(char *ifname, char *addr, int plen)
 {
char cmd[512];
@@ -225,7 +225,7 @@ iface_setup_addr(char *ifname, char *addr, int plen)
  * Removes primary IPv4 prefix.
  * Returns 0 on success.
  */
-inline int
+static inline int
 iface_delete_addr(char *ifname, char *addr)
 {
char cmd[512];
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r364040 - head/sys/powerpc/aim

2020-08-07 Thread Dimitry Andric
Author: dim
Date: Fri Aug  7 19:32:54 2020
New Revision: 364040
URL: https://svnweb.freebsd.org/changeset/base/364040

Log:
  Fix clang 11 inline asm constraint error when building powerpc GENERIC64
  kernels:
  
  sys/powerpc/aim/mmu_radix.c:728:19: error: invalid operand for inline asm 
constraint 'i'
  __asm __volatile(PPC_TLBIEL(%0, %1, %2, %3, 1)
   ^
  sys/powerpc/aim/mmu_radix.c:149:3: note: expanded from macro 'PPC_TLBIEL'
   __XSTRING(.long PPC_INST_TLBIEL | \
   ^
  sys/sys/cdefs.h:161:22: note: expanded from macro '__XSTRING'
  #define __XSTRING(x)__STRING(x) /* expand x, then stringify */
  ^
  sys/sys/cdefs.h:160:21: note: expanded from macro '__STRING'
  #define __STRING(x) #x  /* stringify without expanding x */
  ^
  :112:1: note: expanded from here
  ".long 0x7c000224 | (((%0) & 0x1f) << 11) | (((%1) & 0x1f) << 21) | (((%2) & 
0x3) << 18) | (((%3) & 0x1) << 17) | (((1) & 0x1) << 16)"
  ^
  
  This is solved by making the affected inline functions __always_inline.
  
  Suggested by: jhibbits
  MFC after:3 days

Modified:
  head/sys/powerpc/aim/mmu_radix.c

Modified: head/sys/powerpc/aim/mmu_radix.c
==
--- head/sys/powerpc/aim/mmu_radix.cFri Aug  7 18:48:56 2020
(r364039)
+++ head/sys/powerpc/aim/mmu_radix.cFri Aug  7 19:32:54 2020
(r364040)
@@ -183,7 +183,7 @@ ttusync(void)
 * Invalidate a range of 
translations
 */
 
-static __inline void
+static __always_inline void
 radix_tlbie(uint8_t ric, uint8_t prs, uint16_t is, uint32_t pid, uint32_t lpid,
vm_offset_t va, uint16_t ap)
 {
@@ -715,7 +715,7 @@ static struct md_page pv_dummy;
 
 static int powernv_enabled = 1;
 
-static inline void
+static __always_inline void
 tlbiel_radix_set_isa300(uint32_t set, uint32_t is,
uint32_t pid, uint32_t ric, uint32_t prs)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r363988 - head/usr.sbin/yp_mkdb

2020-08-06 Thread Dimitry Andric
Author: dim
Date: Thu Aug  6 20:31:50 2020
New Revision: 363988
URL: https://svnweb.freebsd.org/changeset/base/363988

Log:
  Fix clang 11 -Wformat warnings in yp_mkdb:
  
  usr.sbin/yp_mkdb/yp_mkdb.c:91:40: error: format specifies type 'char *' but 
the argument has type 'void *' [-Werror,-Wformat]
  printf("%.*s %.*s\n", (int)key.size, key.data, (int)data.size,
   ^~~~
  usr.sbin/yp_mkdb/yp_mkdb.c:92:7: error: format specifies type 'char *' but 
the argument has type 'void *' [-Werror,-Wformat]
  data.data);
  ^
  
  MFC after:3 days

Modified:
  head/usr.sbin/yp_mkdb/yp_mkdb.c

Modified: head/usr.sbin/yp_mkdb/yp_mkdb.c
==
--- head/usr.sbin/yp_mkdb/yp_mkdb.c Thu Aug  6 19:34:55 2020
(r363987)
+++ head/usr.sbin/yp_mkdb/yp_mkdb.c Thu Aug  6 20:31:50 2020
(r363988)
@@ -88,8 +88,8 @@ unwind(char *map)
 
key.data = NULL;
while (yp_next_record(dbp, , , 1, 1) == YP_TRUE)
-   printf("%.*s %.*s\n", (int)key.size, key.data, (int)data.size,
-   data.data);
+   printf("%.*s %.*s\n", (int)key.size, (char *)key.data,
+   (int)data.size, (char *)data.data);
 
(void)(dbp->close)(dbp);
return;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r363401 - in head/lib/clang/include: . llvm/Support

2020-07-21 Thread Dimitry Andric
Author: dim
Date: Tue Jul 21 17:34:05 2020
New Revision: 363401
URL: https://svnweb.freebsd.org/changeset/base/363401

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  10.0.1 final (aka llvmorg-10.0.1-0-gef32c611aa2).
  
  There were no changes since rc2, except in the upstream regression
  tests, which we do not ship.
  
  Relnotes: yes
  MFC after:immediately (no material changes except tag)

Modified:
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)

Modified: head/lib/clang/include/VCSVersion.inc
==
--- head/lib/clang/include/VCSVersion.inc   Tue Jul 21 17:20:34 2020
(r363400)
+++ head/lib/clang/include/VCSVersion.inc   Tue Jul 21 17:34:05 2020
(r363401)
@@ -1,14 +1,14 @@
 // $FreeBSD$
 
-#define LLVM_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d"
+#define LLVM_REVISION "llvmorg-10.0.1-0-gef32c611aa2"
 #define LLVM_REPOSITORY "g...@github.com:llvm/llvm-project.git"
 
-#define CLANG_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d"
+#define CLANG_REVISION "llvmorg-10.0.1-0-gef32c611aa2"
 #define CLANG_REPOSITORY "g...@github.com:llvm/llvm-project.git"
 
 // -
-#define LLD_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d-137"
+#define LLD_REVISION "llvmorg-10.0.1-0-gef32c611aa2-137"
 #define LLD_REPOSITORY "FreeBSD"
 
-#define LLDB_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d"
+#define LLDB_REVISION "llvmorg-10.0.1-0-gef32c611aa2"
 #define LLDB_REPOSITORY "g...@github.com:llvm/llvm-project.git"

Modified: head/lib/clang/include/llvm/Support/VCSRevision.h
==
--- head/lib/clang/include/llvm/Support/VCSRevision.h   Tue Jul 21 17:20:34 
2020(r363400)
+++ head/lib/clang/include/llvm/Support/VCSRevision.h   Tue Jul 21 17:34:05 
2020(r363401)
@@ -1,3 +1,3 @@
 /* $FreeBSD$ */
-#define LLVM_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d"
+#define LLVM_REVISION "llvmorg-10.0.1-0-gef32c611aa2"
 #define LLVM_REPOSITORY "g...@github.com:llvm/llvm-project.git"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r363125 - head/sys/compat/linux

2020-07-12 Thread Dimitry Andric
On 12 Jul 2020, at 11:51, Alexander Leidinger  wrote:
> 
> Author: netchild
> Date: Sun Jul 12 09:51:09 2020
> New Revision: 363125
> URL: https://svnweb.freebsd.org/changeset/base/363125
> 
> Log:
>  Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28).
> 
>  It is documented as a raw hardware-based clock not subject to NTP or
>  incremental adjustments. With this "not as precise as CLOCK_MONOTONIC"
>  description in mind, map it to our CLOCK_MONOTNIC_FAST (the same
>  mapping as for the linux CLOCK_MONOTONIC_COARSE).

Okay, but:

> @@ -212,6 +212,7 @@ linux_to_native_clockid(clockid_t *n, clockid_t l)
>   *n = CLOCK_THREAD_CPUTIME_ID;
>   break;
>   case LINUX_CLOCK_REALTIME_COARSE:
> + case LINUX_CLOCK_MONOTONIC_RAW:
>   *n = CLOCK_REALTIME_FAST;
>   break;
>   case LINUX_CLOCK_MONOTONIC_COARSE:

this shows it is actually mapped to CLOCK_REALTIME_FAST, not
CLOCK_MONOTONIC_FAST. Is the code right, or the commit message? :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r363013 - head/contrib/llvm-project/clang/lib/Sema

2020-07-08 Thread Dimitry Andric
Author: dim
Date: Wed Jul  8 16:50:47 2020
New Revision: 363013
URL: https://svnweb.freebsd.org/changeset/base/363013

Log:
  Merge commit 065fc1eafe7c from llvm git (by Richard Smith):
  
PR45521: Preserve the value kind when performing a standard
conversion sequence on a glvalue expression.
  
If the sequence is supposed to perform an lvalue-to-rvalue
conversion, then one will be specified as the first conversion in the
sequence. Otherwise, one should not be invented.
  
  This should fix clang crashing with "can't implicitly cast lvalue to
  rvalue with this cast kind", followed by "UNREACHABLE executed at
  /usr/src/contrib/llvm-project/clang/lib/Sema/Sema.cpp:538!", when
  building recent versions of Ceph, and the CPAN module SYBER/Date-5.2.0.
  
  Reported by:  Willem Jan Withagen , esert...@yahoo.de
  PR:   245530, 247812
  MFC after:3 days

Modified:
  head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp

Modified: head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
==
--- head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cppWed Jul  8 
16:23:40 2020(r363012)
+++ head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cppWed Jul  8 
16:50:47 2020(r363013)
@@ -4063,8 +4063,8 @@ Sema::PerformImplicitConversion(Expr *From, QualType T
 break;
 
   case ICK_Compatible_Conversion:
-  From = ImpCastExprToType(From, ToType, CK_NoOp,
-   VK_RValue, /*BasePath=*/nullptr, CCK).get();
+From = ImpCastExprToType(From, ToType, CK_NoOp, From->getValueKind(),
+ /*BasePath=*/nullptr, CCK).get();
 break;
 
   case ICK_Writeback_Conversion:
@@ -4303,11 +4303,7 @@ Sema::PerformImplicitConversion(Expr *From, QualType T
 break;
 
   case ICK_Qualification: {
-// The qualification keeps the category of the inner expression, unless the
-// target type isn't a reference.
-ExprValueKind VK =
-ToType->isReferenceType() ? From->getValueKind() : VK_RValue;
-
+ExprValueKind VK = From->getValueKind();
 CastKind CK = CK_NoOp;
 
 if (ToType->isReferenceType() &&

Modified: head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp
==
--- head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp   Wed Jul  8 
16:23:40 2020(r363012)
+++ head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp   Wed Jul  8 
16:50:47 2020(r363013)
@@ -4693,7 +4693,7 @@ TryReferenceInit(Sema , Expr *Init, QualType DeclTyp
   Sema::ReferenceConversions::NestedQualification)
  ? ICK_Qualification
  : ICK_Identity;
-ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
+ICS.Standard.setFromType(T2);
 ICS.Standard.setToType(0, T2);
 ICS.Standard.setToType(1, T1);
 ICS.Standard.setToType(2, T1);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/

2020-07-01 Thread Dimitry Andric
On 1 Jul 2020, at 00:03, Stefan Eßer  wrote:
> 
> Am 30.06.20 um 23:29 schrieb Dimitry Andric:
...
>> This is because you are supposed to commit stuff to ^/base/vendor/xxx
>> first, then svn cp it to ^/head/contrib/xxx, at least from Subversion
>> 1.8 onwards. The 'cp' action establishes the ancestral relation.
> 
> Yes, I thought so - the problem I want to fix is the premature import
> to /contrib and I had been hoping that it was possible to use the
> --record-only merge to edit the merge history (as suggested by John
> Baldwin and Ed Maste).

I have never been able to find a way to 'force' the ancestral relation
after the fact. Subversion does not seem to expose this as a
user-manipulable property. The --record-only option does what it says,
i.e. not actually merging but only updating the svn:mergeinfo property,
but it will still only work on ancestrally related objects.


> I want to upgrade to the next release and I'm wondering whether it
> would be possible to just svn copy that new version over from the
> vendor directory to the contrib directory. The import to the vendor
> area and the contrib directory have very similar commit messages and
> thus there would be no loss of commit history.

If you don't have many (or no) customizations, then indeed it will be
fairly easy. In one commit, you can svn rm the old version, and svn cp
the new version from the vendor area. Subversion will later show the
directory to have been "Replaced". There are lots of examples of this
in the tree, and I would hope the Git converter can handle it, or there
will be much more trouble. :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/

2020-06-30 Thread Dimitry Andric
On 30 Jun 2020, at 22:01, Stefan Eßer  wrote:
> 
> Am 29.06.20 um 20:09 schrieb Ed Maste:
>> On Mon, 29 Jun 2020 at 11:27, John Baldwin  wrote:
>>> 
>>> I suspect just doing the 'merge --record-only' is the simplest method
>>> assuming Git handles it ok.  I suspect since Git ignores mergeinfo this
>>> is fine, but it would be good for Ed to confirm.  You can always restore
>>> the tests in the future in contrib/bc when you want to add them.
>> 
>> I think a --record-only merge is the best approach; in any case we
>> have a number of these in the tree already and Git will have to deal
>> with them.
> 
> $ cd /usr/svn/base/head/contrib/bc
> 
> $ svn merge --record-only ^/vendor/bc/dist
> svn: E195016: 'svn+ssh://repo.freebsd.org/base/vendor/bc/dist@362810'
> must be ancestrally related to
> 'svn+ssh://repo.freebsd.org/base/head/contrib/bc@362810'

This is because you are supposed to commit stuff to ^/base/vendor/xxx
first, then svn cp it to ^/head/contrib/xxx, at least from Subversion
1.8 onwards. The 'cp' action establishes the ancestral relation.

Some of our older contrib areas were imported using cvs2svn, and these
also suffer the same problem, i.e. Subversion complains that the vendor
and contrib areas are not ancestrally related.



> Adding the option --ignore-ancestry to the merge command does not help.
...
> Any idea how to merge from the vendor area in this situation?

As far as I know, you have these alternatives:

* Delete the contrib/bc tree, and do a fresh svn cp from the vendor
  area. You will have to apply any customizations on top again. I did
  something like this to fixup contrib/libc++ in
  https://svnweb.freebsd.org/base?view=revision=287679
* Figure out the right value of the svn:mergeinfo property, and apply
  that by hand, using svn propset. This will be tricky, and has to be
  re-done manually every time you want to merge again.
* Merge with Subversion 1.7 or earlier.
* Ignore all this, merge patches by hand and wait for the Git
  transition to be completed.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r362733 - head

2020-06-28 Thread Dimitry Andric
Author: dim
Date: Sun Jun 28 18:02:12 2020
New Revision: 362733
URL: https://svnweb.freebsd.org/changeset/base/362733

Log:
  Remove older llvm-ranlib.1 entry from ObsoleteFiles.inc, as it has
  gotten its own manpage now, and should be no longer be removed by "make
  delete-old".
  
  MFC after:3 weeks

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Jun 28 17:51:17 2020(r362732)
+++ head/ObsoleteFiles.inc  Sun Jun 28 18:02:12 2020(r362733)
@@ -6763,7 +6763,6 @@ OLD_FILES+=usr/include/clang/3.3/x86intrin.h
 OLD_FILES+=usr/include/clang/3.3/xmmintrin.h
 OLD_FILES+=usr/include/clang/3.3/xopintrin.h
 OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz
 OLD_DIRS+=usr/include/clang/3.3
 # 20140216: nve(4) removed
 OLD_FILES+=usr/share/man/man4/if_nve.4.gz
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362734 - head/usr.bin/clang/llvm-strings

2020-06-28 Thread Dimitry Andric
Author: dim
Date: Sun Jun 28 18:02:51 2020
New Revision: 362734
URL: https://svnweb.freebsd.org/changeset/base/362734

Log:
  Fix llvm-strings.1 not installing, this was a copy/paste error.
  
  MFC after:3 weeks

Modified:
  head/usr.bin/clang/llvm-strings/Makefile

Modified: head/usr.bin/clang/llvm-strings/Makefile
==
--- head/usr.bin/clang/llvm-strings/MakefileSun Jun 28 18:02:12 2020
(r362733)
+++ head/usr.bin/clang/llvm-strings/MakefileSun Jun 28 18:02:51 2020
(r362734)
@@ -1,7 +1,6 @@
 # $FreeBSD$
 
 PROG_CXX=  llvm-strings
-MAN=
 
 SRCDIR=llvm/tools/llvm-strings
 SRCS+= llvm-strings.cpp
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362719 - in head: contrib/llvm-project contrib/llvm-project/clang/lib/CodeGen contrib/llvm-project/compiler-rt/lib/builtins/riscv contrib/llvm-project/libcxx/include contrib/llvm-proje...

2020-06-28 Thread Dimitry Andric
Author: dim
Date: Sun Jun 28 07:43:43 2020
New Revision: 362719
URL: https://svnweb.freebsd.org/changeset/base/362719

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.1-rc2-0-g77d76b71d7d.
  
  Also add a few more llvm utilities under WITH_CLANG_EXTRAS:
  
  * llvm-dwp, a utility for merging DWARF 5 Split DWARF .dwo files into
.dwp (DWARF package files)
  * llvm-size, a size(1) replacement
  * llvm-strings, a strings(1) replacement
  
  MFC after:3 weeks

Added:
  head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/int_mul_impl.inc
 - copied unchanged from r362704, 
vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/int_mul_impl.inc
  head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/muldi3.S
 - copied unchanged from r362704, 
vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/muldi3.S
  head/contrib/llvm-project/llvm/tools/llvm-dwp/
 - copied from r362704, 
vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/
  head/contrib/llvm-project/llvm/tools/llvm-size/
 - copied from r362704, 
vendor/llvm-project/release-10.x/llvm/tools/llvm-size/
  head/contrib/llvm-project/llvm/tools/llvm-strings/
 - copied from r362704, 
vendor/llvm-project/release-10.x/llvm/tools/llvm-strings/
  head/usr.bin/clang/llvm-dwp/
  head/usr.bin/clang/llvm-dwp/Makefile   (contents, props changed)
  head/usr.bin/clang/llvm-size/
  head/usr.bin/clang/llvm-size/Makefile   (contents, props changed)
  head/usr.bin/clang/llvm-size/llvm-size.1   (contents, props changed)
  head/usr.bin/clang/llvm-strings/
  head/usr.bin/clang/llvm-strings/Makefile   (contents, props changed)
  head/usr.bin/clang/llvm-strings/llvm-strings.1   (contents, props changed)
Modified:
  head/contrib/llvm-project/FREEBSD-Xlist
  head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp
  head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/mulsi3.S
  head/contrib/llvm-project/libcxx/include/array
  
head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/usr.bin/clang/Makefile
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/compiler-rt/   (props changed)
  head/contrib/llvm-project/libcxx/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/FREEBSD-Xlist
==
--- head/contrib/llvm-project/FREEBSD-Xlist Sun Jun 28 06:52:39 2020
(r362718)
+++ head/contrib/llvm-project/FREEBSD-Xlist Sun Jun 28 07:43:43 2020
(r362719)
@@ -864,7 +864,8 @@ llvm/tools/llvm-dis/LLVMBuild.txt
 llvm/tools/llvm-dwarfdump/CMakeLists.txt
 llvm/tools/llvm-dwarfdump/LLVMBuild.txt
 llvm/tools/llvm-dwarfdump/fuzzer/
-llvm/tools/llvm-dwp/
+llvm/tools/llvm-dwp/CMakeLists.txt
+llvm/tools/llvm-dwp/LLVMBuild.txt
 llvm/tools/llvm-elfabi/
 llvm/tools/llvm-exegesis/
 llvm/tools/llvm-extract/CMakeLists.txt
@@ -911,12 +912,14 @@ llvm/tools/llvm-reduce/
 llvm/tools/llvm-rtdyld/CMakeLists.txt
 llvm/tools/llvm-rtdyld/LLVMBuild.txt
 llvm/tools/llvm-shlib/
-llvm/tools/llvm-size/
+llvm/tools/llvm-size/CMakeLists.txt
+llvm/tools/llvm-size/LLVMBuild.txt
 llvm/tools/llvm-special-case-list-fuzzer/
 llvm/tools/llvm-split/
 llvm/tools/llvm-stress/CMakeLists.txt
 llvm/tools/llvm-stress/LLVMBuild.txt
-llvm/tools/llvm-strings/
+llvm/tools/llvm-strings/CMakeLists.txt
+llvm/tools/llvm-strings/LLVMBuild.txt
 llvm/tools/llvm-symbolizer/CMakeLists.txt
 llvm/tools/llvm-undname/
 llvm/tools/llvm-xray/CMakeLists.txt

Modified: head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp  Sun Jun 28 
06:52:39 2020(r362718)
+++ head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp  Sun Jun 28 
07:43:43 2020(r362719)
@@ -9677,7 +9677,8 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType
   uint64_t Size = getContext().getTypeSize(Ty);
 
   // Pass floating point values via FPRs if possible.
-  if (IsFixed && Ty->isFloatingType() && FLen >= Size && ArgFPRsLeft) {
+  if (IsFixed && Ty->isFloatingType() && !Ty->isComplexType() &&
+  FLen >= Size && ArgFPRsLeft) {
 ArgFPRsLeft--;
 return ABIArgInfo::getDirect();
   }

Copied: 

svn commit: r362680 - head/tools/build/mk

2020-06-27 Thread Dimitry Andric
Author: dim
Date: Sat Jun 27 12:00:08 2020
New Revision: 362680
URL: https://svnweb.freebsd.org/changeset/base/362680

Log:
  Follow-up to r362679, add more entries to OptionalObsoleteFiles.inc
  
  MFC after:3 days
  X-MFC-With:   r362679

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Jun 27 11:56:49 
2020(r362679)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Jun 27 12:00:08 
2020(r362680)
@@ -1474,8 +1474,10 @@ OLD_DIRS+=usr/share/doc/llvm
 OLD_FILES+=usr/share/man/man1/clang.1.gz
 OLD_FILES+=usr/share/man/man1/clang++.1.gz
 OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-addr2line.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz
 .endif
@@ -1508,11 +1510,13 @@ OLD_FILES+=usr/share/man/man1/llc.1.gz
 OLD_FILES+=usr/share/man/man1/lli.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-as.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-cxxfilt.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1
 OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-link.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-objcopy.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz
 OLD_FILES+=usr/share/man/man1/opt.1.gz
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362679 - in head: tools/build/mk usr.bin/clang/bugpoint usr.bin/clang/clang usr.bin/clang/llc usr.bin/clang/lldb usr.bin/clang/lli usr.bin/clang/llvm-ar usr.bin/clang/llvm-as usr.bin/c...

2020-06-27 Thread Dimitry Andric
Author: dim
Date: Sat Jun 27 11:56:49 2020
New Revision: 362679
URL: https://svnweb.freebsd.org/changeset/base/362679

Log:
  Regenerate ReStructuredText based manpages for llvm-project tools:
  
  * bugpoint.1
  * clang.1
  * llc.1
  * lldb.1
  * lli.1
  * llvm-ar.1
  * llvm-as.1
  * llvm-bcanalyzer.1
  * llvm-cov.1
  * llvm-diff.1
  * llvm-dis.1
  * llvm-dwarfdump.1
  * llvm-extract.1
  * llvm-link.1
  * llvm-mca.1
  * llvm-nm.1
  * llvm-pdbutil.1
  * llvm-profdata.1
  * llvm-symbolizer.1
  * llvm-tblgen.1
  * opt.1
  
  Add newly generated manpages for:
  
  * llvm-addr2line.1 (this is an alias of llvm-symbolizer)
  * llvm-cxxfilt.1
  * llvm-objcopy.1
  * llvm-ranlib.1 (this is an alias of llvm-ar)
  
  Note that llvm-objdump.1 is an exception, as upstream has both a plain
  .1 file, and a .rst variant. These will have to be reconciled upstream
  first.
  
  MFC after:3 days

Added:
  head/usr.bin/clang/llvm-ar/llvm-ranlib.1   (contents, props changed)
  head/usr.bin/clang/llvm-cxxfilt/llvm-cxxfilt.1   (contents, props changed)
  head/usr.bin/clang/llvm-objcopy/llvm-objcopy.1   (contents, props changed)
  head/usr.bin/clang/llvm-symbolizer/llvm-addr2line.1   (contents, props 
changed)
Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/usr.bin/clang/bugpoint/bugpoint.1
  head/usr.bin/clang/clang/clang.1
  head/usr.bin/clang/llc/llc.1
  head/usr.bin/clang/lldb/lldb.1
  head/usr.bin/clang/lli/lli.1
  head/usr.bin/clang/llvm-ar/Makefile
  head/usr.bin/clang/llvm-ar/llvm-ar.1
  head/usr.bin/clang/llvm-as/llvm-as.1
  head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1
  head/usr.bin/clang/llvm-cov/llvm-cov.1
  head/usr.bin/clang/llvm-cxxfilt/Makefile
  head/usr.bin/clang/llvm-diff/llvm-diff.1
  head/usr.bin/clang/llvm-dis/llvm-dis.1
  head/usr.bin/clang/llvm-dwarfdump/llvm-dwarfdump.1
  head/usr.bin/clang/llvm-extract/llvm-extract.1
  head/usr.bin/clang/llvm-link/llvm-link.1
  head/usr.bin/clang/llvm-mca/llvm-mca.1
  head/usr.bin/clang/llvm-nm/llvm-nm.1
  head/usr.bin/clang/llvm-objcopy/Makefile
  head/usr.bin/clang/llvm-objdump/llvm-objdump.1
  head/usr.bin/clang/llvm-pdbutil/llvm-pdbutil.1
  head/usr.bin/clang/llvm-profdata/llvm-profdata.1
  head/usr.bin/clang/llvm-symbolizer/Makefile
  head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1
  head/usr.bin/clang/llvm-tblgen/llvm-tblgen.1
  head/usr.bin/clang/opt/opt.1

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Jun 27 11:28:11 
2020(r362678)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sat Jun 27 11:56:49 
2020(r362679)
@@ -1191,6 +1191,7 @@ OLD_FILES+=usr/bin/clang
 OLD_FILES+=usr/bin/clang++
 OLD_FILES+=usr/bin/clang-cpp
 OLD_FILES+=usr/bin/clang-tblgen
+OLD_FILES+=usr/bin/llvm-addr2line
 OLD_FILES+=usr/bin/llvm-ar
 OLD_FILES+=usr/bin/llvm-nm
 OLD_FILES+=usr/bin/llvm-objdump

Modified: head/usr.bin/clang/bugpoint/bugpoint.1
==
--- head/usr.bin/clang/bugpoint/bugpoint.1  Sat Jun 27 11:28:11 2020
(r362678)
+++ head/usr.bin/clang/bugpoint/bugpoint.1  Sat Jun 27 11:56:49 2020
(r362679)
@@ -1,7 +1,7 @@
 .\" $FreeBSD$
 .\" Man page generated from reStructuredText.
 .
-.TH "BUGPOINT" "1" "2018-08-02" "7" "LLVM"
+.TH "BUGPOINT" "1" "2020-06-26" "10" "LLVM"
 .SH NAME
 bugpoint \- automatic test case reduction tool
 .
@@ -300,10 +300,10 @@ If \fBbugpoint\fP succeeds in finding a problem, it wi
 if an error occurs, it will exit with a non\-zero value.
 .SH SEE ALSO
 .sp
-opt|opt
+\fBopt(1)\fP
 .SH AUTHOR
-Maintained by The LLVM Team (http://llvm.org/).
+Maintained by the LLVM Team (https://llvm.org/).
 .SH COPYRIGHT
-2003-2018, LLVM Project
+2003-2020, LLVM Project
 .\" Generated by docutils manpage writer.
 .

Modified: head/usr.bin/clang/clang/clang.1
==
--- head/usr.bin/clang/clang/clang.1Sat Jun 27 11:28:11 2020
(r362678)
+++ head/usr.bin/clang/clang/clang.1Sat Jun 27 11:56:49 2020
(r362679)
@@ -1,7 +1,7 @@
 .\" $FreeBSD$
 .\" Man page generated from reStructuredText.
 .
-.TH "CLANG" "1" "Aug 02, 2018" "7" "Clang"
+.TH "CLANG" "1" "2020-06-26" "10" "Clang"
 .SH NAME
 clang \- the Clang C, C++, and Objective-C compiler
 .
@@ -89,7 +89,7 @@ an "a.out", ".dylib" or ".so" file.
 .sp
 The Clang Static Analyzer is a tool that scans source code to try to find bugs
 through code analysis.  This tool uses many parts of Clang and is built into
-the same driver.  Please see <\fI\%http://clang\-analyzer.llvm.org\fP> for 
more details
+the same driver.  Please see <\fI\%https://clang\-analyzer.llvm.org\fP> for 
more details
 on how to use the static analyzer.
 .SH OPTIONS
 .SS Stage Selection Options
@@ -458,9 +458,22 @@ strings and other optimizations.
 .UNINDENT
 .INDENT 0.0
 .TP
-.B 

svn commit: r362623 - head/lib/libkvm

2020-06-25 Thread Dimitry Andric
Author: dim
Date: Thu Jun 25 20:04:35 2020
New Revision: 362623
URL: https://svnweb.freebsd.org/changeset/base/362623

Log:
  Fix copy/paste mistake in kvm_getswapinfo(3)
  
  It seems this manpage was copied from kvm_getloadavg(3), but the
  DIAGNOSTICS section was not updated completely. Update the section with
  correct information about a return value of -1.
  
  MFC after:3 days

Modified:
  head/lib/libkvm/kvm_getswapinfo.3

Modified: head/lib/libkvm/kvm_getswapinfo.3
==
--- head/lib/libkvm/kvm_getswapinfo.3   Thu Jun 25 19:44:24 2020
(r362622)
+++ head/lib/libkvm/kvm_getswapinfo.3   Thu Jun 25 20:04:35 2020
(r362623)
@@ -101,8 +101,8 @@ You may call the function with
 .Dv NULL
 to clear the cache.
 .Sh DIAGNOSTICS
-If the load average was unobtainable, \-1 is returned; otherwise,
-the number of swap devices actually retrieved is returned.
+If the swap summary information was unobtainable, \-1 is returned;
+otherwise, the number of swap devices actually retrieved is returned.
 .Pp
 If the name of the swap device does not fit in the static char buffer
 in the structure, it is truncated.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r362609 - in head: contrib/llvm-project/clang/include/clang/Driver contrib/llvm-project/clang/lib/Basic/Targets contrib/llvm-project/clang/lib/Driver contrib/llvm-project/clang/lib/Driv...

2020-06-25 Thread Dimitry Andric
Author: dim
Date: Thu Jun 25 08:15:10 2020
New Revision: 362609
URL: https://svnweb.freebsd.org/changeset/base/362609

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.0-129-gd24d5c8e308. Getting closer to 10.0.1-rc2.
  
  MFC after:3 weeks

Added:
  head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFGraph.h
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFGraph.h
  head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFLiveness.h
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFLiveness.h
  head/contrib/llvm-project/llvm/include/llvm/CodeGen/RDFRegisters.h
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFRegisters.h
  head/contrib/llvm-project/llvm/lib/CodeGen/RDFGraph.cpp
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFGraph.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/RDFLiveness.cpp
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFLiveness.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/RDFRegisters.cpp
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFRegisters.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/ImmutableGraph.h
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/lib/Target/X86/ImmutableGraph.h
  head/contrib/llvm-project/llvm/lib/Target/X86/X86IndirectThunks.cpp
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86IndirectThunks.cpp
  
head/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
  
head/contrib/llvm-project/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
 - copied unchanged from r362594, 
vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
Deleted:
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFGraph.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFGraph.h
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFLiveness.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFLiveness.h
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFRegisters.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFRegisters.h
  head/contrib/llvm-project/llvm/lib/Target/X86/X86RetpolineThunks.cpp
Modified:
  head/contrib/llvm-project/clang/include/clang/Driver/Options.td
  head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  head/contrib/llvm-project/clang/lib/Driver/SanitizerArgs.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChain.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/X86.cpp
  head/contrib/llvm-project/llvm/include/llvm/IR/IntrinsicsPowerPC.td
  head/contrib/llvm-project/llvm/include/llvm/Support/ManagedStatic.h
  head/contrib/llvm-project/llvm/include/llvm/Target/TargetSelectionDAG.td
  head/contrib/llvm-project/llvm/lib/LTO/LTO.cpp
  head/contrib/llvm-project/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
  head/contrib/llvm-project/llvm/lib/Target/BPF/BTFDebug.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFCopy.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFCopy.h
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFDeadCode.cpp
  head/contrib/llvm-project/llvm/lib/Target/Hexagon/RDFDeadCode.h
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/P9InstrResources.td
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.h
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrAltivec.td
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrVSX.td
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h
  head/contrib/llvm-project/llvm/lib/Target/X86/X86.h
  head/contrib/llvm-project/llvm/lib/Target/X86/X86.td
  head/contrib/llvm-project/llvm/lib/Target/X86/X86FastISel.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86FrameLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.h
  head/contrib/llvm-project/llvm/lib/Target/X86/X86InstrCompiler.td
  head/contrib/llvm-project/llvm/lib/Target/X86/X86InstrControl.td
  head/contrib/llvm-project/llvm/lib/Target/X86/X86InstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/X86/X86MCInstLower.cpp
  

Re: svn commit: r362333 - in head: contrib/flex contrib/flex/src usr.bin/lex usr.bin/lex/lib

2020-06-24 Thread Dimitry Andric
On 24 Jun 2020, at 02:41, Kyle Evans  wrote:
> 
> On Thu, Jun 18, 2020 at 1:09 PM Jung-uk Kim  wrote:
>> 
>> Author: jkim
>> Date: Thu Jun 18 18:09:16 2020
>> New Revision: 362333
>> URL: https://svnweb.freebsd.org/changeset/base/362333
>> 
>> Log:
>>  MFV:  r362286
>> 
>>  Merge flex 2.6.4.
>> 
> 
> Hi,
> 
> I'm looking at getting amd64 world buildable again by gcc6; this seems
> to give it some gas:
> 
> /usr/src/contrib/flex/src/main.c: In function 'check_options':
> /usr/src/contrib/flex/src/main.c:347:14: error: assignment discards
> 'const' qualifier from pointer target type
> [-Werror=discarded-qualifiers]
>   if ((slash = strrchr(M4, '/')) != NULL) {
> 
> The following trivial patch seems to make gcc6 happy again.

This is a strange one. As gcc6 has been removed from ports, I had to
resort to an older 12-STABLE box which still had it, but no matter what
I try, I cannot get the warning that is being produced by the CI system.
What does it do differently?

Also, the warning is indeed bogus, as strrchr() returns a non-const char
pointer. As I can't reproduce it, I also can't verify which gcc version
fixes the bogus warning.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r362445 - in head: contrib/llvm-project contrib/llvm-project/clang/lib/Sema contrib/llvm-project/clang/lib/Tooling/Syntax contrib/llvm-project/clang/utils/TableGen contrib/llvm-project/...

2020-06-20 Thread Dimitry Andric
Author: dim
Date: Sat Jun 20 20:06:52 2020
New Revision: 362445
URL: https://svnweb.freebsd.org/changeset/base/362445

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.0-97-g6f71678ecd2 (not quite 10.0.1 rc2, as more fixes are
  still pending).
  
  MFC after:3 weeks

Added:
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td
 - copied unchanged from r362443, 
vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64SchedThunderX3T110.td
Modified:
  head/contrib/llvm-project/FREEBSD-Xlist
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
  head/contrib/llvm-project/clang/lib/Tooling/Syntax/Tokens.cpp
  head/contrib/llvm-project/clang/utils/TableGen/ClangAttrEmitter.cpp
  head/contrib/llvm-project/lld/COFF/Chunks.h
  head/contrib/llvm-project/lld/COFF/DLL.cpp
  head/contrib/llvm-project/lld/ELF/ScriptLexer.cpp
  head/contrib/llvm-project/lld/ELF/ScriptParser.cpp
  head/contrib/llvm-project/llvm/include/llvm/Support/AArch64TargetParser.def
  head/contrib/llvm-project/llvm/lib/CodeGen/BranchFolding.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64BranchTargets.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedA53.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedA57.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedCyclone.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM3.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM4.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedExynosM5.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedFalkor.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedKryo.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedThunderX.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64SchedThunderX2T99.td
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.cpp
  head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64Subtarget.h
  head/contrib/llvm-project/llvm/lib/Target/X86/X86AsmPrinter.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp
  head/contrib/llvm-project/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
  head/contrib/llvm-project/llvm/lib/Transforms/Utils/ValueMapper.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/FREEBSD-Xlist
==
--- head/contrib/llvm-project/FREEBSD-Xlist Sat Jun 20 20:06:14 2020
(r362444)
+++ head/contrib/llvm-project/FREEBSD-Xlist Sat Jun 20 20:06:52 2020
(r362445)
@@ -531,6 +531,7 @@ llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt
 llvm/lib/ExecutionEngine/PerfJITEvents/LLVMBuild.txt
 llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
 llvm/lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt
+llvm/lib/Extensions/
 llvm/lib/Frontend/CMakeLists.txt
 llvm/lib/Frontend/LLVMBuild.txt
 llvm/lib/Frontend/OpenMP/CMakeLists.txt

Modified: head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
==
--- head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp   Sat Jun 20 
20:06:14 2020(r362444)
+++ head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp   Sat Jun 20 
20:06:52 2020(r362445)
@@ -3817,6 +3817,9 @@ TypeResult Sema::ActOnTagTemplateIdType(TagUseKind TUK
 SourceLocation LAngleLoc,
 ASTTemplateArgsPtr TemplateArgsIn,
 SourceLocation RAngleLoc) {
+  if (SS.isInvalid())
+return TypeResult(true);
+
   TemplateName Template = TemplateD.get();
 
   // Translate the parser's template argument list in our AST format.
@@ -5925,7 +5928,9 @@ bool UnnamedLocalNoLinkageFinder::VisitDependentNameTy
 
 bool UnnamedLocalNoLinkageFinder::VisitDependentTemplateSpecializationType(
  const DependentTemplateSpecializationType* T) 
{
-  return VisitNestedNameSpecifier(T->getQualifier());
+  if (auto *Q = T->getQualifier())
+return VisitNestedNameSpecifier(Q);
+  return false;
 }
 
 bool UnnamedLocalNoLinkageFinder::VisitPackExpansionType(
@@ -5979,6 +5984,7 @@ bool UnnamedLocalNoLinkageFinder::VisitTagDecl(const T
 
 bool UnnamedLocalNoLinkageFinder::VisitNestedNameSpecifier(
 NestedNameSpecifier *NNS) {
+  assert(NNS);
   if 

svn commit: r362341 - head/contrib/llvm-project/llvm/lib/Analysis

2020-06-18 Thread Dimitry Andric
Author: dim
Date: Thu Jun 18 20:41:43 2020
New Revision: 362341
URL: https://svnweb.freebsd.org/changeset/base/362341

Log:
  Merge commit 0cecafd647cc from llvm git (by Alina Sbirlea):
  
[BasicAA] Make BasicAA a cfg pass.
  
Summary:
Part of the changes in D44564 made BasicAA not CFG only due to it
using PhiAnalysisValues which may have values invalidated. Subsequent
patches (rL340613) appear to have addressed this limitation.
  
BasicAA should not be invalidated by non-CFG-altering passes. A
concrete example is MemCpyOpt which preserves CFG, but we are testing
it invalidates BasicAA.
  
llvm-dev RFC:
https://groups.google.com/forum/#!topic/llvm-dev/eSPXuWnNfzM
  
Reviewers: john.brawn, sebpop, hfinkel, brzycki
  
Subscribers: hiraditya, llvm-commits
  
Tags: #llvm
  
Differential Revision: https://reviews.llvm.org/D74353
  
  This fixes an issue with clang's -fintegrated-cc1 feature, which could
  make it output slightly different assembly code, depending on the way it
  was invoked.
  
  In r361755 we attempted to work around it by disabling the integrated
  cc1 stage, but it did not solve the root cause for all situations.
  
  Extensive testing and bisecting showed that the above change finally
  makes the output deterministic, even if -fintegrated-cc1 is on.
  
  Reported by:  Fabian Keil 
  PR:   246630
  MFC after:3 days

Modified:
  head/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp

Modified: head/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp
==
--- head/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp  Thu Jun 
18 20:25:42 2020(r362340)
+++ head/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp  Thu Jun 
18 20:41:43 2020(r362341)
@@ -2059,12 +2059,13 @@ char BasicAAWrapperPass::ID = 0;
 void BasicAAWrapperPass::anchor() {}
 
 INITIALIZE_PASS_BEGIN(BasicAAWrapperPass, "basicaa",
-  "Basic Alias Analysis (stateless AA impl)", false, true)
+  "Basic Alias Analysis (stateless AA impl)", true, true)
 INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
 INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
 INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
+INITIALIZE_PASS_DEPENDENCY(PhiValuesWrapperPass)
 INITIALIZE_PASS_END(BasicAAWrapperPass, "basicaa",
-"Basic Alias Analysis (stateless AA impl)", false, true)
+"Basic Alias Analysis (stateless AA impl)", true, true)
 
 FunctionPass *llvm::createBasicAAWrapperPass() {
   return new BasicAAWrapperPass();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361693 - in head: contrib/subversion contrib/subversion/doc contrib/subversion/doc/programmer contrib/subversion/doc/user contrib/subversion/subversion contrib/subversion/subversion/in...

2020-06-01 Thread Dimitry Andric
Author: dim
Date: Mon Jun  1 10:27:05 2020
New Revision: 361693
URL: https://svnweb.freebsd.org/changeset/base/361693

Log:
  Update Subversion to 1.14.0 LTS. See contrib/subversion/CHANGES for a
  summary of changes, or for a more thorough overview:
  
  https://subversion.apache.org/docs/release-notes/1.14
  
  NOTE: there is no need to dump and reload repositories, and the working
  copy format is still the same as Subversion 1.8 through 1.13.
  
  Relnotes: yes
  MFC after:2 weeks
  X-MFC-With:   r361677

Added:
  head/contrib/subversion/.swig_pl_checked
 - copied unchanged from r361678, vendor/subversion/dist/.swig_pl_checked
  head/contrib/subversion/.swig_py_checked
 - copied unchanged from r361678, vendor/subversion/dist/.swig_py_checked
  head/contrib/subversion/.swig_rb_checked
 - copied unchanged from r361678, vendor/subversion/dist/.swig_rb_checked
  head/contrib/subversion/subversion/include/private/svn_client_shelf.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/private/svn_client_shelf.h
  head/contrib/subversion/subversion/include/private/svn_client_shelf2.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/private/svn_client_shelf2.h
  head/contrib/subversion/subversion/include/private/svn_dirent_uri_private.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/private/svn_dirent_uri_private.h
  head/contrib/subversion/subversion/include/svn_opt_impl.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/svn_opt_impl.h
  head/contrib/subversion/subversion/include/svn_types_impl.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/svn_types_impl.h
  head/contrib/subversion/subversion/libsvn_client/layout.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/layout.c
  head/contrib/subversion/subversion/libsvn_client/shelf.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/shelf.c
  head/contrib/subversion/subversion/libsvn_client/shelf2.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/shelf2.c
  head/contrib/subversion/subversion/libsvn_client/wc_editor.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/wc_editor.c
  head/contrib/subversion/subversion/libsvn_repos/dump_editor.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_repos/dump_editor.c
  head/contrib/subversion/subversion/svn/filesize.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/filesize.c
  head/contrib/subversion/subversion/svn/shelf-cmd.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf-cmd.c
  head/contrib/subversion/subversion/svn/shelf-cmd.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf-cmd.h
  head/contrib/subversion/subversion/svn/shelf2-cmd.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf2-cmd.c
  head/contrib/subversion/subversion/svn/shelf2-cmd.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf2-cmd.h
Deleted:
  head/contrib/subversion/doc/programmer/gtest-guide.txt
  head/contrib/subversion/subversion/libsvn_client/copy_foreign.c
  head/contrib/subversion/subversion/libsvn_client/shelve.c
  head/contrib/subversion/subversion/svn/shelve-cmd.c
Modified:
  head/contrib/subversion/.editorconfig
  head/contrib/subversion/CHANGES
  head/contrib/subversion/COMMITTERS
  head/contrib/subversion/INSTALL
  head/contrib/subversion/LICENSE
  head/contrib/subversion/Makefile.in
  head/contrib/subversion/NOTICE
  head/contrib/subversion/aclocal.m4
  head/contrib/subversion/autogen.sh
  head/contrib/subversion/build-outputs.mk
  head/contrib/subversion/build.conf
  head/contrib/subversion/configure
  head/contrib/subversion/configure.ac
  head/contrib/subversion/doc/doxygen.conf
  head/contrib/subversion/doc/user/svn-best-practices.html
  head/contrib/subversion/gen-make.py
  head/contrib/subversion/get-deps.sh
  head/contrib/subversion/subversion/include/private/svn_branch.h
  head/contrib/subversion/subversion/include/private/svn_client_mtcc.h
  head/contrib/subversion/subversion/include/private/svn_client_private.h
  head/contrib/subversion/subversion/include/private/svn_dep_compat.h
  head/contrib/subversion/subversion/include/private/svn_diff_tree.h
  head/contrib/subversion/subversion/include/private/svn_element.h
  head/contrib/subversion/subversion/include/private/svn_fs_fs_private.h
  head/contrib/subversion/subversion/include/private/svn_repos_private.h
  head/contrib/subversion/subversion/include/private/svn_sorts_private.h
  head/contrib/subversion/subversion/include/private/svn_subr_private.h
  head/contrib/subversion/subversion/include/private/svn_wc_private.h
  

svn commit: r361692 - in head: contrib/apr-util contrib/apr-util/buckets contrib/apr-util/crypto contrib/apr-util/dbd contrib/apr-util/dbd/unsupported contrib/apr-util/dbm/sdbm contrib/apr-util/inc...

2020-06-01 Thread Dimitry Andric
Author: dim
Date: Mon Jun  1 10:14:45 2020
New Revision: 361692
URL: https://svnweb.freebsd.org/changeset/base/361692

Log:
  Update apr-util to 1.6.1. See contrib/apr-util/CHANGES for a summary of
  changes.
  
  MFC after:2 weeks
  X-MFC-With:   r361677

Added:
  head/contrib/apr-util/CMakeLists.txt
 - copied unchanged from r361691, vendor/apr-util/dist/CMakeLists.txt
  head/contrib/apr-util/README.FREETDS
 - copied unchanged from r361691, vendor/apr-util/dist/README.FREETDS
  head/contrib/apr-util/README.cmake
 - copied unchanged from r361691, vendor/apr-util/dist/README.cmake
  head/contrib/apr-util/crypto/apr_crypto_commoncrypto.c
 - copied unchanged from r361691, 
vendor/apr-util/dist/crypto/apr_crypto_commoncrypto.c
  head/contrib/apr-util/crypto/apr_siphash.c
 - copied unchanged from r361691, vendor/apr-util/dist/crypto/apr_siphash.c
  head/contrib/apr-util/dbd/unsupported/
 - copied from r361691, vendor/apr-util/dist/dbd/unsupported/
  head/contrib/apr-util/include/apr_ldap.hwc
 - copied unchanged from r361691, vendor/apr-util/dist/include/apr_ldap.hwc
  head/contrib/apr-util/include/apr_redis.h
 - copied unchanged from r361691, vendor/apr-util/dist/include/apr_redis.h
  head/contrib/apr-util/include/apr_siphash.h
 - copied unchanged from r361691, vendor/apr-util/dist/include/apr_siphash.h
  head/contrib/apr-util/include/apu.hwc
 - copied unchanged from r361691, vendor/apr-util/dist/include/apu.hwc
  head/contrib/apr-util/redis/
 - copied from r361691, vendor/apr-util/dist/redis/
  head/contrib/apr-util/test/testredis.c
 - copied unchanged from r361691, vendor/apr-util/dist/test/testredis.c
  head/contrib/apr-util/test/testsiphash.c
 - copied unchanged from r361691, vendor/apr-util/dist/test/testsiphash.c
Deleted:
  head/contrib/apr-util/dbd/NWGNUdbdfreetds
  head/contrib/apr-util/dbd/apr_dbd_freetds.c
Modified:
  head/contrib/apr-util/CHANGES
  head/contrib/apr-util/LICENSE
  head/contrib/apr-util/Makefile.in
  head/contrib/apr-util/Makefile.win
  head/contrib/apr-util/NOTICE
  head/contrib/apr-util/NWGNUmakefile
  head/contrib/apr-util/README
  head/contrib/apr-util/apr-util.spec
  head/contrib/apr-util/aprutil.dsw
  head/contrib/apr-util/apu-config.in
  head/contrib/apr-util/buckets/apr_buckets_alloc.c
  head/contrib/apr-util/buckets/apr_buckets_file.c
  head/contrib/apr-util/build-outputs.mk
  head/contrib/apr-util/build.conf
  head/contrib/apr-util/buildconf
  head/contrib/apr-util/configure
  head/contrib/apr-util/configure.in
  head/contrib/apr-util/crypto/apr_crypto.c
  head/contrib/apr-util/crypto/apr_crypto_nss.c
  head/contrib/apr-util/crypto/apr_crypto_openssl.c
  head/contrib/apr-util/crypto/crypt_blowfish.c
  head/contrib/apr-util/dbd/NWGNUmakefile
  head/contrib/apr-util/dbd/apr_dbd.c
  head/contrib/apr-util/dbm/sdbm/sdbm.c
  head/contrib/apr-util/dbm/sdbm/sdbm_pair.c
  head/contrib/apr-util/include/apr_buckets.h
  head/contrib/apr-util/include/apr_crypto.h
  head/contrib/apr-util/include/apr_dbd.h
  head/contrib/apr-util/include/apr_xml.h
  head/contrib/apr-util/include/apu.h.in
  head/contrib/apr-util/include/apu.hnw
  head/contrib/apr-util/include/apu.hw
  head/contrib/apr-util/include/apu_version.h
  head/contrib/apr-util/include/private/apr_crypto_internal.h
  head/contrib/apr-util/include/private/apu_config.h.in
  head/contrib/apr-util/memcache/apr_memcache.c
  head/contrib/apr-util/test/Makefile.in
  head/contrib/apr-util/test/Makefile.win
  head/contrib/apr-util/test/NWGNUaputest
  head/contrib/apr-util/test/abts_tests.h
  head/contrib/apr-util/test/testall.dsw
  head/contrib/apr-util/test/testcrypto.c
  head/contrib/apr-util/test/testutil.h
  head/contrib/apr-util/xml/apr_xml.c
  head/usr.bin/svn/lib/libapr_util/apu.h
  head/usr.bin/svn/lib/libapr_util/apu_config.h
Directory Properties:
  head/contrib/apr-util/   (props changed)

Modified: head/contrib/apr-util/CHANGES
==
--- head/contrib/apr-util/CHANGES   Mon Jun  1 10:08:18 2020
(r361691)
+++ head/contrib/apr-util/CHANGES   Mon Jun  1 10:14:45 2020
(r361692)
@@ -1,141 +1,62 @@
  -*- coding: utf-8 -*-
-Changes with APR-util 1.5.4
+Changes with APR-util 1.6.1
 
-  *) MySQL driver: Fix incorrect handling of bad parameter in the
- driver support for apr_dbd_transaction_end().  PR 56330.
- [Weiqiang Li ]
+  *) Win32: Add function exports from new apr_crypto API's missing in 1.6.0.
 
-  *) apr_crypto_get_driver(): Fix invalid storage reference on error path.
- [Philip Martin ]
+  *) Win32: Introduce XML_PARSER build-time variable to select the expat
+ library name to be linked to libaprutil-1.dll. See Makefile.win
 
-  *) Fix compile failure for Android.  PR 56627.  [Fredrik Fornwall 
- , Jeff Trawick]
+  *) Win32: Removed lingering xml/xml.dsp project forked from the expat
+ Project in the 1.9x 

svn commit: r361691 - head/usr.bin/svn/lib/libapr

2020-06-01 Thread Dimitry Andric
Author: dim
Date: Mon Jun  1 10:08:18 2020
New Revision: 361691
URL: https://svnweb.freebsd.org/changeset/base/361691

Log:
  Follow-up r361678 (update apr to 1.7.0) by also regenerating the apr
  internal headers through the upstream configure script, with some minor
  custom tweaks.
  
  MFC after:2 weeks
  X-MFC-With:   r361677

Modified:
  head/usr.bin/svn/lib/libapr/apr.h
  head/usr.bin/svn/lib/libapr/apr_private.h

Modified: head/usr.bin/svn/lib/libapr/apr.h
==
--- head/usr.bin/svn/lib/libapr/apr.h   Mon Jun  1 09:15:15 2020
(r361690)
+++ head/usr.bin/svn/lib/libapr/apr.h   Mon Jun  1 10:08:18 2020
(r361691)
@@ -95,6 +95,7 @@
 #define APR_HAVE_STDLIB_H1
 #define APR_HAVE_STRING_H1
 #define APR_HAVE_STRINGS_H   1
+#define APR_HAVE_INTTYPES_H  1
 #define APR_HAVE_SYS_IOCTL_H 1
 #define APR_HAVE_SYS_SENDFILE_H  0
 #define APR_HAVE_SYS_SIGNAL_H1
@@ -170,16 +171,25 @@
 #include 
 #endif
 
-#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
+#if APR_HAVE_STDINT_H
+#ifdef __cplusplus
 /* C99 7.18.4 requires that stdint.h only exposes INT64_C 
  * and UINT64_C for C++ implementations if this is defined: */
+#ifndef __STDC_CONSTANT_MACROS
 #define __STDC_CONSTANT_MACROS
 #endif
-
-#if APR_HAVE_STDINT_H
+/* C++ needs this too for PRI*NN formats: */
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+#endif /* __cplusplus */
 #include 
 #endif
 
+#if APR_HAVE_INTTYPES_H
+#include 
+#endif
+
 #if APR_HAVE_SYS_WAIT_H
 #include 
 #endif
@@ -199,6 +209,13 @@
 #endif
 #endif
 
+/* __APPLE__ is now the official pre-defined macro for macOS */
+#ifdef __APPLE__
+#undef DARWIN
+#undef DARWIN_10
+#define DARWIN
+#define DARWIN_10
+#endif /* __APPLE__ */
 
 #ifdef __cplusplus
 extern "C" {
@@ -219,10 +236,10 @@ extern "C" {
 #define APR_HAVE_SHMEM_BEOS 0
 
 #define APR_USE_SHMEM_MMAP_TMP 0
-#define APR_USE_SHMEM_MMAP_SHM 1
+#define APR_USE_SHMEM_MMAP_SHM 0
 #define APR_USE_SHMEM_MMAP_ZERO0
 #define APR_USE_SHMEM_SHMGET_ANON  0
-#define APR_USE_SHMEM_SHMGET   0
+#define APR_USE_SHMEM_SHMGET   1
 #define APR_USE_SHMEM_MMAP_ANON1
 #define APR_USE_SHMEM_BEOS 0
 
@@ -237,7 +254,7 @@ extern "C" {
 #define APR_HAS_SYSVSEM_SERIALIZE 1
 #define APR_HAS_POSIXSEM_SERIALIZE1
 #define APR_HAS_FCNTL_SERIALIZE   1
-#define APR_HAS_PROC_PTHREAD_SERIALIZE0
+#define APR_HAS_PROC_PTHREAD_SERIALIZE1
 
 #define APR_PROCESS_LOCK_IS_GLOBAL0
 
@@ -247,6 +264,7 @@ extern "C" {
 #define APR_HAVE_INET_ADDR  1
 #define APR_HAVE_INET_NETWORK   1
 #define APR_HAVE_IPV6   1
+#define APR_HAVE_SOCKADDR_UN1
 #define APR_HAVE_MEMMOVE1
 #define APR_HAVE_SETRLIMIT  1
 #define APR_HAVE_SIGACTION  1
@@ -273,7 +291,7 @@ extern "C" {
 #define APR_HAS_FORK  1
 #define APR_HAS_RANDOM1
 #define APR_HAS_OTHER_CHILD   1
-#define APR_HAS_DSO   0
+#define APR_HAS_DSO   1
 #define APR_HAS_SO_ACCEPTFILTER   1
 #define APR_HAS_UNICODE_FS0
 #define APR_HAS_PROC_INVOKED  0
@@ -281,6 +299,7 @@ extern "C" {
 #define APR_HAS_LARGE_FILES   0
 #define APR_HAS_XTHREAD_FILES 0
 #define APR_HAS_OS_UUID   1
+#define APR_HAS_TIMEDLOCKS1
 
 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
 
@@ -340,31 +359,35 @@ typedef  unsigned intapr_uint32_t;
  */
 #ifdef DARWIN_10
 #undef APR_SIZEOF_VOIDP
-#undef INT64_C
-#undef UINT64_C
+#undef APR_INT64_C
+#undef APR_UINT64_C
 #ifdef __LP64__
  typedef  longapr_int64_t;
  typedef  unsigned long   apr_uint64_t;
  #define APR_SIZEOF_VOIDP 8
- #define INT64_C(v)   (v ## L)
- #define UINT64_C(v)  (v ## UL)
+ #define APR_INT64_C(v)   (v ## L)
+ #define APR_UINT64_C(v)  (v ## UL)
 #else
  typedef  long longapr_int64_t;
  typedef  unsigned long long   apr_uint64_t;
  #define APR_SIZEOF_VOIDP 4
- #define INT64_C(v)   (v ## LL)
- #define UINT64_C(v)  (v ## ULL)
+ #define APR_INT64_C(v)   (v ## LL)
+ #define APR_UINT64_C(v)  (v ## ULL)
 #endif
 #else
  typedef  __int64_tapr_int64_t;
  typedef  __uint64_t   apr_uint64_t;
+
+ /* Mechanisms to properly type numeric literals */
+ #define APR_INT64_C(val) INT64_C(val)
+ #define APR_UINT64_C(val) UINT64_C(val)
 #endif
 
 typedef  size_t  apr_size_t;
 typedef  ssize_t apr_ssize_t;
 typedef  off_t   apr_off_t;
 typedef  socklen_t   apr_socklen_t;
-typedef  unsigned int   apr_ino_t;
+typedef  __ino_t apr_ino_t;
 
 #if APR_SIZEOF_VOIDP == 8
 typedef  apr_uint64_tapr_uintptr_t;
@@ -380,10 +403,6 @@ typedef  apr_uint32_tapr_uintptr_t;
 #else
 #error Unknown byte order.
 #endif
-
-/* Mechanisms to properly type numeric literals */
-#define APR_INT64_C(val) INT64_C(val)
-#define APR_UINT64_C(val) UINT64_C(val)
 
 #ifdef INT16_MIN
 #define 

svn commit: r361681 - in head/usr.bin/svn: svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnmucc svnrdump svnserve svnsync svnversion

2020-05-31 Thread Dimitry Andric
Author: dim
Date: Sun May 31 22:40:39 2020
New Revision: 361681
URL: https://svnweb.freebsd.org/changeset/base/361681

Log:
  Change more Makefiles under usr.bin/svn to make them easier to
  incrementally update. No functional change intended.
  
  MFC after:2 weeks
  X-MFC-With:   r361677

Modified:
  head/usr.bin/svn/svn/Makefile
  head/usr.bin/svn/svnadmin/Makefile
  head/usr.bin/svn/svnbench/Makefile
  head/usr.bin/svn/svndumpfilter/Makefile
  head/usr.bin/svn/svnfsfs/Makefile
  head/usr.bin/svn/svnlook/Makefile
  head/usr.bin/svn/svnmucc/Makefile
  head/usr.bin/svn/svnrdump/Makefile
  head/usr.bin/svn/svnserve/Makefile
  head/usr.bin/svn/svnsync/Makefile
  head/usr.bin/svn/svnversion/Makefile

Modified: head/usr.bin/svn/svn/Makefile
==
--- head/usr.bin/svn/svn/Makefile   Sun May 31 22:37:33 2020
(r361680)
+++ head/usr.bin/svn/svn/Makefile   Sun May 31 22:40:39 2020
(r361681)
@@ -2,54 +2,111 @@
 
 .include "${.CURDIR:H}/Makefile.inc"
 
-.PATH: ${SVNDIR}/svn
+.PATH: ${SVNDIR}/svn
 
-PROG=  svn${SVNLITE}
+PROG=  svn${SVNLITE}
 
-SRCS=  add-cmd.c auth-cmd.c blame-cmd.c cat-cmd.c changelist-cmd.c \
-   checkout-cmd.c cl-conflicts.c cleanup-cmd.c commit-cmd.c \
-   conflict-callbacks.c copy-cmd.c delete-cmd.c deprecated.c \
-   diff-cmd.c export-cmd.c file-merge.c help-cmd.c import-cmd.c \
-   info-cmd.c list-cmd.c lock-cmd.c log-cmd.c merge-cmd.c \
-   mergeinfo-cmd.c mkdir-cmd.c move-cmd.c notify.c patch-cmd.c \
-   propdel-cmd.c propedit-cmd.c propget-cmd.c proplist-cmd.c \
-   props.c propset-cmd.c relocate-cmd.c resolve-cmd.c \
-   resolved-cmd.c revert-cmd.c \
-   shelve-cmd.c status-cmd.c similarity.c status.c \
-   svn.c switch-cmd.c unlock-cmd.c update-cmd.c upgrade-cmd.c util.c
+SRCS=  add-cmd.c \
+   auth-cmd.c \
+   blame-cmd.c \
+   cat-cmd.c \
+   changelist-cmd.c \
+   checkout-cmd.c \
+   cl-conflicts.c \
+   cleanup-cmd.c \
+   commit-cmd.c \
+   conflict-callbacks.c \
+   copy-cmd.c \
+   delete-cmd.c \
+   deprecated.c \
+   diff-cmd.c \
+   export-cmd.c \
+   file-merge.c \
+   help-cmd.c \
+   import-cmd.c \
+   info-cmd.c \
+   list-cmd.c \
+   lock-cmd.c \
+   log-cmd.c \
+   merge-cmd.c \
+   mergeinfo-cmd.c \
+   mkdir-cmd.c \
+   move-cmd.c \
+   notify.c \
+   patch-cmd.c \
+   propdel-cmd.c \
+   propedit-cmd.c \
+   propget-cmd.c \
+   proplist-cmd.c \
+   props.c \
+   propset-cmd.c \
+   relocate-cmd.c \
+   resolve-cmd.c \
+   resolved-cmd.c \
+   revert-cmd.c \
+   shelve-cmd.c \
+   status-cmd.c \
+   similarity.c \
+   status.c \
+   svn.c \
+   switch-cmd.c \
+   unlock-cmd.c \
+   update-cmd.c \
+   upgrade-cmd.c \
+   util.c
 
-CFLAGS+=-I${SVNDIR}/include -I${SVNDIR} -I${.CURDIR:H} \
-   -I${.CURDIR:H}/lib/libapr \
-   -I${APR}/include/arch/unix \
-   -I${APR}/include \
-   -I${.CURDIR:H}/lib/libapr_util \
-   -I${APRU}/include/private \
-   -I${APRU}/include
+CFLAGS+=   -I${SVNDIR}/include \
+   -I${SVNDIR} \
+   -I${.CURDIR:H} \
+   -I${.CURDIR:H}/lib/libapr \
+   -I${APR}/include/arch/unix \
+   -I${APR}/include \
+   -I${.CURDIR:H}/lib/libapr_util \
+   -I${APRU}/include/private \
+   -I${APRU}/include
 
-LDADD= -L${LIBSVN_CLIENTDIR} -lsvn_client${PIE_SUFFIX} \
-   -L${LIBSVN_WCDIR} -lsvn_wc${PIE_SUFFIX} \
-   -L${LIBSVN_RADIR} -lsvn_ra${PIE_SUFFIX} \
-   -L${LIBSVN_RA_LOCALDIR} -lsvn_ra_local${PIE_SUFFIX} \
-   -L${LIBSVN_RA_SVNDIR} -lsvn_ra_svn${PIE_SUFFIX} \
-   -L${LIBSVN_RA_SERFDIR} -lsvn_ra_serf${PIE_SUFFIX} \
-   -L${LIBSVN_REPOSDIR} -lsvn_repos${PIE_SUFFIX} \
-   -L${LIBSVN_FSDIR} -lsvn_fs${PIE_SUFFIX} \
-   -L${LIBSVN_FS_FSDIR} -lsvn_fs_fs${PIE_SUFFIX} \
-   -L${LIBSVN_FS_XDIR} -lsvn_fs_x${PIE_SUFFIX} \
-   -L${LIBSVN_FS_UTILDIR} -lsvn_fs_util${PIE_SUFFIX} \
-   -L${LIBSVN_DELTADIR} -lsvn_delta${PIE_SUFFIX} \
-   -L${LIBSVN_DIFFDIR} -lsvn_diff${PIE_SUFFIX} \
-   -L${LIBSVN_SUBRDIR} -lsvn_subr${PIE_SUFFIX} \
-   -L${LIBSERFDIR} -lserf${PIE_SUFFIX} \
-   -L${LIBAPR_UTILDIR} -lapr-util${PIE_SUFFIX} \
-   -L${LIBAPRDIR} -lapr${PIE_SUFFIX}
-LIBADD+=   bsdxml sqlite3 z magic crypto ssl pthread
+LDADD= -L${LIBSVN_CLIENTDIR} -lsvn_client${PIE_SUFFIX} 

svn commit: r361678 - in head: contrib/apr contrib/apr/atomic/unix contrib/apr/docs contrib/apr/encoding contrib/apr/file_io/unix contrib/apr/include contrib/apr/include/arch/unix contrib/apr/inclu...

2020-05-31 Thread Dimitry Andric
Author: dim
Date: Sun May 31 22:12:56 2020
New Revision: 361678
URL: https://svnweb.freebsd.org/changeset/base/361678

Log:
  Update apr to 1.7.0. See contrib/apr/CHANGES for a summary of changes.
  
  MFC after:2 weeks
  X-MFC-With:   r361677

Added:
  head/contrib/apr/atomic/unix/builtins64.c
 - copied unchanged from r361671, vendor/apr/dist/atomic/unix/builtins64.c
  head/contrib/apr/atomic/unix/mutex64.c
 - copied unchanged from r361671, vendor/apr/dist/atomic/unix/mutex64.c
  head/contrib/apr/encoding/apr_encode.c
 - copied unchanged from r361671, vendor/apr/dist/encoding/apr_encode.c
  head/contrib/apr/include/apr_cstr.h
 - copied unchanged from r361671, vendor/apr/dist/include/apr_cstr.h
  head/contrib/apr/include/apr_encode.h
 - copied unchanged from r361671, vendor/apr/dist/include/apr_encode.h
  head/contrib/apr/include/apr_perms_set.h
 - copied unchanged from r361671, vendor/apr/dist/include/apr_perms_set.h
  head/contrib/apr/include/private/
 - copied from r361671, vendor/apr/dist/include/private/
  head/contrib/apr/poll/unix/wakeup.c
 - copied unchanged from r361671, vendor/apr/dist/poll/unix/wakeup.c
  head/contrib/apr/strings/apr_cstr.c
 - copied unchanged from r361671, vendor/apr/dist/strings/apr_cstr.c
  head/usr.bin/svn/lib/libapr/apr_escape_test_char.h   (contents, props changed)
Modified:
  head/contrib/apr/CHANGES
  head/contrib/apr/CMakeLists.txt
  head/contrib/apr/Makefile.in
  head/contrib/apr/Makefile.win
  head/contrib/apr/NOTICE
  head/contrib/apr/NWGNUmakefile
  head/contrib/apr/apr.dsp
  head/contrib/apr/apr.mak
  head/contrib/apr/apr.spec
  head/contrib/apr/atomic/unix/ia32.c
  head/contrib/apr/atomic/unix/mutex.c
  head/contrib/apr/atomic/unix/ppc.c
  head/contrib/apr/atomic/unix/s390.c
  head/contrib/apr/atomic/unix/solaris.c
  head/contrib/apr/build-outputs.mk
  head/contrib/apr/buildconf
  head/contrib/apr/config.layout
  head/contrib/apr/configure
  head/contrib/apr/configure.in
  head/contrib/apr/docs/APRDesign.html
  head/contrib/apr/docs/canonical_filenames.html
  head/contrib/apr/docs/incomplete_types
  head/contrib/apr/docs/pool-design.html
  head/contrib/apr/encoding/apr_escape.c
  head/contrib/apr/file_io/unix/copy.c
  head/contrib/apr/file_io/unix/dir.c
  head/contrib/apr/file_io/unix/flock.c
  head/contrib/apr/file_io/unix/pipe.c
  head/contrib/apr/file_io/unix/readwrite.c
  head/contrib/apr/file_io/unix/seek.c
  head/contrib/apr/include/apr.h.in
  head/contrib/apr/include/apr.hnw
  head/contrib/apr/include/apr.hw
  head/contrib/apr/include/apr.hwc
  head/contrib/apr/include/apr_allocator.h
  head/contrib/apr/include/apr_atomic.h
  head/contrib/apr/include/apr_errno.h
  head/contrib/apr/include/apr_escape.h
  head/contrib/apr/include/apr_file_info.h
  head/contrib/apr/include/apr_file_io.h
  head/contrib/apr/include/apr_general.h
  head/contrib/apr/include/apr_global_mutex.h
  head/contrib/apr/include/apr_hash.h
  head/contrib/apr/include/apr_network_io.h
  head/contrib/apr/include/apr_poll.h
  head/contrib/apr/include/apr_portable.h
  head/contrib/apr/include/apr_proc_mutex.h
  head/contrib/apr/include/apr_shm.h
  head/contrib/apr/include/apr_skiplist.h
  head/contrib/apr/include/apr_strings.h
  head/contrib/apr/include/apr_tables.h
  head/contrib/apr/include/apr_thread_mutex.h
  head/contrib/apr/include/apr_thread_proc.h
  head/contrib/apr/include/apr_time.h
  head/contrib/apr/include/apr_version.h
  head/contrib/apr/include/arch/unix/apr_arch_atomic.h
  head/contrib/apr/include/arch/unix/apr_arch_networkio.h
  head/contrib/apr/include/arch/unix/apr_arch_poll_private.h
  head/contrib/apr/include/arch/unix/apr_arch_proc_mutex.h
  head/contrib/apr/include/arch/unix/apr_arch_shm.h
  head/contrib/apr/include/arch/unix/apr_arch_thread_mutex.h
  head/contrib/apr/include/arch/unix/apr_arch_threadproc.h
  head/contrib/apr/include/arch/unix/apr_private.h.in
  head/contrib/apr/libapr.dsp
  head/contrib/apr/libapr.mak
  head/contrib/apr/locks/unix/global_mutex.c
  head/contrib/apr/locks/unix/proc_mutex.c
  head/contrib/apr/locks/unix/thread_cond.c
  head/contrib/apr/locks/unix/thread_mutex.c
  head/contrib/apr/memory/unix/apr_pools.c
  head/contrib/apr/misc/unix/errorcodes.c
  head/contrib/apr/misc/unix/rand.c
  head/contrib/apr/network_io/unix/multicast.c
  head/contrib/apr/network_io/unix/sockaddr.c
  head/contrib/apr/network_io/unix/sockets.c
  head/contrib/apr/network_io/unix/sockopt.c
  head/contrib/apr/poll/unix/epoll.c
  head/contrib/apr/poll/unix/kqueue.c
  head/contrib/apr/poll/unix/poll.c
  head/contrib/apr/poll/unix/pollcb.c
  head/contrib/apr/poll/unix/pollset.c
  head/contrib/apr/poll/unix/port.c
  head/contrib/apr/poll/unix/select.c
  head/contrib/apr/poll/unix/z_asio.c
  head/contrib/apr/shmem/unix/shm.c
  head/contrib/apr/strings/apr_cpystrn.c
  head/contrib/apr/strings/apr_fnmatch.c
  head/contrib/apr/strings/apr_snprintf.c
  head/contrib/apr/tables/apr_skiplist.c
  head/contrib/apr/tables/apr_tables.c
  

svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/libs...

2020-05-31 Thread Dimitry Andric
Author: dim
Date: Sun May 31 22:04:51 2020
New Revision: 361677
URL: https://svnweb.freebsd.org/changeset/base/361677

Log:
  Change Makefiles under usr.bin/svn to make them easier to incrementally
  update. No functional change intended.
  
  MFC after:2 weeks

Modified:
  head/usr.bin/svn/Makefile
  head/usr.bin/svn/lib/Makefile
  head/usr.bin/svn/lib/libapr/Makefile
  head/usr.bin/svn/lib/libapr_util/Makefile
  head/usr.bin/svn/lib/libserf/Makefile
  head/usr.bin/svn/lib/libsvn_client/Makefile
  head/usr.bin/svn/lib/libsvn_delta/Makefile
  head/usr.bin/svn/lib/libsvn_diff/Makefile
  head/usr.bin/svn/lib/libsvn_fs/Makefile
  head/usr.bin/svn/lib/libsvn_fs_fs/Makefile
  head/usr.bin/svn/lib/libsvn_fs_util/Makefile
  head/usr.bin/svn/lib/libsvn_fs_x/Makefile
  head/usr.bin/svn/lib/libsvn_ra/Makefile
  head/usr.bin/svn/lib/libsvn_ra_local/Makefile
  head/usr.bin/svn/lib/libsvn_ra_serf/Makefile
  head/usr.bin/svn/lib/libsvn_ra_svn/Makefile
  head/usr.bin/svn/lib/libsvn_repos/Makefile
  head/usr.bin/svn/lib/libsvn_subr/Makefile
  head/usr.bin/svn/lib/libsvn_wc/Makefile

Modified: head/usr.bin/svn/Makefile
==
--- head/usr.bin/svn/Makefile   Sun May 31 21:56:07 2020(r361676)
+++ head/usr.bin/svn/Makefile   Sun May 31 22:04:51 2020(r361677)
@@ -1,8 +1,18 @@
 # $FreeBSD$
 
-SUBDIR=lib .WAIT \
-   svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnserve \
-   svnsync svnversion svnmucc svnrdump
+SUBDIR=lib \
+   .WAIT \
+   svn \
+   svnadmin \
+   svnbench \
+   svndumpfilter \
+   svnfsfs \
+   svnlook \
+   svnserve \
+   svnsync \
+   svnversion \
+   svnmucc \
+   svnrdump
 SUBDIR_PARALLEL=
 
 .include 

Modified: head/usr.bin/svn/lib/Makefile
==
--- head/usr.bin/svn/lib/Makefile   Sun May 31 21:56:07 2020
(r361676)
+++ head/usr.bin/svn/lib/Makefile   Sun May 31 22:04:51 2020
(r361677)
@@ -1,9 +1,22 @@
 # $FreeBSD$
 
-SUBDIR=libapr libapr_util libserf \
-   libsvn_client libsvn_delta libsvn_diff libsvn_fs libsvn_fs_fs \
-   libsvn_fs_util libsvn_fs_x libsvn_ra libsvn_ra_local libsvn_ra_serf \
-   libsvn_ra_svn libsvn_repos libsvn_subr libsvn_wc
+SUBDIR=libapr \
+   libapr_util \
+   libserf \
+   libsvn_client \
+   libsvn_delta \
+   libsvn_diff \
+   libsvn_fs \
+   libsvn_fs_fs \
+   libsvn_fs_util \
+   libsvn_fs_x \
+   libsvn_ra \
+   libsvn_ra_local \
+   libsvn_ra_serf \
+   libsvn_ra_svn \
+   libsvn_repos \
+   libsvn_subr \
+   libsvn_wc
 SUBDIR_PARALLEL=
 
 .include 

Modified: head/usr.bin/svn/lib/libapr/Makefile
==
--- head/usr.bin/svn/lib/libapr/MakefileSun May 31 21:56:07 2020
(r361676)
+++ head/usr.bin/svn/lib/libapr/MakefileSun May 31 22:04:51 2020
(r361677)
@@ -4,31 +4,109 @@
 
 INTERNALLIB=   yes
 LIB=   apr
-SRCS=  apr_cpystrn.c apr_fnmatch.c apr_getpass.c apr_hash.c 
apr_skiplist.c \
-   apr_pools.c apr_random.c apr_snprintf.c apr_strings.c \
-   apr_strnatcmp.c apr_strtok.c apr_tables.c buffer.c \
-   builtins.c charset.c common.c copy.c dir.c dso.c env.c \
-   epoll.c errorcodes.c fileacc.c filedup.c filepath.c \
-   filepath_util.c filestat.c flock.c fullrw.c getopt.c \
-   global_mutex.c groupinfo.c ia32.c inet_ntop.c inet_pton.c \
-   kqueue.c mktemp.c mmap.c multicast.c mutex.c open.c \
-   otherchild.c pipe.c poll.c pollcb.c pollset.c port.c \
-   ppc.c proc.c proc_mutex.c procsup.c rand.c readwrite.c \
-   s390.c seek.c select.c sendrecv.c sha2.c sha2_glue.c \
-   shm.c signals.c sockaddr.c socket_util.c sockets.c \
-   sockopt.c solaris.c start.c tempdir.c thread.c thread_cond.c \
-   thread_mutex.c thread_rwlock.c threadpriv.c time.c \
-   timestr.c userinfo.c version.c waitio.c z_asio.c
+SRCS=  apr_cpystrn.c \
+   apr_fnmatch.c \
+   apr_getpass.c \
+   apr_hash.c \
+   apr_pools.c \
+   apr_random.c \
+   apr_skiplist.c \
+   apr_snprintf.c \
+   apr_strings.c \
+   apr_strnatcmp.c \
+   apr_strtok.c \
+   apr_tables.c \
+   buffer.c \
+   builtins.c \
+   charset.c \
+   common.c \
+   copy.c \
+   dir.c \
+   dso.c \
+   env.c \
+   epoll.c \
+   errorcodes.c \
+   fileacc.c \
+   filedup.c \
+   filepath.c \
+   

svn commit: r361410 - in head: . contrib/llvm-project contrib/llvm-project/clang/include/clang/AST contrib/llvm-project/clang/include/clang/Basic contrib/llvm-project/clang/lib/AST contrib/llvm-pro...

2020-05-23 Thread Dimitry Andric
Author: dim
Date: Sat May 23 10:32:18 2020
New Revision: 361410
URL: https://svnweb.freebsd.org/changeset/base/361410

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.1-rc1-0-gf79cd71e145 (aka 10.0.1 rc1).
  
  MFC after:3 weeks

Modified:
  head/ObsoleteFiles.inc
  head/UPDATING
  head/contrib/llvm-project/FREEBSD-Xlist
  head/contrib/llvm-project/clang/include/clang/AST/DeclBase.h
  head/contrib/llvm-project/clang/include/clang/Basic/Attr.td
  head/contrib/llvm-project/clang/lib/AST/DeclBase.cpp
  head/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
  head/contrib/llvm-project/clang/lib/AST/RawCommentList.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Darwin.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.h
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Hurd.h
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Linux.h
  head/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  head/contrib/llvm-project/clang/lib/Sema/TreeTransform.h
  head/contrib/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c
  head/contrib/llvm-project/lld/COFF/MarkLive.cpp
  head/contrib/llvm-project/lld/ELF/Driver.cpp
  head/contrib/llvm-project/lld/ELF/InputSection.cpp
  head/contrib/llvm-project/lld/ELF/InputSection.h
  head/contrib/llvm-project/lld/ELF/OutputSections.cpp
  head/contrib/llvm-project/lld/ELF/Writer.cpp
  head/contrib/llvm-project/llvm/include/llvm/Analysis/ValueLattice.h
  
head/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/GlobalTypeTableBuilder.h
  head/contrib/llvm-project/llvm/lib/Analysis/LazyValueInfo.cpp
  head/contrib/llvm-project/llvm/lib/Analysis/ValueLattice.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/MachineSink.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  
head/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp
  head/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
  head/contrib/llvm-project/llvm/lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp
  head/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
  head/contrib/llvm-project/llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86IndirectBranchTracking.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86TargetMachine.cpp
  head/contrib/llvm-project/llvm/lib/Target/X86/X86TargetMachine.h
  head/contrib/llvm-project/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  head/contrib/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  
head/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
  head/contrib/llvm-project/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
  head/contrib/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp
  head/contrib/llvm-project/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
  head/etc/mtree/BSD.debug.dist
  head/etc/mtree/BSD.usr.dist
  head/lib/clang/headers/Makefile
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/clang/Basic/Version.inc
  head/lib/clang/include/clang/Config/config.h
  head/lib/clang/include/lld/Common/Version.inc
  head/lib/clang/include/llvm/Config/config.h
  head/lib/clang/include/llvm/Config/llvm-config.h
  head/lib/clang/include/llvm/Support/VCSRevision.h
  head/lib/libclang_rt/Makefile.inc
  head/sys/sys/param.h
  head/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/compiler-rt/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sat May 23 10:21:02 2020(r361409)
+++ head/ObsoleteFiles.inc  Sat May 23 10:32:18 2020(r361410)
@@ -36,6 +36,257 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20200523: new clang import which bumps version from 10.0.0 to 10.0.1.s
+OLD_FILES+=usr/lib/clang/10.0.0/include/cuda_wrappers/algorithm
+OLD_FILES+=usr/lib/clang/10.0.0/include/cuda_wrappers/complex
+OLD_FILES+=usr/lib/clang/10.0.0/include/cuda_wrappers/new
+OLD_DIRS+=usr/lib/clang/10.0.0/include/cuda_wrappers

svn commit: r360915 - head/lib/csu

2020-05-11 Thread Dimitry Andric
Author: dim
Date: Mon May 11 19:36:38 2020
New Revision: 360915
URL: https://svnweb.freebsd.org/changeset/base/360915

Log:
  Use -fno-asynchronous-unwind-tables to compile lib/csu
  
  Summary:
  In r209294 kib added -fno-asynchronous-unwind-tables to the compile
  flags for the GNU C startup components. This was done to work around a
  BFD ld assertion, "no .eh_frame_hdr table will be created", which is
  produced because of the layout of the startup objects.
  
  Add the same flag to lib/csu too, for the same reason. And similarly to
  r209294, also add -fno-omit-frame-pointer.
  
  This is primarily meant to quickly MFC to stable/11, so it can end up in
  the 11.4 release, as a fix for https://bugs.freebsd.org/246322.
  
  PR:   246322
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D24797

Modified:
  head/lib/csu/Makefile.inc

Modified: head/lib/csu/Makefile.inc
==
--- head/lib/csu/Makefile.inc   Mon May 11 19:17:33 2020(r360914)
+++ head/lib/csu/Makefile.inc   Mon May 11 19:36:38 2020(r360915)
@@ -13,6 +13,9 @@ NO_WMISSING_VARIABLE_DECLARATIONS=
 OBJS+= crtbegin.o crtbeginS.o crtbeginT.o
 OBJS+= crtend.o crtendS.o
 
+CFLAGS+=   -fno-asynchronous-unwind-tables
+CFLAGS+=   -fno-omit-frame-pointer
+
 CFLAGS_CRTS=   -DSHARED ${PICFLAG}
 
 crtbegin.o: crtbegin.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360702 - in head/contrib/llvm-project/clang: include/clang/Driver lib/CodeGen lib/Driver/ToolChains lib/Frontend

2020-05-06 Thread Dimitry Andric
Author: dim
Date: Wed May  6 19:10:39 2020
New Revision: 360702
URL: https://svnweb.freebsd.org/changeset/base/360702

Log:
  Merge commit 4ca2cad94 from llvm git (by Justin Hibbits):
  
[PowerPC] Add clang -msvr4-struct-return for 32-bit ELF
  
Summary:
  
Change the default ABI to be compatible with GCC. For 32-bit ELF
targets other than Linux, Clang now returns small structs in
registers r3/r4. This affects FreeBSD, NetBSD, OpenBSD. There is no
change for 32-bit Linux, where Clang continues to return all structs
in memory.
  
Add clang options -maix-struct-return (to return structs in memory)
and -msvr4-struct-return (to return structs in registers) to be
compatible with gcc. These options are only for PPC32; reject them on
PPC64 and other targets. The options are like -fpcc-struct-return and
-freg-struct-return for X86_32, and use similar code.
  
To actually return a struct in registers, coerce it to an integer of
the same size. LLVM may optimize the code to remove unnecessary
accesses to memory, and will return i32 in r3 or i64 in r3:r4.
  
Fixes PR#40736
  
Patch by George Koehler!
  
Reviewed By: jhibbits, nemanjai
Differential Revision: https://reviews.llvm.org/D73290
  
  Requested by: jhibbits
  MFC after:3 days

Modified:
  head/contrib/llvm-project/clang/include/clang/Driver/Options.td
  head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Clang.cpp
  head/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp

Modified: head/contrib/llvm-project/clang/include/clang/Driver/Options.td
==
--- head/contrib/llvm-project/clang/include/clang/Driver/Options.td Wed May 
 6 18:43:27 2020(r360701)
+++ head/contrib/llvm-project/clang/include/clang/Driver/Options.td Wed May 
 6 19:10:39 2020(r360702)
@@ -2439,6 +2439,12 @@ def mlongcall: Flag<["-"], "mlongcall">,
 Group;
 def mno_longcall : Flag<["-"], "mno-longcall">,
 Group;
+def maix_struct_return : Flag<["-"], "maix-struct-return">,
+  Group, Flags<[CC1Option]>,
+  HelpText<"Return all structs in memory (PPC32 only)">;
+def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">,
+  Group, Flags<[CC1Option]>,
+  HelpText<"Return small structs in registers (PPC32 only)">;
 
 def mvx : Flag<["-"], "mvx">, Group;
 def mno_vx : Flag<["-"], "mno-vx">, Group;

Modified: head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp  Wed May  6 
18:43:27 2020(r360701)
+++ head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp  Wed May  6 
19:10:39 2020(r360702)
@@ -4123,22 +4123,39 @@ namespace {
 /// PPC32_SVR4_ABIInfo - The 32-bit PowerPC ELF (SVR4) ABI information.
 class PPC32_SVR4_ABIInfo : public DefaultABIInfo {
   bool IsSoftFloatABI;
+  bool IsRetSmallStructInRegABI;
 
   CharUnits getParamTypeAlignment(QualType Ty) const;
 
 public:
-  PPC32_SVR4_ABIInfo(CodeGen::CodeGenTypes , bool SoftFloatABI)
-  : DefaultABIInfo(CGT), IsSoftFloatABI(SoftFloatABI) {}
+  PPC32_SVR4_ABIInfo(CodeGen::CodeGenTypes , bool SoftFloatABI,
+ bool RetSmallStructInRegABI)
+  : DefaultABIInfo(CGT), IsSoftFloatABI(SoftFloatABI),
+IsRetSmallStructInRegABI(RetSmallStructInRegABI) {}
 
+  ABIArgInfo classifyReturnType(QualType RetTy) const;
+
+  void computeInfo(CGFunctionInfo ) const override {
+if (!getCXXABI().classifyReturnType(FI))
+  FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
+for (auto  : FI.arguments())
+  I.info = classifyArgumentType(I.type);
+  }
+
   Address EmitVAArg(CodeGenFunction , Address VAListAddr,
 QualType Ty) const override;
 };
 
 class PPC32TargetCodeGenInfo : public TargetCodeGenInfo {
 public:
-  PPC32TargetCodeGenInfo(CodeGenTypes , bool SoftFloatABI)
-  : TargetCodeGenInfo(new PPC32_SVR4_ABIInfo(CGT, SoftFloatABI)) {}
+  PPC32TargetCodeGenInfo(CodeGenTypes , bool SoftFloatABI,
+ bool RetSmallStructInRegABI)
+  : TargetCodeGenInfo(new PPC32_SVR4_ABIInfo(CGT, SoftFloatABI,
+ RetSmallStructInRegABI)) {}
 
+  static bool isStructReturnInRegABI(const llvm::Triple ,
+ const CodeGenOptions );
+
   int getDwarfEHStackPointer(CodeGen::CodeGenModule ) const override {
 // This is recovered from gcc output.
 return 1; // r1 is the dedicated stack pointer
@@ -4173,6 +4190,34 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(Qu
   return CharUnits::fromQuantity(4);
 }
 
+ABIArgInfo PPC32_SVR4_ABIInfo::classifyReturnType(QualType RetTy) const {
+  uint64_t Size;
+
+  // -msvr4-struct-return puts small aggregates in GPR3 and GPR4.
+  if 

svn commit: r360697 - head/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc

2020-05-06 Thread Dimitry Andric
Author: dim
Date: Wed May  6 18:13:00 2020
New Revision: 360697
URL: https://svnweb.freebsd.org/changeset/base/360697

Log:
  In r358396 I merged llvm upstream commit 2e24219d3, which fixed "error:
  unsupported relocation on symbol" when assembling arm 'adr' pseudo
  instructions. However, the upstream commit did not take big-endian arm
  into account.
  
  Applying the same changes to the big-endian handling is straightforward,
  thanks to Andrew Turner and Peter Smith for the hint. This will also be
  submitted upstream.
  
  MFC after:immediately, since this fix is meant for stable/11

Modified:
  head/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp

Modified: 
head/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
==
--- 
head/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
Wed May  6 17:44:17 2020(r360696)
+++ 
head/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
Wed May  6 18:13:00 2020(r360697)
@@ -116,26 +116,22 @@ const MCFixupKindInfo ::getFixupKindInfo
   // ARMFixupKinds.h.
   //
   // Name  Offset (bits) Size (bits) Flags
-  {"fixup_arm_ldst_pcrel_12", 0, 32, MCFixupKindInfo::FKF_IsPCRel},
+  {"fixup_arm_ldst_pcrel_12", 0, 32, IsPCRelConstant},
   {"fixup_t2_ldst_pcrel_12", 0, 32,
-   MCFixupKindInfo::FKF_IsPCRel |
-   MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
-  {"fixup_arm_pcrel_10_unscaled", 0, 32, MCFixupKindInfo::FKF_IsPCRel},
-  {"fixup_arm_pcrel_10", 0, 32, MCFixupKindInfo::FKF_IsPCRel},
+   IsPCRelConstant | MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
+  {"fixup_arm_pcrel_10_unscaled", 0, 32, IsPCRelConstant},
+  {"fixup_arm_pcrel_10", 0, 32, IsPCRelConstant},
   {"fixup_t2_pcrel_10", 0, 32,
MCFixupKindInfo::FKF_IsPCRel |
MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
   {"fixup_arm_pcrel_9", 0, 32, MCFixupKindInfo::FKF_IsPCRel},
   {"fixup_t2_pcrel_9", 0, 32,
-   MCFixupKindInfo::FKF_IsPCRel |
-   MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
+   IsPCRelConstant | MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
   {"fixup_thumb_adr_pcrel_10", 8, 8,
-   MCFixupKindInfo::FKF_IsPCRel |
-   MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
-  {"fixup_arm_adr_pcrel_12", 0, 32, MCFixupKindInfo::FKF_IsPCRel},
+   IsPCRelConstant | MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
+  {"fixup_arm_adr_pcrel_12", 0, 32, IsPCRelConstant},
   {"fixup_t2_adr_pcrel_12", 0, 32,
-   MCFixupKindInfo::FKF_IsPCRel |
-   MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
+   IsPCRelConstant | MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
   {"fixup_arm_condbranch", 8, 24, MCFixupKindInfo::FKF_IsPCRel},
   {"fixup_arm_uncondbranch", 8, 24, MCFixupKindInfo::FKF_IsPCRel},
   {"fixup_t2_condbranch", 0, 32, MCFixupKindInfo::FKF_IsPCRel},
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360350 - head/contrib/llvm-project/llvm/lib/Target/ARM

2020-04-26 Thread Dimitry Andric
Author: dim
Date: Sun Apr 26 19:17:45 2020
New Revision: 360350
URL: https://svnweb.freebsd.org/changeset/base/360350

Log:
  Tentatively apply https://reviews.llvm.org/D78877 (by Dave Green):
  
[ARM] Only produce qadd8b under hasV6Ops
  
When compiling for a arm5te cpu from clang, the +dsp attribute is
set. This meant we could try and generate qadd8 instructions where we
would end up having no pattern. I've changed the condition here to be
hasV6Ops && hasDSP, which is what other parts of ARMISelLowering seem
to use for similar instructions.
  
Fixed PR45677.
  
  This fixes "fatal error: error in backend: Cannot select: t37: i32 =
  ARMISD::QADD8b t43, t44" when compiling sys/dev/sound/pcm/feeder_mixer.c
  for armv5. For some reason we do not encounter this on head, but this
  error popped up while building universes for stable/12.
  
  MFC after:3 days

Modified:
  head/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp

Modified: head/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp   Sun Apr 
26 18:42:38 2020(r360349)
+++ head/contrib/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp   Sun Apr 
26 19:17:45 2020(r360350)
@@ -4549,7 +4549,7 @@ SDValue ARMTargetLowering::LowerUnsignedALUO(SDValue O
 static SDValue LowerSADDSUBSAT(SDValue Op, SelectionDAG ,
const ARMSubtarget *Subtarget) {
   EVT VT = Op.getValueType();
-  if (!Subtarget->hasDSP())
+  if (!Subtarget->hasV6Ops() || !Subtarget->hasDSP())
 return SDValue();
   if (!VT.isSimple())
 return SDValue();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360322 - head

2020-04-25 Thread Dimitry Andric
Author: dim
Date: Sat Apr 25 20:24:41 2020
New Revision: 360322
URL: https://svnweb.freebsd.org/changeset/base/360322

Log:
  Fix race between prebuilding libsbuf and libgeom
  
  The latter needs the former, but with a multi-job build on a fast
  machine, the race is sometimes lost. This leads to "ld: error: unable to
  find library -lsbuf", when linking libgeom.so.
  
  Submitted by: kevans
  MFC after:3 days

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Apr 25 20:00:44 2020(r360321)
+++ head/Makefile.inc1  Sat Apr 25 20:24:41 2020(r360322)
@@ -2760,7 +2760,7 @@ gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw
 _prebuild_libs+= lib/libc++
 .endif
 
-lib/libgeom__L: lib/libexpat__L
+lib/libgeom__L: lib/libexpat__L lib/libsbuf__L
 lib/libkvm__L: lib/libelf__L
 
 .if ${MK_LIBTHR} != "no"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360134 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-04-20 Thread Dimitry Andric
Author: dim
Date: Mon Apr 20 19:16:10 2020
New Revision: 360134
URL: https://svnweb.freebsd.org/changeset/base/360134

Log:
  Merge commit 64b31d96d from llvm git (by Nemanja Ivanovic):
  
[PowerPC] Do not attempt to reuse load for 64-bit FP_TO_UINT without
FPCVT
  
We call the function that attempts to reuse the conversion without
checking whether the target matches the constraints that the callee
expects. This patch adds the check prior to the call.
  
Fixes: https://bugs.llvm.org/show_bug.cgi?id=43976
  
Differential revision: https://reviews.llvm.org/D77564
  
  This should fix 'Assertion failed: ((Op.getOpcode() == ISD::FP_TO_SINT
  || Subtarget.hasFPCVT()) && "i64 FP_TO_UINT is supported only with
  FPCVT"), function LowerFP_TO_INTForReuse, file
  /usr/src/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp, line 7276'
  when building the devel/libslang2 port (and a few others) for PowerPC64.
  
  Requested by: pkubaj
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Mon Apr 20 19:08:45 2020(r360133)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Mon Apr 20 19:16:10 2020(r360134)
@@ -7848,9 +7848,10 @@ bool PPCTargetLowering::canReuseLoadAddress(SDValue Op
 SelectionDAG ,
 ISD::LoadExtType ET) const {
   SDLoc dl(Op);
+  bool ValidFPToUint = Op.getOpcode() == ISD::FP_TO_UINT &&
+   (Subtarget.hasFPCVT() || Op.getValueType() == MVT::i32);
   if (ET == ISD::NON_EXTLOAD &&
-  (Op.getOpcode() == ISD::FP_TO_UINT ||
-   Op.getOpcode() == ISD::FP_TO_SINT) &&
+  (ValidFPToUint || Op.getOpcode() == ISD::FP_TO_SINT) &&
   isOperationLegalOrCustom(Op.getOpcode(),
Op.getOperand(0).getValueType())) {
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r360129 - head/contrib/llvm-project/clang/lib/CodeGen

2020-04-20 Thread Dimitry Andric
Author: dim
Date: Mon Apr 20 17:39:51 2020
New Revision: 360129
URL: https://svnweb.freebsd.org/changeset/base/360129

Log:
  Merge commit ce5173c0e from llvm git (by Reid Kleckner):
  
Use FinishThunk to finish musttail thunks
  
FinishThunk, and the invariant of setting and then unsetting
CurCodeDecl, was added in 7f416cc42638 (2015). The invariant didn't
exist when I added this musttail codepath in ab2090d10765 (2014).
Recently in 28328c3771, I started using this codepath on non-Windows
platforms, and users reported problems during release testing
(PR44987).
  
The issue was already present for users of EH on i686-windows-msvc,
so I added a test for that case as well.
  
Reviewed By: hans
  
Differential Revision: https://reviews.llvm.org/D76444
  
  This should fix 'Assertion failed: (!empty() && "popping exception stack
  when not empty"), function popTerminate, file
  /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h, line 583'
  when building the net-p2p/libtorrent-rasterbar
  
  PR:   244830
  Reported by:  jbeich, yuri
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp

Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp   Mon Apr 20 
16:31:05 2020(r360128)
+++ head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp   Mon Apr 20 
17:39:51 2020(r360129)
@@ -437,7 +437,8 @@ void CodeGenFunction::EmitMustTailThunk(GlobalDecl GD,
   // Finish the function to maintain CodeGenFunction invariants.
   // FIXME: Don't emit unreachable code.
   EmitBlock(createBasicBlock());
-  FinishFunction();
+
+  FinishThunk();
 }
 
 void CodeGenFunction::generateThunk(llvm::Function *Fn,
@@ -564,7 +565,7 @@ llvm::Constant *CodeGenVTables::maybeEmitThunk(GlobalD
   CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn);
 
   // Thunks for variadic methods are special because in general variadic
-  // arguments cannot be perferctly forwarded. In the general case, clang
+  // arguments cannot be perfectly forwarded. In the general case, clang
   // implements such thunks by cloning the original function body. However, for
   // thunks with no return adjustment on targets that support musttail, we can
   // use musttail to perfectly forward the variadic arguments.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r359981 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-04-15 Thread Dimitry Andric
On 15 Apr 2020, at 21:10, Cy Schubert  wrote:
> 
> In message <202004151843.03fihi1w031...@repo.freebsd.org>, Dimitry Andric
> writes:
>> Author: dim
>> Date: Wed Apr 15 18:43:44 2020
>> New Revision: 359981
>> URL: https://svnweb.freebsd.org/changeset/base/359981
>> 
>> Log:
>>  Revert commit a9ad65a2b from llvm git (by Nemanja Ivanovic):
...
> 
> I'm seeing this on amd64:
> 
> --- Target/PowerPC/PPCSubtarget.o ---
> /opt/src/svn-current/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp:103:3:
>  error: use of undeclared identifier 'AllowsUnalignedFPAccess'
>  AllowsUnalignedFPAccess = false;
>  ^

Yeah sorry, this should be fixed by r359994. Upstream did a follow-up
commit adding exactly that line, which I've also reverted.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r359994 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-04-15 Thread Dimitry Andric
Author: dim
Date: Wed Apr 15 21:06:38 2020
New Revision: 359994
URL: https://svnweb.freebsd.org/changeset/base/359994

Log:
  Revert commit b6cf400aa fro llvm git (by Nemanja Ivanovic):
  
Fix bots after a9ad65a2b34f
  
In the last commit, I neglected to initialize the new subtarget
feature I added which caused failures on a few bots. This should fix
that.
  
  This unbreaks the build after r359981, which reverted upstream commit
  a9ad65a2b34f.
  
  Reported by:  jhibbits (and jenkins :)
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp  Wed Apr 
15 21:05:38 2020(r359993)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp  Wed Apr 
15 21:06:38 2020(r359994)
@@ -100,7 +100,6 @@ void PPCSubtarget::initializeEnvironment() {
   IsPPC6xx = false;
   IsE500 = false;
   FeatureMFTB = false;
-  AllowsUnalignedFPAccess = false;
   DeprecatedDST = false;
   HasLazyResolverStubs = false;
   HasICBT = false;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359981 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-04-15 Thread Dimitry Andric
Author: dim
Date: Wed Apr 15 18:43:44 2020
New Revision: 359981
URL: https://svnweb.freebsd.org/changeset/base/359981

Log:
  Revert commit a9ad65a2b from llvm git (by Nemanja Ivanovic):
  
[PowerPC] Change default for unaligned FP access for older subtargets
  
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=40554
  
Some CPU's trap to the kernel on unaligned floating point access and
there are kernels that do not handle the interrupt. The program then
fails with a SIGBUS according to the PR. This just switches the
default for unaligned access to only allow it on recent server CPUs
that are known to allow this.
  
Differential revision: https://reviews.llvm.org/D71954
  
  This upstream commit causes a compiler hang when building certain ports
  (e.g. security/nss, multimedia/x264) for powerpc64.  The hang has been
  reported in https://bugs.llvm.org/show_bug.cgi?id=45186, but in the mean
  time it is more convenient to revert the commit.
  
  Requested by: jhibbits
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.tdWed Apr 15 
18:39:12 2020(r359980)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.tdWed Apr 15 
18:43:44 2020(r359981)
@@ -166,9 +166,6 @@ def FeatureHTM : SubtargetFeature<"htm", "HasHTM", "tr
   "Enable Hardware Transactional Memory 
instructions">;
 def FeatureMFTB   : SubtargetFeature<"", "FeatureMFTB", "true",
 "Implement mftb using the mfspr 
instruction">;
-def FeatureUnalignedFloats :
-  SubtargetFeature<"allow-unaligned-fp-access", "AllowsUnalignedFPAccess",
-   "true", "CPU does not trap on unaligned FP access">;
 def FeaturePPCPreRASched:
   SubtargetFeature<"ppc-prera-sched", "UsePPCPreRASchedStrategy", "true",
"Use PowerPC pre-RA scheduling strategy">;
@@ -255,8 +252,7 @@ def ProcessorFeatures {
   FeatureExtDiv,
   FeatureMFTB,
   DeprecatedDST,
-  FeatureTwoConstNR,
-  FeatureUnalignedFloats];
+  FeatureTwoConstNR];
   list P7SpecificFeatures = [];
   list P7Features =
 !listconcat(P7InheritableFeatures, P7SpecificFeatures);

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Wed Apr 15 18:39:12 2020(r359980)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp   
Wed Apr 15 18:43:44 2020(r359981)
@@ -15251,9 +15251,6 @@ bool PPCTargetLowering::allowsMisalignedMemoryAccesses
   if (!VT.isSimple())
 return false;
 
-  if (VT.isFloatingPoint() && !Subtarget.allowsUnalignedFPAccess())
-return false;
-
   if (VT.getSimpleVT().isVector()) {
 if (Subtarget.hasVSX()) {
   if (VT != MVT::v2f64 && VT != MVT::v2i64 &&

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.h
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.hWed Apr 
15 18:39:12 2020(r359980)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.hWed Apr 
15 18:43:44 2020(r359981)
@@ -124,7 +124,6 @@ class PPCSubtarget : public PPCGenSubtargetInfo { (pro
   bool IsPPC4xx;
   bool IsPPC6xx;
   bool FeatureMFTB;
-  bool AllowsUnalignedFPAccess;
   bool DeprecatedDST;
   bool HasLazyResolverStubs;
   bool IsLittleEndian;
@@ -275,7 +274,6 @@ class PPCSubtarget : public PPCGenSubtargetInfo { (pro
   bool vectorsUseTwoUnits() const {return VectorsUseTwoUnits; }
   bool isE500() const { return IsE500; }
   bool isFeatureMFTB() const { return FeatureMFTB; }
-  bool allowsUnalignedFPAccess() const { return AllowsUnalignedFPAccess; }
   bool isDeprecatedDST() const { return DeprecatedDST; }
   bool hasICBT() const { return HasICBT; }
   bool hasInvariantFunctionDescriptors() const {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359826 - head/contrib/llvm-project/clang/lib/CodeGen

2020-04-12 Thread Dimitry Andric
Author: dim
Date: Sun Apr 12 16:06:59 2020
New Revision: 359826
URL: https://svnweb.freebsd.org/changeset/base/359826

Log:
  Merge commit 30588a739 from llvm git (by Erich Keane):
  
Make target features check work with ctor and dtor-
  
The problem was reported in PR45468, applying target features to an
always_inline constructor/destructor runs afoul of GlobalDecl
construction assert when checking for target-feature compatibility.
  
The core problem is fixed by using the version of the check that
takes a FunctionDecl rather than the GlobalDecl. However, while
writing the test, I discovered that source locations weren't properly
set for this check on ctors/dtors. This patch also fixes constructors
and CALLED destructors.
  
Unfortunately, it doesn't seem too possible to get a meaningful
source location for a 'cleanup' destructor, so those are still
'frontend' level errors unfortunately. A fixme was added to the test
to cover that situation.
  
  This should fix 'Assertion failed: (!isa(D) && "Use
  other ctor with ctor decls!"), function Init, file
  /usr/src/contrib/llvm-project/clang/include/clang/AST/GlobalDecl.h, line
  45' when compiling the security/botan2 port.
  
  PR:   245550
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGExprCXX.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp

Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp Sun Apr 12 
15:30:00 2020(r359825)
+++ head/contrib/llvm-project/clang/lib/CodeGen/CGClass.cpp Sun Apr 12 
16:06:59 2020(r359826)
@@ -2157,7 +2157,7 @@ void CodeGenFunction::EmitCXXConstructorCall(const CXX
   const CGFunctionInfo  = CGM.getTypes().arrangeCXXConstructorCall(
   Args, D, Type, ExtraArgs.Prefix, ExtraArgs.Suffix, PassPrototypeArgs);
   CGCallee Callee = CGCallee::forDirect(CalleePtr, GlobalDecl(D, Type));
-  EmitCall(Info, Callee, ReturnValueSlot(), Args);
+  EmitCall(Info, Callee, ReturnValueSlot(), Args, nullptr, Loc);
 
   // Generate vtable assumptions if we're constructing a complete object
   // with a vtable.  We don't do this for base subobjects for two reasons:

Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGExprCXX.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/CGExprCXX.cpp   Sun Apr 12 
15:30:00 2020(r359825)
+++ head/contrib/llvm-project/clang/lib/CodeGen/CGExprCXX.cpp   Sun Apr 12 
16:06:59 2020(r359826)
@@ -112,7 +112,8 @@ RValue CodeGenFunction::EmitCXXDestructorCall(
   commonEmitCXXMemberOrOperatorCall(*this, DtorDecl, This, ImplicitParam,
 ImplicitParamTy, CE, Args, nullptr);
   return EmitCall(CGM.getTypes().arrangeCXXStructorDeclaration(Dtor), Callee,
-  ReturnValueSlot(), Args);
+  ReturnValueSlot(), Args, nullptr,
+  CE ? CE->getExprLoc() : SourceLocation{});
 }
 
 RValue CodeGenFunction::EmitCXXPseudoDestructorExpr(
@@ -380,7 +381,7 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberC
   IsArrow ? Base->getType()->getPointeeType() : Base->getType();
   EmitCXXDestructorCall(GD, Callee, This.getPointer(*this), ThisTy,
 /*ImplicitParam=*/nullptr,
-/*ImplicitParamTy=*/QualType(), nullptr);
+/*ImplicitParamTy=*/QualType(), CE);
 }
 return RValue::get(nullptr);
   }

Modified: head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp Sun Apr 
12 15:30:00 2020(r359825)
+++ head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp Sun Apr 
12 16:06:59 2020(r359826)
@@ -2324,8 +2324,7 @@ void CodeGenFunction::checkTargetFeatures(SourceLocati
 
 SmallVector ReqFeatures;
 llvm::StringMap CalleeFeatureMap;
-CGM.getContext().getFunctionFeatureMap(CalleeFeatureMap,
-   GlobalDecl(TargetDecl));
+CGM.getContext().getFunctionFeatureMap(CalleeFeatureMap, TargetDecl);
 
 for (const auto  : ParsedAttr.Features) {
   if (F[0] == '+' && CalleeFeatureMap.lookup(F.substr(1)))
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359578 - head/contrib/llvm-project/lldb/bindings

2020-04-02 Thread Dimitry Andric
Author: dim
Date: Thu Apr  2 19:56:43 2020
New Revision: 359578
URL: https://svnweb.freebsd.org/changeset/base/359578

Log:
  Merge once more from ^/vendor/llvm-project/release-10.x, to get the
  lldb/bindings directory, which will be used to provide lua bindings for
  lldb.
  
  Requested by: emaste
  MFC after:6 weeks
  X-MFC-With:   358851

Added:
  head/contrib/llvm-project/lldb/bindings/
 - copied from r359577, vendor/llvm-project/release-10.x/lldb/bindings/
Modified:
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/lldb/   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359338 - in head: contrib/llvm-project/clang/include/clang/Sema contrib/llvm-project/clang/lib/Driver/ToolChains contrib/llvm-project/clang/lib/Parse contrib/llvm-project/clang/lib/Sem...

2020-03-26 Thread Dimitry Andric
Author: dim
Date: Thu Mar 26 17:46:32 2020
New Revision: 359338
URL: https://svnweb.freebsd.org/changeset/base/359338

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release).
  
  PR:   244251
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/clang/include/clang/Sema/Sema.h
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.h
  head/contrib/llvm-project/clang/lib/Parse/ParseDecl.cpp
  head/contrib/llvm-project/clang/lib/Parse/ParseTemplate.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
  head/contrib/llvm-project/clang/lib/Sema/TreeTransform.h
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)

Modified: head/contrib/llvm-project/clang/include/clang/Sema/Sema.h
==
--- head/contrib/llvm-project/clang/include/clang/Sema/Sema.h   Thu Mar 26 
17:41:33 2020(r359337)
+++ head/contrib/llvm-project/clang/include/clang/Sema/Sema.h   Thu Mar 26 
17:46:32 2020(r359338)
@@ -6885,7 +6885,8 @@ class Sema final { (public)
   QualType ObjectType, bool EnteringContext,
   bool ,
   SourceLocation TemplateKWLoc = SourceLocation(),
-  AssumedTemplateKind *ATK = nullptr);
+  AssumedTemplateKind *ATK = nullptr,
+  bool Disambiguation = false);
 
   TemplateNameKind isTemplateName(Scope *S,
   CXXScopeSpec ,
@@ -6894,7 +6895,8 @@ class Sema final { (public)
   ParsedType ObjectType,
   bool EnteringContext,
   TemplateTy ,
-  bool );
+  bool ,
+  bool Disambiguation = false);
 
   /// Try to resolve an undeclared template name as a type template.
   ///

Modified: head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp
==
--- head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp  Thu Mar 
26 17:41:33 2020(r359337)
+++ head/contrib/llvm-project/clang/lib/Driver/ToolChains/Cuda.cpp  Thu Mar 
26 17:46:32 2020(r359338)
@@ -32,26 +32,30 @@ using namespace llvm::opt;
 
 // Parses the contents of version.txt in an CUDA installation.  It should
 // contain one line of the from e.g. "CUDA Version 7.5.2".
-static CudaVersion ParseCudaVersionFile(const Driver , llvm::StringRef V) {
+void CudaInstallationDetector::ParseCudaVersionFile(llvm::StringRef V) {
+  Version = CudaVersion::UNKNOWN;
   if (!V.startswith("CUDA Version "))
-return CudaVersion::UNKNOWN;
+return;
   V = V.substr(strlen("CUDA Version "));
   SmallVector VersionParts;
   V.split(VersionParts, '.');
   if (VersionParts.size() < 2)
-return CudaVersion::UNKNOWN;
-  std::string MajorMinor = join_items(".", VersionParts[0], VersionParts[1]);
-  CudaVersion Version = CudaStringToVersion(MajorMinor);
+return;
+  DetectedVersion = join_items(".", VersionParts[0], VersionParts[1]);
+  Version = CudaStringToVersion(DetectedVersion);
   if (Version != CudaVersion::UNKNOWN)
-return Version;
+return;
 
-  // Issue a warning and assume that the version we've found is compatible with
-  // the latest version we support.
-  D.Diag(diag::warn_drv_unknown_cuda_version)
-  << MajorMinor << CudaVersionToString(CudaVersion::LATEST);
-  return CudaVersion::LATEST;
+  Version = CudaVersion::LATEST;
+  DetectedVersionIsNotSupported = true;
 }
 
+void CudaInstallationDetector::WarnIfUnsupportedVersion() {
+  if (DetectedVersionIsNotSupported)
+D.Diag(diag::warn_drv_unknown_cuda_version)
+<< DetectedVersion << CudaVersionToString(Version);
+}
+
 CudaInstallationDetector::CudaInstallationDetector(
 const Driver , const llvm::Triple ,
 const llvm::opt::ArgList )
@@ -147,7 +151,7 @@ CudaInstallationDetector::CudaInstallationDetector(
   // version.txt isn't present.
   Version = CudaVersion::CUDA_70;
 } else {
-  Version = ParseCudaVersionFile(D, (*VersionFile)->getBuffer());
+  ParseCudaVersionFile((*VersionFile)->getBuffer());
 }
 
 if (Version >= CudaVersion::CUDA_90) {
@@ -565,8 +569,10 @@ CudaToolChain::CudaToolChain(const Driver , const ll
  const Action::OffloadKind OK)
 : ToolChain(D, Triple, Args), HostTC(HostTC),
   CudaInstallation(D, HostTC.getTriple(), Args), OK(OK) {
-  if (CudaInstallation.isValid())
+  if (CudaInstallation.isValid()) {
+

svn commit: r359334 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-03-26 Thread Dimitry Andric
Author: dim
Date: Thu Mar 26 17:28:54 2020
New Revision: 359334
URL: https://svnweb.freebsd.org/changeset/base/359334

Log:
  Merge commit 459e8e948 from llvm git (by Justin Hibbits):
  
[PowerPC]: Don't allow r0 as a target for LD_GOT_TPREL_L/32
  
Summary:
The linker is free to relax this (relocation R_PPC_GOT_TPREL16)
against R_PPC_TLS, if it sees fit (initial exec to local exec). If r0
is used, this can generate execution-invalid code (converts to 'addi
%rX, %r0, FOO, which translates in PPC-lingo to li %rX, FOO). Forbid
this instead.
  
This fixes static binaries using locales on FreeBSD/powerpc (tested
on FreeBSD/powerpcspe).
  
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D76662
  
  Requested by: jhibbits
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td  Thu Mar 
26 17:27:41 2020(r359333)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td  Thu Mar 
26 17:28:54 2020(r359334)
@@ -1110,7 +1110,7 @@ def ADDISgotTprelHA: PPCEmitTimePseudo<(outs g8rc:$rD)
(PPCaddisGotTprelHA i64:$reg,
tglobaltlsaddr:$disp))]>,
   isPPC64;
-def LDgotTprelL: PPCEmitTimePseudo<(outs g8rc:$rD), (ins s16imm64:$disp, 
g8rc_nox0:$reg),
+def LDgotTprelL: PPCEmitTimePseudo<(outs g8rc_nox0:$rD), (ins s16imm64:$disp, 
g8rc_nox0:$reg),
 "#LDgotTprelL",
 [(set i64:$rD,
   (PPCldGotTprelL tglobaltlsaddr:$disp, i64:$reg))]>,

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td   Thu Mar 
26 17:27:41 2020(r359333)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td   Thu Mar 
26 17:28:54 2020(r359334)
@@ -3167,7 +3167,7 @@ def PPC32GOT: PPCEmitTimePseudo<(outs gprc:$rD), (ins)
 def PPC32PICGOT: PPCEmitTimePseudo<(outs gprc:$rD, gprc:$rT), (ins), 
"#PPC32PICGOT", 
 []>, NoEncode<"$rT">;
 
-def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc:$rD), (ins s16imm:$disp, 
gprc_nor0:$reg),
+def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc_nor0:$rD), (ins s16imm:$disp, 
gprc_nor0:$reg),
"#LDgotTprelL32",
[(set i32:$rD,
  (PPCldGotTprelL tglobaltlsaddr:$disp, 
i32:$reg))]>;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359333 - head/contrib/llvm-project/llvm/lib/Target/PowerPC

2020-03-26 Thread Dimitry Andric
Author: dim
Date: Thu Mar 26 17:27:41 2020
New Revision: 359333
URL: https://svnweb.freebsd.org/changeset/base/359333

Log:
  Merge commit f0990e104 from llvm git (by Justin Hibbits):
  
[PowerPC]: e500 target can't use lwsync, use msync instead
  
The e500 core has a silicon bug that triggers an illegal instruction
program trap on any sync other than msync. Other cores will typically
ignore illegal sync types, and the documentation even implies that
the 'illegal' bits are ignored.
  
Address this hardware deficiency by only using msync, like the PPC440.
  
Differential Revision:  https://reviews.llvm.org/D76614
  
  Requested by: jhibbits
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td

Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
==
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.tdThu Mar 26 
17:12:55 2020(r359332)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.tdThu Mar 26 
17:27:41 2020(r359333)
@@ -442,7 +442,7 @@ def : ProcessorModel<"g5", G5Model,
 def : ProcessorModel<"e500", PPCE500Model,
   [DirectiveE500,
FeatureICBT, FeatureBookE,
-   FeatureISEL, FeatureMFTB, FeatureSPE]>;
+   FeatureISEL, FeatureMFTB, FeatureMSYNC, FeatureSPE]>;
 def : ProcessorModel<"e500mc", PPCE500mcModel,
   [DirectiveE500mc,
FeatureSTFIWX, FeatureICBT, FeatureBookE,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359087 - head/contrib/llvm-project/libcxx/include

2020-03-18 Thread Dimitry Andric
Author: dim
Date: Wed Mar 18 20:50:30 2020
New Revision: 359087
URL: https://svnweb.freebsd.org/changeset/base/359087

Log:
  Merge commit 585a3cc31 from llvm git (by me):
  
Fix -Wdeprecated-copy-dtor and -Wdeprecated-dynamic-exception-spec
warnings.
  
Summary:
The former are like:
  
libcxx/include/typeinfo:322:11: warning: definition of implicit copy
constructor for 'bad_cast' is deprecated because it has a
user-declared destructor [-Wdeprecated-copy-dtor]
  virtual ~bad_cast() _NOEXCEPT;
^
libcxx/include/typeinfo:344:11: note: in implicit copy constructor
for 'std::bad_cast' first required here
throw bad_cast();
^
  
Fix these by adding an explicitly defaulted copy constructor.
  
The latter are like:
  
libcxx/include/codecvt:105:37: warning: dynamic exception
specifications are deprecated [-Wdeprecated-dynamic-exception-spec]
virtual int do_encoding() const throw();
  ^~~
  
Fix these by using the _NOEXCEPT macro instead.
  
Reviewers: EricWF, mclow.lists, ldionne, #libc
  
Reviewed By: EricWF, #libc
  
Subscribers: dexonsmith, libcxx-commits
  
Tags: #libc
  
Differential Revision: https://reviews.llvm.org/D76150
  
  This is because we use -Wsystem-headers during buildworld, and the two
  warnings above are now triggered by default with clang 10, preventing
  most C++ code from compiling without NO_WERROR.
  
  Requested by: brooks
  MFC after:6 weeks
  X-MFC-With:   358851
  Differential Revision: https://reviews.freebsd.org/D24049

Modified:
  head/contrib/llvm-project/libcxx/include/codecvt
  head/contrib/llvm-project/libcxx/include/exception
  head/contrib/llvm-project/libcxx/include/filesystem
  head/contrib/llvm-project/libcxx/include/future
  head/contrib/llvm-project/libcxx/include/ios
  head/contrib/llvm-project/libcxx/include/memory
  head/contrib/llvm-project/libcxx/include/regex
  head/contrib/llvm-project/libcxx/include/stdexcept
  head/contrib/llvm-project/libcxx/include/system_error
  head/contrib/llvm-project/libcxx/include/typeinfo

Modified: head/contrib/llvm-project/libcxx/include/codecvt
==
--- head/contrib/llvm-project/libcxx/include/codecvtWed Mar 18 20:44:40 
2020(r359086)
+++ head/contrib/llvm-project/libcxx/include/codecvtWed Mar 18 20:50:30 
2020(r359087)
@@ -102,11 +102,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8 (protec
 virtual result
 do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& 
__to_nxt) const;
-virtual int do_encoding() const throw();
-virtual bool do_always_noconv() const throw();
+virtual int do_encoding() const _NOEXCEPT;
+virtual bool do_always_noconv() const _NOEXCEPT;
 virtual int do_length(state_type&, const extern_type* __frm, const 
extern_type* __end,
   size_t __mx) const;
-virtual int do_max_length() const throw();
+virtual int do_max_length() const _NOEXCEPT;
 };
 
 template <>
@@ -137,11 +137,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8 (prote
 virtual result
 do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& 
__to_nxt) const;
-virtual int do_encoding() const throw();
-virtual bool do_always_noconv() const throw();
+virtual int do_encoding() const _NOEXCEPT;
+virtual bool do_always_noconv() const _NOEXCEPT;
 virtual int do_length(state_type&, const extern_type* __frm, const 
extern_type* __end,
   size_t __mx) const;
-virtual int do_max_length() const throw();
+virtual int do_max_length() const _NOEXCEPT;
 };
 
 template <>
@@ -172,11 +172,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8 (prote
 virtual result
 do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& 
__to_nxt) const;
-virtual int do_encoding() const throw();
-virtual bool do_always_noconv() const throw();
+virtual int do_encoding() const _NOEXCEPT;
+virtual bool do_always_noconv() const _NOEXCEPT;
 virtual int do_length(state_type&, const extern_type* __frm, const 
extern_type* __end,
   size_t __mx) const;
-virtual int do_max_length() const throw();
+virtual int do_max_length() const _NOEXCEPT;
 };
 
 template 
 virtual result
 do_unshift(state_type& __st,
extern_type* __to, extern_type* __to_end, extern_type*& 
__to_nxt) const;
-virtual int do_encoding() const throw();
-virtual bool do_always_noconv() const throw();
+virtual int do_encoding() const _NOEXCEPT;
+virtual bool do_always_noconv() const _NOEXCEPT;
 virtual int do_length(state_type&, const extern_type* __frm, const 
extern_type* __end,
   size_t 

svn commit: r359086 - head/contrib/llvm-project/llvm/lib/Transforms/Scalar

2020-03-18 Thread Dimitry Andric
Author: dim
Date: Wed Mar 18 20:44:40 2020
New Revision: 359086
URL: https://svnweb.freebsd.org/changeset/base/359086

Log:
  Merge commit b8ebc11f0 from llvm git (by Sanjay Patel):
  
[EarlyCSE] avoid crashing when detecting min/max/abs patterns (PR41083)
  
As discussed in PR41083:
https://bugs.llvm.org/show_bug.cgi?id=41083
...we can assert/crash in EarlyCSE using the current hashing scheme
and instructions with flags.
  
ValueTracking's matchSelectPattern() may rely on overflow (nsw, etc)
or other flags when detecting patterns such as min/max/abs composed
of compare+select. But the value numbering / hashing mechanism used
by EarlyCSE intersects those flags to allow more CSE.
  
Several alternatives to solve this are discussed in the bug report.
This patch avoids the issue by doing simple matching of min/max/abs
patterns that never requires instruction flags. We give up some CSE
power because of that, but that is not expected to result in much
actual performance difference because InstCombine will canonicalize
these patterns when possible. It even has this comment for abs/nabs:
  
  /// Canonicalize all these variants to 1 pattern.
  /// This makes CSE more likely.
  
(And this patch adds PhaseOrdering tests to verify that the expected
transforms are still happening in the standard optimization
pipelines.
  
I left this code to use ValueTracking's "flavor" enum values, so we
don't have to change the callers' code. If we decide to go back to
using the ValueTracking call (by changing the hashing algorithm
instead), it should be obvious how to replace this chunk.
  
Differential Revision: https://reviews.llvm.org/D74285
  
  This fixes an assertion when building the math/gsl port on PowerPC64.
  
  Requested by: pkubja
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/contrib/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp

Modified: head/contrib/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
==
--- head/contrib/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp   Wed Mar 
18 20:38:15 2020(r359085)
+++ head/contrib/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp   Wed Mar 
18 20:44:40 2020(r359086)
@@ -152,13 +152,50 @@ static bool matchSelectWithOptionalNotCond(Value *V, V
 std::swap(A, B);
   }
 
-  // Set flavor if we find a match, or set it to unknown otherwise; in
-  // either case, return true to indicate that this is a select we can
-  // process.
-  if (auto *CmpI = dyn_cast(Cond))
-Flavor = matchDecomposedSelectPattern(CmpI, A, B, A, B).Flavor;
-  else
-Flavor = SPF_UNKNOWN;
+  // Match canonical forms of abs/nabs/min/max. We are not using 
ValueTracking's
+  // more powerful matchSelectPattern() because it may rely on instruction 
flags
+  // such as "nsw". That would be incompatible with the current hashing
+  // mechanism that may remove flags to increase the likelihood of CSE.
+
+  // These are the canonical forms of abs(X) and nabs(X) created by 
instcombine:
+  // %N = sub i32 0, %X
+  // %C = icmp slt i32 %X, 0
+  // %ABS = select i1 %C, i32 %N, i32 %X
+  //
+  // %N = sub i32 0, %X
+  // %C = icmp slt i32 %X, 0
+  // %NABS = select i1 %C, i32 %X, i32 %N
+  Flavor = SPF_UNKNOWN;
+  CmpInst::Predicate Pred;
+  if (match(Cond, m_ICmp(Pred, m_Specific(B), m_ZeroInt())) &&
+  Pred == ICmpInst::ICMP_SLT && match(A, m_Neg(m_Specific(B {
+// ABS: B < 0 ? -B : B
+Flavor = SPF_ABS;
+return true;
+  }
+  if (match(Cond, m_ICmp(Pred, m_Specific(A), m_ZeroInt())) &&
+  Pred == ICmpInst::ICMP_SLT && match(B, m_Neg(m_Specific(A {
+// NABS: A < 0 ? A : -A
+Flavor = SPF_NABS;
+return true;
+  }
+
+  if (!match(Cond, m_ICmp(Pred, m_Specific(A), m_Specific(B {
+// Check for commuted variants of min/max by swapping predicate.
+// If we do not match the standard or commuted patterns, this is not a
+// recognized form of min/max, but it is still a select, so return true.
+if (!match(Cond, m_ICmp(Pred, m_Specific(B), m_Specific(A
+  return true;
+Pred = ICmpInst::getSwappedPredicate(Pred);
+  }
+
+  switch (Pred) {
+  case CmpInst::ICMP_UGT: Flavor = SPF_UMAX; break;
+  case CmpInst::ICMP_ULT: Flavor = SPF_UMIN; break;
+  case CmpInst::ICMP_SGT: Flavor = SPF_SMAX; break;
+  case CmpInst::ICMP_SLT: Flavor = SPF_SMIN; break;
+  default: break;
+  }
 
   return true;
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359085 - head/contrib/llvm-project/lld/ELF

2020-03-18 Thread Dimitry Andric
Author: dim
Date: Wed Mar 18 20:38:15 2020
New Revision: 359085
URL: https://svnweb.freebsd.org/changeset/base/359085

Log:
  Merge commit 315f8a55f from llvm git (by Fangrui Song):
  
[ELF][PPC32] Don't report "relocation refers to a discarded section"
for .got2
  
Similar to D63182 [ELF][PPC64] Don't report "relocation refers to a
discarded section" for .toc
  
Reviewed By: Bdragon28
  
Differential Revision: https://reviews.llvm.org/D75419
  
  This is needed to fix compile errors when building for ppc32/lld10.
  
  Requested by: bdragon
  MFC after:6 weeks
  X-MFC-With:   358851
  Differential Revision: https://reviews.freebsd.org/D24110

Modified:
  head/contrib/llvm-project/lld/ELF/InputSection.cpp
  head/contrib/llvm-project/lld/ELF/Relocations.cpp

Modified: head/contrib/llvm-project/lld/ELF/InputSection.cpp
==
--- head/contrib/llvm-project/lld/ELF/InputSection.cpp  Wed Mar 18 20:28:26 
2020(r359084)
+++ head/contrib/llvm-project/lld/ELF/InputSection.cpp  Wed Mar 18 20:38:15 
2020(r359085)
@@ -438,12 +438,13 @@ void InputSection::copyRelocations(uint8_t *buf, Array
   // hopefully creates a frame that is ignored at runtime. Also, don't warn
   // on .gcc_except_table and debug sections.
   //
-  // See the comment in maybeReportUndefined for PPC64 .toc .
+  // See the comment in maybeReportUndefined for PPC32 .got2 and PPC64 .toc
   auto *d = dyn_cast();
   if (!d) {
 if (!sec->name.startswith(".debug") &&
 !sec->name.startswith(".zdebug") && sec->name != ".eh_frame" &&
-sec->name != ".gcc_except_table" && sec->name != ".toc") {
+sec->name != ".gcc_except_table" && sec->name != ".got2" &&
+sec->name != ".toc") {
   uint32_t secIdx = cast(sym).discardedSecIdx;
   Elf_Shdr_Impl sec =
   CHECK(file->getObj().sections(), file)[secIdx];

Modified: head/contrib/llvm-project/lld/ELF/Relocations.cpp
==
--- head/contrib/llvm-project/lld/ELF/Relocations.cpp   Wed Mar 18 20:28:26 
2020(r359084)
+++ head/contrib/llvm-project/lld/ELF/Relocations.cpp   Wed Mar 18 20:38:15 
2020(r359085)
@@ -926,8 +926,12 @@ static bool maybeReportUndefined(Symbol , InputSec
   // .toc and the .rela.toc are incorrectly not placed in the comdat. The ELF
   // spec says references from outside the group to a STB_LOCAL symbol are not
   // allowed. Work around the bug.
-  if (config->emachine == EM_PPC64 &&
-  cast(sym).discardedSecIdx != 0 && sec.name == ".toc")
+  //
+  // PPC32 .got2 is similar but cannot be fixed. Multiple .got2 is infeasible
+  // because .LC0-.LTOC is not representable if the two labels are in different
+  // .got2
+  if (cast(sym).discardedSecIdx != 0 &&
+  (sec.name == ".got2" || sec.name == ".toc"))
 return false;
 
   bool isWarning =
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r359084 - in head/contrib/llvm-project/lld/ELF: . Arch

2020-03-18 Thread Dimitry Andric
Author: dim
Date: Wed Mar 18 20:28:26 2020
New Revision: 359084
URL: https://svnweb.freebsd.org/changeset/base/359084

Log:
  Merge commit 00925aadb from llvm git (by Fangrui Song):
  
[ELF][PPC32] Fix canonical PLTs when the order does not match the PLT order
  
Reviewed By: Bdragon28
  
Differential Revision: https://reviews.llvm.org/D75394
  
  This is needed to fix miscompiled canonical PLTs on ppc32/lld10.
  
  Requested by: bdragon
  MFC after:6 weeks
  X-MFC-With:   358851
  Differential Revision: https://reviews.freebsd.org/D24109

Modified:
  head/contrib/llvm-project/lld/ELF/Arch/PPC.cpp
  head/contrib/llvm-project/lld/ELF/Relocations.cpp
  head/contrib/llvm-project/lld/ELF/SyntheticSections.cpp
  head/contrib/llvm-project/lld/ELF/SyntheticSections.h
  head/contrib/llvm-project/lld/ELF/Writer.cpp

Modified: head/contrib/llvm-project/lld/ELF/Arch/PPC.cpp
==
--- head/contrib/llvm-project/lld/ELF/Arch/PPC.cpp  Wed Mar 18 20:12:46 
2020(r359083)
+++ head/contrib/llvm-project/lld/ELF/Arch/PPC.cpp  Wed Mar 18 20:28:26 
2020(r359084)
@@ -71,12 +71,11 @@ void writePPC32GlinkSection(uint8_t *buf, size_t numEn
   // non-GOT-non-PLT relocations referencing external functions for 
-fpie/-fPIE.
   uint32_t glink = in.plt->getVA(); // VA of .glink
   if (!config->isPic) {
-for (const Symbol *sym : in.plt->entries)
-  if (sym->needsPltAddr) {
-writePPC32PltCallStub(buf, sym->getGotPltVA(), nullptr, 0);
-buf += 16;
-glink += 16;
-  }
+for (const Symbol *sym : cast(in.plt)->canonical_plts) {
+  writePPC32PltCallStub(buf, sym->getGotPltVA(), nullptr, 0);
+  buf += 16;
+  glink += 16;
+}
   }
 
   // On PPC Secure PLT ABI, bl foo@plt jumps to a call stub, which loads an

Modified: head/contrib/llvm-project/lld/ELF/Relocations.cpp
==
--- head/contrib/llvm-project/lld/ELF/Relocations.cpp   Wed Mar 18 20:12:46 
2020(r359083)
+++ head/contrib/llvm-project/lld/ELF/Relocations.cpp   Wed Mar 18 20:28:26 
2020(r359084)
@@ -1206,6 +1206,7 @@ static void processRelocAux(InputSectionBase , Rel
   // PPC32 canonical PLT entries are at the beginning of .glink
   cast(sym).value = in.plt->headerSize;
   in.plt->headerSize += 16;
+  cast(in.plt)->canonical_plts.push_back();
 }
   }
   sym.needsPltAddr = true;

Modified: head/contrib/llvm-project/lld/ELF/SyntheticSections.cpp
==
--- head/contrib/llvm-project/lld/ELF/SyntheticSections.cpp Wed Mar 18 
20:12:46 2020(r359083)
+++ head/contrib/llvm-project/lld/ELF/SyntheticSections.cpp Wed Mar 18 
20:28:26 2020(r359084)
@@ -2446,12 +2446,9 @@ PltSection::PltSection()
 : SyntheticSection(SHF_ALLOC | SHF_EXECINSTR, SHT_PROGBITS, 16, ".plt"),
   headerSize(target->pltHeaderSize) {
   // On PowerPC, this section contains lazy symbol resolvers.
-  if (config->emachine == EM_PPC || config->emachine == EM_PPC64) {
+  if (config->emachine == EM_PPC64) {
 name = ".glink";
 alignment = 4;
-// PLTresolve is at the end.
-if (config->emachine == EM_PPC)
-  footerSize = 64;
   }
 
   // On x86 when IBT is enabled, this section contains the second PLT (lazy
@@ -2467,11 +2464,6 @@ PltSection::PltSection()
 }
 
 void PltSection::writeTo(uint8_t *buf) {
-  if (config->emachine == EM_PPC) {
-writePPC32GlinkSection(buf, entries.size());
-return;
-  }
-
   // At beginning of PLT, we have code to call the dynamic
   // linker to resolve dynsyms at runtime. Write such code.
   target->writePltHeader(buf);
@@ -2489,7 +2481,7 @@ void PltSection::addEntry(Symbol ) {
 }
 
 size_t PltSection::getSize() const {
-  return headerSize + entries.size() * target->pltEntrySize + footerSize;
+  return headerSize + entries.size() * target->pltEntrySize;
 }
 
 bool PltSection::isNeeded() const {
@@ -2541,6 +2533,19 @@ void IpltSection::addSymbols() {
 target->addPltSymbols(*this, off);
 off += target->pltEntrySize;
   }
+}
+
+PPC32GlinkSection::PPC32GlinkSection() {
+  name = ".glink";
+  alignment = 4;
+}
+
+void PPC32GlinkSection::writeTo(uint8_t *buf) {
+  writePPC32GlinkSection(buf, entries.size());
+}
+
+size_t PPC32GlinkSection::getSize() const {
+  return headerSize + entries.size() * target->pltEntrySize + footerSize;
 }
 
 // This is an x86-only extra PLT section and used only when a security

Modified: head/contrib/llvm-project/lld/ELF/SyntheticSections.h
==
--- head/contrib/llvm-project/lld/ELF/SyntheticSections.h   Wed Mar 18 
20:12:46 2020(r359083)
+++ head/contrib/llvm-project/lld/ELF/SyntheticSections.h   Wed Mar 18 
20:28:26 2020(r359084)
@@ -684,7 +684,6 @@ 

svn commit: r359082 - in head: contrib/llvm-project/clang/include/clang/AST contrib/llvm-project/clang/include/clang/Sema contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Lex contr...

2020-03-18 Thread Dimitry Andric
Author: dim
Date: Wed Mar 18 18:26:53 2020
New Revision: 359082
URL: https://svnweb.freebsd.org/changeset/base/359082

Log:
  Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
  llvmorg-10.0.0-rc4-5-g52c365aa9ca.  The actual release should follow Real
  Soon Now.
  
  PR: 244251
  MFC after:  6 weeks

Modified:
  head/contrib/llvm-project/clang/include/clang/AST/Expr.h
  head/contrib/llvm-project/clang/include/clang/AST/Stmt.h
  head/contrib/llvm-project/clang/include/clang/Sema/Sema.h
  head/contrib/llvm-project/clang/include/clang/Sema/Template.h
  head/contrib/llvm-project/clang/lib/AST/ASTImporter.cpp
  head/contrib/llvm-project/clang/lib/Lex/Pragma.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplate.cpp
  head/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
  head/contrib/llvm-project/clang/lib/Sema/TreeTransform.h
  head/contrib/llvm-project/clang/lib/Serialization/ASTReaderDecl.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTReaderStmt.cpp
  head/contrib/llvm-project/clang/lib/Serialization/ASTWriterStmt.cpp
  head/contrib/llvm-project/clang/tools/driver/driver.cpp
  head/contrib/llvm-project/llvm/include/llvm/Support/ManagedStatic.h
  head/contrib/llvm-project/llvm/include/llvm/Support/Timer.h
  head/contrib/llvm-project/llvm/lib/Support/Timer.cpp
  head/lib/clang/include/VCSVersion.inc
  head/lib/clang/include/llvm/Support/VCSRevision.h
Directory Properties:
  head/contrib/llvm-project/   (props changed)
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)

Modified: head/contrib/llvm-project/clang/include/clang/AST/Expr.h
==
--- head/contrib/llvm-project/clang/include/clang/AST/Expr.hWed Mar 18 
18:21:58 2020(r359081)
+++ head/contrib/llvm-project/clang/include/clang/AST/Expr.hWed Mar 18 
18:26:53 2020(r359082)
@@ -3955,14 +3955,18 @@ class StmtExpr : public Expr {
   Stmt *SubStmt;
   SourceLocation LParenLoc, RParenLoc;
 public:
-  StmtExpr(CompoundStmt *substmt, QualType T,
-   SourceLocation lp, SourceLocation rp, bool InDependentContext) :
-// Note: we treat a statement-expression in a dependent context as always
-// being value- and instantiation-dependent. This matches the behavior of
-// lambda-expressions and GCC.
-Expr(StmtExprClass, T, VK_RValue, OK_Ordinary,
- T->isDependentType(), InDependentContext, InDependentContext, false),
-SubStmt(substmt), LParenLoc(lp), RParenLoc(rp) {}
+  StmtExpr(CompoundStmt *SubStmt, QualType T, SourceLocation LParenLoc,
+   SourceLocation RParenLoc, unsigned TemplateDepth)
+  : // We treat a statement-expression in a dependent context as
+// always being value- and instantiation-dependent. This matches the
+// behavior of lambda-expressions and GCC.
+Expr(StmtExprClass, T, VK_RValue, OK_Ordinary, T->isDependentType(),
+ TemplateDepth != 0, TemplateDepth != 0, false),
+SubStmt(SubStmt), LParenLoc(LParenLoc), RParenLoc(RParenLoc) {
+// FIXME: A templated statement expression should have an associated
+// DeclContext so that nested declarations always have a dependent context.
+StmtExprBits.TemplateDepth = TemplateDepth;
+  }
 
   /// Build an empty statement expression.
   explicit StmtExpr(EmptyShell Empty) : Expr(StmtExprClass, Empty) { }
@@ -3978,6 +3982,8 @@ class StmtExpr : public Expr {
   void setLParenLoc(SourceLocation L) { LParenLoc = L; }
   SourceLocation getRParenLoc() const { return RParenLoc; }
   void setRParenLoc(SourceLocation L) { RParenLoc = L; }
+
+  unsigned getTemplateDepth() const { return StmtExprBits.TemplateDepth; }
 
   static bool classof(const Stmt *T) {
 return T->getStmtClass() == StmtExprClass;

Modified: head/contrib/llvm-project/clang/include/clang/AST/Stmt.h
==
--- head/contrib/llvm-project/clang/include/clang/AST/Stmt.hWed Mar 18 
18:21:58 2020(r359081)
+++ head/contrib/llvm-project/clang/include/clang/AST/Stmt.hWed Mar 18 
18:26:53 2020(r359082)
@@ -588,6 +588,18 @@ class alignas(void *) Stmt { (protected)
 unsigned Kind : 2;
   };
 
+  class StmtExprBitfields {
+friend class ASTStmtReader;
+friend class StmtExpr;
+
+unsigned : NumExprBits;
+
+/// The number of levels of template parameters enclosing this statement
+/// expression. Used to determine if a statement expression remains
+/// dependent after instantiation.
+unsigned TemplateDepth;
+  };
+
   //===--- C++ Expression bitfields classes ---===//
 
   class CXXOperatorCallExprBitfields {
@@ -995,6 +1007,9 @@ class alignas(void *) Stmt { (protected)
 GenericSelectionExprBitfields 

svn commit: r358907 - head

2020-03-12 Thread Dimitry Andric
Author: dim
Date: Thu Mar 12 11:39:04 2020
New Revision: 358907
URL: https://svnweb.freebsd.org/changeset/base/358907

Log:
  Allow -DNO_CLEAN build across r358851.
  
  The openmp 10.0.0 import renamed one .c file to .cpp, and this is
  something our dependency system does not handle correctly.  Add another
  ad-hoc cleanup to get rid of the stale dependency.
  
  PR:   244251
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu Mar 12 06:45:08 2020(r358906)
+++ head/Makefile.inc1  Thu Mar 12 11:39:04 2020(r358907)
@@ -924,6 +924,15 @@ _sanity_check: .PHONY .MAKE
 _cleanobj_fast_depend_hack: .PHONY
 # Syscall stubs rewritten in C and obsolete MD assembly implementations
 # Date  SVN Rev  Syscalls/Changes
+# 20200310  r358851  rename of openmp's ittnotify_static.c to .cpp
+.for f in ittnotify_static
+   @if [ -e "${OBJTOP}/lib/libomp/.depend.${f}.pico" ] && \
+   egrep -qw '${f}\.c' ${OBJTOP}/lib/libomp/.depend.${f}.pico; then \
+   echo "Removing stale dependencies for ${f}"; \
+   rm -f ${OBJTOP}/lib/libomp/.depend.${f}.* \
+  ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libomp/.depend.${f}.*}; 
\
+   fi
+.endfor
 # 20191009  r353340  removal of opensolaris_atomic.S (also r353381)
 .if ${MACHINE} != i386
 .for f in opensolaris_atomic
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r358857 - head/lib/clang/libllvm

2020-03-10 Thread Dimitry Andric
Author: dim
Date: Tue Mar 10 20:25:36 2020
New Revision: 358857
URL: https://svnweb.freebsd.org/changeset/base/358857

Log:
  Move another file in libllvm from sources required for world, to sources
  required for bootstrap, as the PowerPC builds need this.
  
  Reported by:  bdragon
  PR:   244251
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/lib/clang/libllvm/Makefile

Modified: head/lib/clang/libllvm/Makefile
==
--- head/lib/clang/libllvm/Makefile Tue Mar 10 20:25:03 2020
(r358856)
+++ head/lib/clang/libllvm/Makefile Tue Mar 10 20:25:36 2020
(r358857)
@@ -842,7 +842,7 @@ SRCS_MIN+=  Support/BranchProbability.cpp
 SRCS_MIN+= Support/BuryPointer.cpp
 SRCS_MIN+= Support/CachePruning.cpp
 SRCS_MIW+= Support/COM.cpp
-SRCS_MIW+= Support/CRC.cpp
+SRCS_MIN+= Support/CRC.cpp
 SRCS_MIN+= Support/Chrono.cpp
 SRCS_MIN+= Support/CodeGenCoverage.cpp
 SRCS_MIN+= Support/CommandLine.cpp
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r358854 - head/lib/clang/libllvmminimal

2020-03-10 Thread Dimitry Andric
Author: dim
Date: Tue Mar 10 20:01:52 2020
New Revision: 358854
URL: https://svnweb.freebsd.org/changeset/base/358854

Log:
  Add one additional file to libllvmminimal, to help the ppc64 bootstrap.
  
  Reported by:  bdragon
  PR:   244251
  MFC after:6 weeks
  X-MFC-With:   358851

Modified:
  head/lib/clang/libllvmminimal/Makefile

Modified: head/lib/clang/libllvmminimal/Makefile
==
--- head/lib/clang/libllvmminimal/Makefile  Tue Mar 10 19:52:19 2020
(r358853)
+++ head/lib/clang/libllvmminimal/Makefile  Tue Mar 10 20:01:52 2020
(r358854)
@@ -58,6 +58,7 @@ SRCS+=Support/Unicode.cpp
 SRCS+= Support/VirtualFileSystem.cpp
 SRCS+= Support/Watchdog.cpp
 SRCS+= Support/WithColor.cpp
+SRCS+= Support/YAMLParser.cpp
 SRCS+= Support/circular_raw_ostream.cpp
 SRCS+= Support/raw_ostream.cpp
 SRCS+= Support/regcomp.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r358711 - in head/contrib/llvm-project/clang: include/clang/Basic lib/CodeGen lib/Sema

2020-03-06 Thread Dimitry Andric
Author: dim
Date: Fri Mar  6 17:02:14 2020
New Revision: 358711
URL: https://svnweb.freebsd.org/changeset/base/358711

Log:
  Merge commit f75939599 from llvm git (by Erich Keane):
  
Reland r374450 with Richard Smith's comments and test fixed.
  
The behavior from the original patch has changed, since we're no
longer allowing LLVM to just ignore the alignment.  Instead, we're
just assuming the maximum possible alignment.
  
Differential Revision: https://reviews.llvm.org/D68824
  
llvm-svn: 374562
  
  This fixes 'Assertion failed: (Alignment != 0 && "Invalid Alignment"),
  function CreateAlignmentAssumption', when building recent versions of
  v8, which invoke __builtin_assume_aligned() with its alignment argument
  set to 4GiB or more.
  
  Clang will now report a warning, and show the maximum possible alignment
  instead, e.g.:
  
  huge-align.cpp:1:27: warning: requested alignment must be 536870912 bytes or 
smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment]
  void *f(void *g) { return __builtin_assume_aligned(g, 4294967296); }
^   ~~
  
  Upstream PR:  https://bugs.llvm.org/show_bug.cgi?id=43839
  Reported by:  cem
  MFC after:3 days

Modified:
  head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
  head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp
  head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h
  head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp

Modified: 
head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
==
--- head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td  
Fri Mar  6 16:52:20 2020(r358710)
+++ head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td  
Fri Mar  6 17:02:14 2020(r358711)
@@ -2797,6 +2797,10 @@ def err_alignment_dependent_typedef_name : Error<
 
 def err_attribute_aligned_too_great : Error<
   "requested alignment must be %0 bytes or smaller">;
+def warn_assume_aligned_too_great
+: Warning<"requested alignment must be %0 bytes or smaller; maximum "
+  "alignment assumed">,
+  InGroup>;
 def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning<
   "%q0 redeclared without %1 attribute: previous %1 ignored">,
   InGroup;

Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp   Fri Mar  6 
16:52:20 2020(r358710)
+++ head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp   Fri Mar  6 
17:02:14 2020(r358711)
@@ -2026,11 +2026,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDe
 
 Value *AlignmentValue = EmitScalarExpr(E->getArg(1));
 ConstantInt *AlignmentCI = cast(AlignmentValue);
-unsigned Alignment = (unsigned)AlignmentCI->getZExtValue();
+if (AlignmentCI->getValue().ugt(llvm::Value::MaximumAlignment))
+  AlignmentCI = ConstantInt::get(AlignmentCI->getType(),
+ llvm::Value::MaximumAlignment);
 
 EmitAlignmentAssumption(PtrValue, Ptr,
 /*The expr loc is sufficient.*/ SourceLocation(),
-Alignment, OffsetValue);
+AlignmentCI, OffsetValue);
 return RValue::get(PtrValue);
   }
   case Builtin::BI__assume:

Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp
==
--- head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp  Fri Mar  6 
16:52:20 2020(r358710)
+++ head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp  Fri Mar  6 
17:02:14 2020(r358711)
@@ -4548,7 +4548,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo 
   llvm::Value *Alignment = EmitScalarExpr(AA->getAlignment());
   llvm::ConstantInt *AlignmentCI = cast(Alignment);
   EmitAlignmentAssumption(Ret.getScalarVal(), RetTy, Loc, 
AA->getLocation(),
-  AlignmentCI->getZExtValue(), OffsetValue);
+  AlignmentCI, OffsetValue);
 } else if (const auto *AA = TargetDecl->getAttr()) {
   llvm::Value *AlignmentVal = CallArgs[AA->getParamIndex().getLLVMIndex()]
   .getRValue(*this)

Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp
==
--- 

Re: svn commit: r358655 - head/sbin/mount_nfs

2020-03-05 Thread Dimitry Andric
On 5 Mar 2020, at 22:01, Gleb Smirnoff  wrote:
> 
> On Thu, Mar 05, 2020 at 09:30:41PM +0300, Slawa Olhovchenkov wrote:
> S> > > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote:
> S> > > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' 
> to 'struct
> S> > > S> > > D> if_msghdr *' increases required alignment from 1 to 4
> S> > > S> > > D> [-Werror,-Wcast-align]
> S> > > S> > > D> ifm = (struct if_msghdr *)buf;
> S> > > S> > > D>   ^~~
> S> > > S> > > D> 1 error generated.
> S> > > S> > > D>
> S> > > S> > > D> In practice I don't think the buffer can ever get 
> misaligned, so can you
> S> > > S> > > D> please add a NO_WCAST_ALIGN= to the Makefile?
> S> > > S> > >
> S> > > S> > > route(8) handles the same problem via intermediate (void *) 
> cast. What is
> S> > > S> > > preferred way to solve the problem? Change compiler flags file 
> wide, or
> S> > > S> > > just through (void *) cast?
> S> > > S> >
> S> > > S> > Copy to aligned buffer or got SIGBUS on some architectures?
> S> > > S>
> S> > > S> char buf[2048] __aligned(__alignof(struct if_msghdr));
> S> > > S>
> S> > > S> resolve this watning.
> S> > >
> S> > > Thanks, Slawa! I think this is the most elegant solution.
> S> >
> S> > Why don't just declare the buffer as:
> S> >
> S> >   struct if_msghdr buf;
> S> >
> S> > and then do:
> S> >
> S> >   nread = read(s, , sizeof buf);
> S> >
> S> > ?  You are never reading more than one if_msghdr anyway, and then there
> S> > is no need to cast anything.
> S>
> S> My inspiration: route socket can return other messages (man 4 route)
> 
> Yes, exactly. We don't know what size next datagram is going to be.

Oh, in that case this code seems completely wrong.  How do you know the
full datagram will be delivered with one read() call?

If it always is, then there is no need to read more than the size of
struct if_msghdr, since you are not using any data beyond it.  So in
that case, you can suffice with read(..., sizeof(if_msghdr)).

If the read() call will return partial results, you must repeatedly call
it in a loop, until you either reach EOF, or have enough data. In that
case, a buffer with the size of if_msghdr is also enough, since you
never need to read beyond that.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


  1   2   3   4   5   6   7   8   9   10   >