[CodeGen] Ignore OpaqueValueExprs that are unique references to their
source expressions when iterating over a PseudoObjectExpr's semantic
subexpression list.
Previously the loop in emitPseudoObjectExpr would emit the IR for each
OpaqueValueExpr that was in a PseudoObjectExpr's semantic-form
expression list and use the result when the OpaqueValueExpr later
appeared in other expressions. This caused an assertion failure when
AggExprEmitter tried to copy the result of an OpaqueValueExpr and the
copied type didn't have trivial copy/move constructors or assignment
operators.
This patch adds flag IsUnique to OpaqueValueExpr which indicates it is a
unique reference to its source expression (it is not used in multiple
places). The loop in emitPseudoObjectExpr ignores OpaqueValueExprs that
are unique and CodeGen visitors simply traverse the source expressions
of such OpaqueValueExprs.
rdar://problem/34363596
Differential Revision: https://reviews.llvm.org/D39562

kernel - Attempt to fix high vnlru cpu use
* In certain situations _cache_cleanpos() gets into a livelock
of some sort. It is limited by a counter but the livelock creates
havoc when it happens.
* It appears that _cache_cleanpos() can get into a situation where
the head element of all available nchashtbl[] slots is not freeable
(e.g. due to having multiple refs). When this occurs, trailing
elements in the chained hash table cannot be recycled.
nchashtbl[] is typically very large, so this situation does not
happen very often. There are usually plenty of entries to pick
away at. However, it looks like situations can develop where
enough entries get into this masked state that the hysteresis is
unable to complete, resulting in a cpubound loop.
* Refactor the chained list from LIST to TAILQ and modify the
_cache_cleanpos() function to cycle ncp's to the end of the
list before trying to zap them. If the zap fails, the next
iteration will encounter a different head.
Reported-by: ftigeot

Add /boot/overlays to ObsoleteFiles
It has been replaced by /boot/dtb/overlays. We haven't yet populated it with
any of our own overlays, so no further damage from here.
Reported by: Oliver Pinter <oliver.pinter at hardenedbsd.org>

Allow builtins for Cross-DSO CFI on Android
This is needed to avoid the test failure in case when compiler-rt
is set as the default runtime library for Clang.
Differential Revision: https://reviews.llvm.org/D44655

mail/dovecot-pigeonhole: upgrade to 0.4.23:
- editheader extension: Corrected the stream position calculations
performed while making the modified message available as a stream.
Pigeonhole Sieve crashed in LMTP with an assertion panic when the
Sieve editheader extension was used before the message was redirected.
Experiments indicate that the problem occurred only with LMTP and that
LDA is not affected.
- fileinto extension: Fix assert panic occurring when fileinto is used
without being listed in the require line, while the copy extension is
listed there. This is a very old bug.
- imapsieve plugin: Do not log an error for messages that disappear
concurrently while applying Sieve scripts. This is a further
improvement on the imapsieve fix in the previous release (which fixed
a panic). This event is now logged as a debug message.

[analyzer] Fix the assertion failure when static globals are used in lambda by reference
Also use the opportunity to clean up the code and remove unnecessary duplication.
rdar://37625895
Differential Revision: https://reviews.llvm.org/D44594

[ofw] fix errneous checks for OF_finddevice(9) return value
OF_finddevices returns ((phandle_t)-1) in case of failure. Some code
in existing drivers checked return value to be equal to 0 or
less/equal to 0 which is also wrong because phandle_t is unsigned
type. Most of these checks were for negative cases that were never
triggered so trhere was no impact on functionality.
Reviewed by: nwhitehorn
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D14645

Update mpr(4) driver from v15 to v18 from Broadcom site.
Version 16 is just a number bump, since we already had those changes.
Version 17 introduces new AdapterType value, that allows new user-space
tools from Broadcom to differentiate adapter generations 3 and 3.5.
Version 18 updates headers and adds SAS_DEVICE_DISCOVERY_ERROR reporting.
MFC after: 2 weeks

Remove GnuHashTableSection::getShift2().
Choosing a Shift2 value based on wordsize is cargo-culted from gold.
Assuming that djb hash is a good hash function, choosing bits [4,9]
shouldn't be any worse or better than choosing bits [5,10]. We shouldn't
have copied that behavior that we can't justify in the first place.
Differential Revision: https://reviews.llvm.org/D44547

allow-multiple-definitions should completely suppress errors instead of making them
warnings.
We found that when you pass --allow-multiple-definitions or `-z muldefs`
to GNU linkers, they don't complain about duplicate symbols at all. They
don't even print out warnings on it. We emit warnings in that case.
If you pass --fatal-warnings, that difference results in a link failure.
Differential Revision: https://reviews.llvm.org/D44549

[SelectionDAG] Transfer DbgValues when integer operations are promoted
Summary:
DbgValue nodes were not transferred when integer DAG nodes were promoted. For example, if
an i32 add node was promoted to an i64 add node by
DAGTypeLegalizer::PromoteIntegerResult(), its DbgValue node was not transferred to the new
node. The simple fix is to update SetPromotedInteger() to transfer DbgValues.
Add AArch64/dbg-value-i8.ll to test this change and fix ARM/debug-info-d16-reg.ll which
had the wrong DILocalVariable nodes with arg numbers even though they are not for function
parameters.
Patch by Se Jong Oh!
Reviewers: vsk, JDevlieghere, aprantl
Reviewed By: JDevlieghere
Subscribers: javed.absar, kristof.beyls, llvm-commits
Tags: #debug-info
Differential Revision: https://reviews.llvm.org/D44546

I didn't see that SocketAddress.cpp was already being pulled
in to debugserver; my re-addition resulted in duplicated
symbols. Remove my added SocketAddress.cpp, and change the
original one to also be included for the debugserver-mini target.

[MachineOutliner] AArch64: Emit CFI instructions when outlining calls
When outlining calls, the outliner needs to update CFI to ensure that, say,
exception handling works. This commit adds that functionality and adds a test
just for call outlining.
Call outlining stuff in machine-outliner.mir should be moved into
machine-outliner-calls.mir in a later commit.

Fix initialization of eventhandler mutex.
mtx_init does not do a copy of the name string it is passed. The
eventhandler code incorrectly passed the parameter string directly to
mtx_init instead of using the copy it makes. This was an existing
problem with the code that I dutifully copied over in my changes in r325621.
Reported by: Anton Rang <rang AT acm.org>
Reviewed by: rstone, markj
Approved by: rstone (mentor)
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D14764

[X86] Simplify the AVX512 code in LowerTruncate a little.
We don't need to create an ISD::TRUNCATE node to return, we started with one and can
return it. Also remove the call to getExtendInVec, the result is just going to be a
getNode of that value passed in.