freebsd-skq/contrib
dim bd32a5b2ac Pull in r219009 from upstream llvm trunk (by Adam Nemet):
[ISel] Keep matching state consistent when folding during X86 address match

  In the X86 backend, matching an address is initiated by the 'addr' complex
  pattern and its friends.  During this process we may reassociate and-of-shift
  into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the
  shift into the scale of the address.

  However as demonstrated by the testcase, this can trigger CSE of not only the
  shift and the AND which the code is prepared for but also the underlying load
  node.  In the testcase this node is sitting in the RecordedNode and MatchScope
  data structures of the matcher and becomes a deleted node upon CSE.  Returning
  from the complex pattern function, we try to access it again hitting an assert
  because the node is no longer a load even though this was checked before.

  Now obviously changing the DAG this late is bending the rules but I think it
  makes sense somewhat.  Outside of addresses we prefer and-of-shift because it
  may lead to smaller immediates (FoldMaskAndShiftToScale is an even better
  example because it create a non-canonical node).  We currently don't recognize
  addresses during DAGCombiner where arguably this canonicalization should be
  performed.  On the other hand, having this in the matcher allows us to cover
  all the cases where an address can be used in an instruction.

  I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for
  the new shift node in FoldMaskedShiftToScaledMask.  This RAUW is responsible
  for initiating the recursive CSE on users
  (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it
  is not strictly necessary since the shift is hooked into the visited user.  Of
  course it's safer to keep the DAG consistent at all times (e.g. for accurate
  number of uses, etc.).

  So rather than changing the fundamentals, I've decided to continue along the
  previous patches and detect the CSE.  This patch installs a very targeted
  DAGUpdateListener for the duration of a complex-pattern match and updates the
  matching state accordingly.  (Previous patches used HandleSDNode to detect the
  CSE but that's not practical here).  The listener is only installed on X86.

  I tested that there is no measurable overhead due to this while running
  through the spec2k BC files with llc.  The only thing we pay for is the
  creation of the listener.  The callback never ever triggers in spec2k since
  this is a corner case.

  Fixes rdar://problem/18206171

This fixes a possible crash in x86 code generation when compiling recent
llvm/clang trunk sources.

Direct commit to stable/10, since head already has llvm/clang 3.6.1,
which includes this fix.

Reported by:	jonathan, theraven
Upstream PR:	https://llvm.org/bugs/show_bug.cgi?id=24249
2015-07-29 12:59:16 +00:00
..
amd MFV r277814, r277868, r277869: 2015-02-03 14:36:48 +00:00
apr MFC r266728,266731,266735,266736,268135,268960,269833 2014-08-12 01:40:11 +00:00
apr-util MFC r257129,257936,258084,258569,258602,262250,262251 2014-02-20 20:34:01 +00:00
atf MFC r283170: 2015-05-31 22:44:14 +00:00
binutils MFC r279301: GNU nm: Avoid NULL dereference 2015-03-04 01:10:09 +00:00
bmake MFC bmake changes to stable/10 (r255285,r255916,r258113,r258114,r261212,r266760,r268437) 2014-12-27 16:43:22 +00:00
bsnmp MFC r276319: 2015-01-05 00:12:47 +00:00
byacc MFC: r274460, r274475 2015-01-12 20:14:31 +00:00
bzip2
com_err
compiler-rt MFC 264190: 2014-05-17 21:35:26 +00:00
dialog Update dialog to 1.2-20130923. 2013-09-24 14:52:43 +00:00
diff MFC r260358 2014-01-09 23:51:47 +00:00
dtc MFC r261215, r261257 2014-05-15 14:37:52 +00:00
ee MFC: r277328: 2015-04-16 00:44:05 +00:00
expat Update base system libexpat to 2.1.0. 2013-02-26 00:58:44 +00:00
file MFC r284237,284277: 2015-06-24 19:58:14 +00:00
flex Enable GNU m4 compatibility mode. 2013-05-21 19:23:49 +00:00
gcc MFC r276045: 2014-12-27 05:24:18 +00:00
gcclibs MFC r282115, r282152, r282201 2015-05-16 15:44:13 +00:00
gdb MFC r277608, r277656, r277659: 2015-01-28 02:25:48 +00:00
gdtoa Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
gperf MFC r259756: 2013-12-28 00:03:15 +00:00
groff MFC sa(4) and mt(1) improvements. 2015-03-24 14:36:10 +00:00
hyperv/tools MFC r274370: 2014-12-04 23:27:29 +00:00
ipfilter MFC r283295: ipf(1): Use strchr(3) instead of deprecated index(3) 2015-05-29 17:43:14 +00:00
jemalloc Fix known issues which blow up the process after dlopen("libthr.so") 2015-01-18 11:54:20 +00:00
ldns MFH (r276605, r282089): upgrade to latest Unbound 2015-07-06 13:23:27 +00:00
ldns-host Import Magerya Vitaly's ldns-host, and build it instead of the BIND version 2013-09-08 19:40:32 +00:00
less Revert files with no local changes to their vendor state to ease future 2013-05-31 00:31:45 +00:00
libarchive MFC r282932: MFV r282927,r282928,r282930 (kientzle): 2015-05-21 19:05:47 +00:00
libbegemot
libc-pwcache Replace our version of the pwcache(3) API with NetBSD's implementation. 2012-10-19 12:44:22 +00:00
libc-vis MFC r271287: 2014-10-08 15:44:11 +00:00
libc++ MFC r280864: 2015-04-06 14:50:54 +00:00
libcxxrt MFC r279307: 2015-03-01 00:47:37 +00:00
libexecinfo MFC r258426: libexecinfo: Include terminating null in byte count 2013-11-25 15:54:18 +00:00
libgnuregex Fix build for FreeBSD. We do not have alloca.h. 2013-06-05 21:28:33 +00:00
libpcap Merge 272659: 2015-01-26 03:26:37 +00:00
libreadline
libstdc++ MFC r268993, r268893, r268994, plus partial r264070, r264082 2014-08-10 22:26:29 +00:00
libucl MFC r264400,r265836: 2014-12-31 23:25:37 +00:00
libyaml Import libyaml as libbsdyml (private brand name) 2013-03-04 11:27:41 +00:00
llvm Pull in r219009 from upstream llvm trunk (by Adam Nemet): 2015-07-29 12:59:16 +00:00
mdocml strcmp(3) will suffice here, also follow the style of the remaining file more closely. 2012-10-20 10:16:55 +00:00
mknod Add NetBSD's mtree to the tree and install it as nmtree as the first step 2012-12-21 21:00:00 +00:00
mtree MFC r273796 2014-11-04 22:47:51 +00:00
ncurses
netbsd-tests Merge: r277829 2015-05-23 09:16:35 +00:00
netcat MFC r282613: MFV r282611: netcat from OpenBSD 5.7. 2015-05-21 21:45:37 +00:00
ngatm
ntp MFC r280849,280915-280916,281015-281016,282097,282408,282415,283542, 2015-07-15 19:21:26 +00:00
nvi MFC r259088: Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix 2014-08-15 19:06:59 +00:00
ofed MFC r280264: 2015-03-25 10:50:13 +00:00
one-true-awk MFC r271879: 2014-10-10 23:18:44 +00:00
openbsm MFC r271577: 2014-09-18 22:17:46 +00:00
openpam MFH (r273273): Merge upstream r825: fix line continuation in whitespace 2014-10-20 08:59:30 +00:00
openresolv MFC r282434: 2015-05-11 01:33:34 +00:00
opie Restore ABI compatibility with 10.0-RELEASE, so that stable/10 users can use 2014-10-19 12:11:25 +00:00
pam_modules/pam_passwdqc Make the PAM password strength checking module WARNS=2 safe. 2013-08-27 15:50:26 +00:00
pf MFC r284914: 2015-07-05 14:17:57 +00:00
pjdfstest MFC r272057,r272083,r272084,r272087,r274016: 2014-12-05 11:44:18 +00:00
pnpinfo
sendmail MFC: Update for sendmail 8.15.2 import 2015-07-09 05:27:30 +00:00
serf MFC r266728,266731,266735,266736,268135,268960,269833 2014-08-12 01:40:11 +00:00
smbfs MFC r275805: 2015-04-30 16:08:47 +00:00
sqlite3 Introduce svnlite so that we can check out our source code again. 2013-06-18 02:53:45 +00:00
subversion MFC r266728,266731,266735,266736,268135,268960,269833 2014-08-12 01:40:11 +00:00
tcp_wrappers MFC r272947, r272950: 2015-01-17 01:20:28 +00:00
tcpdump MFC r285275 (only the part that fixes PR 199568): 2015-07-18 01:29:27 +00:00
tcsh
telnet MFC r274364: 2014-12-05 12:23:29 +00:00
texinfo
tnftp [SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2). 2014-11-04 23:29:57 +00:00
top MFC 284165: 2015-06-17 02:30:12 +00:00
traceroute MFC r283784: 2015-06-03 17:45:45 +00:00
tzcode MFC r274365: 2014-12-05 12:25:36 +00:00
tzdata MFC of 284397,tzdata10: 2015-06-15 01:01:25 +00:00
unbound MFH (r276605, r282089): upgrade to latest Unbound 2015-07-06 13:23:27 +00:00
unvis Replace our (un)vis(1) commands with implementations from NetBSD to 2013-03-15 00:05:50 +00:00
vis MFC r263289: Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-24 13:48:04 +00:00
wpa MFC r263925 2014-04-12 23:48:02 +00:00
xz MFC r273498: MFV r273494: xz 5.0.7. 2014-11-08 00:49:45 +00:00