Enforce an EdgeSet (implemented as a map) invariant: each map entry
represents at least one edge. That is, a map key should not exist if
the corresponding value is empty.
[clang-cl] Add new option `/pathmap:<from>=<to>` to replace the path prefix <from> with <to>. (#198664)
This option matches MSVC options and does the path substitution for the
file references in the preprocessor macros, debug and coverage information.
This option acts as a clang's ``-ffile-prefix-map=value`` and with some
known differences in behaviour with original CL's option that do not affect
the functionality:
* nomalizes the macro prefix map pathes -- removes `./` and uses the target's
platform-specific path separator character when exanding the preprocessor
macros -- ``-ffile-reproducible`` (but not the debug and coverage prefix maps).
* does not require ``/experimental:deterministic`` as by MSVC. It needed for
removing a hostname from a mangling hash gen, but clang-cl does not use
a hostname when generates the hashes.
Known issues:
* does not remap the pathes within PCH/PCM files.
[docs] Rewrite LangRef.md as Markdown
Tracking issue: #201242
This change migrates LangRef by itself, since it is quite a large
document with many idiosyncracies.
LangRef makes extensive use of definition lists, which apparently
require enabling the deflist MyST extension in Sphinx conf.py. In part
because definition list boundaries are controlled by indentation,
several of them required manual fixups to get the nesting right. Some of
the issues were pre-existing broken indentation, but this should now be
much better.
I have a verification script that tracks all anchors and ensures that
all previous anchors are carried over to the new document, so no
mid-document links are broken.
[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.
(devel/R-Rpp) Trying to fix build either on *BSD and SmartOS by SUBST
Tested on NetBSD/amd64 11.99.6 and SmartOS
SunOS smaortOS 5.11 joyent_20260528T000227Z i86pc i386 i86pc
To my knowledge, neither (ifneq and endif) nor (if .endif) clause in src/Makevars does
work, sorry, so SUBST frame work are used for now, please improve this changes,
thanks
[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