[CIR] Fix CIR Test failures after unnamed_addr restored to vtables (#201962)
We had previously removed the `unnamed_addr` keyword check from our
vtable checks for OGCG because it was temporarily not emitted in that
case. The OGCG output has been modified again, so we need to update our
checks again.
The CIR output has not changed.
[DirectX] Generate compiler version part in llc (#199699)
This change modifies DXContainerGlobals pass to generate compiler
version (VERS) part in DXContainer.
VERS part allows consumers to information about compiler version used to
build shader.
When debug info PDB file creation will be implemented, VERS part should
go to PDB file.
APEI: Provide more info on fatal hardware errors
This change refactors fatal error delivery via APEI and prints more info:
- Makes the NMI handler call into the ge handler to establish a common
code flow, no matter how the error is delivered
- Adds the FRU to the panic string so as to provide more information than
just "APEI Fatal Hardware Error!" such as
"APEI Fatal Hardware Error: PcieError"
- Prints more details about fatal pcie errors. Note that we skip acquiring
Giant on fatal errors
- Hexdumps the full GED data on fatal errors, so as to facilitate
offline data analysis
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57417
[lldb] Skip plugin teardown when exiting without Terminate (#201739)
`import lldb` auto-calls SBDebugger::Initialize() but never Terminate().
The g_debugger_lifetime is a deliberately-leaked ManagedStatic, so the
PluginInstances containers are still populated when their static
destructors run at process exit. That tripped the "forgot to unregister
plugin?" assert, and once the assert was gated the dynamically-loaded
plugin map's PluginInfo terminate callbacks ran against PluginInstances
mutexes that had already been destroyed.
This only surfaces with LLDB_ENABLE_DYNAMIC_SCRIPTINTERPRETERS, where
`_lldb` is the script-interpreter plugin dylib and liblldb comes in as a
dependency that exit() finalizes. A static build leaks identically but
never reaches those destructors, so the bug stayed latent.
Track an explicit lifecycle (Uninitialized/Initialized/Terminated) in a
single never-destroyed PluginRegistry. ~PluginInstances only checks for
leftover registrations once Terminate() has run, and the map (never torn
down at exit) only runs its terminate callbacks during an explicit
clear, while every container is still alive.
[SSAF][PointerFlowExtractor] Handle empty initializer lists for scalars and unions
Empty initializer lists for scalars and unions are corner cases that
were previously missed by the PointerFlowExtractor. This commit adds
support for these cases. Because the initializing values are
implicitly constant 0 (or nullptr), they do not bridge entity pointer
levels.
rdar://178856689
[clang] Adding an Atomic Line Logger (#195885)
This PR adds an atomic line logger to `clang`.
Situations have arisen where `clang` performs multi-threaded tasks (such
as dependency scanning), and race conditions may happen. Such race
conditions are difficult to debug using either `lldb` or with
`llvm::errs()`.
This logger provides atomic logging per line to a file on disk with time
stamps at each line to facilitate such investigations. Specifically, the
logger is designed with the following properties:
1. Each line is atomically written to the backing file. This avoids
concurrent writes making the output text interleaving.
2. Each line is prefixed with a timestamp, a process ID and a thread ID.
3. `LogLine` implements a `<<` operator to allow arbitrary printable
types to be piped into it.
4. The `LogLine`'s user does not need to check if it is setup or valid.
[12 lines not shown]
[SLP] Fix crash in ordered reduction with loop-carried chain root
tryToReduceOrdered built the buildTree ignore list only from the current
window's reduced values, omitting the chain root when its leaf is a
trailing scalar outside the window.
buildTree then vectorized the root through the phi cycle,
vectorizeTree unlinked it, and emitReduction inserted at the dangling
insertion point.
Build the ignore list from the full ReductionOps chain, matching the
associative-reduction path, so the root stays scalar to fix a crash.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/201963
[libclc][Test] Don't hard code `clang` path in update_libclc_tests.py (#201806)
In #201773, build folder is `redhat-linux-build` rather than `build`.
Detect clang from PATH. Also add --clang-binary option to specify clang path.
[libclc][Test] Add -fno-discard-value-names to RUN line (#201808)
Entry block label could be missing. Add -fno-discard-value-names to make
sure it exists.
Resolves #201773
[libclc] Fix LIBCLC_OUTPUT_LIBRARY_DIR when find_package(LLVM) fails (#201816)
If we configure llvm from llvm-project/build folder, find_package(LLVM)
succeeds, `LLVM_LIBRARY_OUTPUT_INTDIR` is `build/./lib` and
`LLVM_BINARY_DIR` is `build`.
However, in #201773, find_package(LLVM) fails due to
LLVM_LIBDIR_SUFFIX=64, LLVM_LIBRARY_OUTPUT_INTDIR is
`redhat-linux-build/runtimes/runtimes-nvptx64-nvidia-cuda-bins/lib64`
and LLVM_BINARY_DIR is `redhat-linux-build`.
Use LLVM_BINARY_DIR, which is stable for both cases, for libclc output dir.
Fixes #201773
[libc] Fix clock_gettime on arm32 (#201959)
After removing 32 bit time_t the buildbot has been failing due to a
segfault. This PR fixes it. Not the cleanest fix but I don't want the
buildbot failing over the weekend.
Assisted-by: Automated tooling, human reviewed.
Add CBuffer global to `@llvm.used` so it does not get optimized away
by GlobalOptPass before it reaches {DXIL|SPIRV}CBufferAccess pass.
Remove the CBuffer global from `@llvm.used` list in {DXIL|SPIRV}CBufferAccess
pass after individual CBuffer constants are replaced with accesses via the
CBuffer handle.