[llvm] Bypass sandbox for `getMainExecutable()` (#174816)
Getting the executable path is a fairly common operation in LLVM tools
that doesn't affect their outputs. Allow calling it under the sandbox.
[DirectX] Specify NegZero as signed (#174840)
#171456 set `ImplicitTrunc` to false by default. So `NegZero` value was
no longer being created as a signed integer.
This caused a similar crash during `DXILIntrinsicExpansion` as reported
here:
https://github.com/llvm/llvm-project/pull/171456#issuecomment-3718690088.
This change fixes the test case from crashing in the DirectX backend by
manually specifying it as a signed integer.
InstCombine: Handle fadd in SimplifyDemandedFPClass
Note some of the tests currently fail with alive, but not
due to this patch. Namely, when performing the fadd x, 0 -> x
simplification in functions with non-IEEE denormal handling.
The existing instsimplify ignores the denormals-are-zero hazard by
checking cannotBeNegativeZero instead of isKnownNeverLogicalZero.
Also note the self handling doesn't really do anything yet, other
than propagate consistent known-fpclass information until there is
multiple use support.
This also leaves behind the original ValueTracking support, without
switching to the new KnownFPClass:fadd utility. This will be easier
to clean up after the subsequent fsub support patch.
iflib: Drop tx lock when freeing mbufs using simple_transmit
Freeing completed transmit mbufs can be time consuming (due to them
being cold in cache, and due to ext free routines taking locks),
especially when we batch tx completions. If we do this when holding
the tx ring mutex, this can cause lock contention on the tx ring mutex
when using iflib_simple_transmit.
To resolve this, this patch opportunistically copies completed mbuf
pointers into a new array (ifsd_m_defer) so they can be freed after
dropping the transmit mutex. The ifsd_m_defer array is
opportunistically used, and may be NULL. If its NULL, then we free
mbufs in the old way. The ifsd_m_defer array is atomically nulled
when a thread is using it, and atomically restored when the freeing
thread is done with it. The use of atomics here avoids
acquire/release of the tx lock to restore the array after freeing
mbufs.
Since we're no longer always freeing mbufs inline, peeking into them to see if a
[17 lines not shown]
ValueTracking: Handle fdiv by known 0 case in computeKnownFPClass
This will help subsume some transforms instsimplify performs
in the middle of SimplifyDemandedFPClass