[lldb] Fix data buffer regression in ObjectFile (#177724)
This fixes a regression in `ObjectFile` and `ObjectFileELF` introduced
by #171574.
The original code created a `DataBuffer` using `MapFileDataWritable`.
```
data_sp = MapFileDataWritable(*file, length, file_offset);
if (!data_sp)
return nullptr;
data_offset = 0;
```
The new code requires converting the `DataBuffer` to a `DataExtractor`:
```
DataBufferSP buffer_sp = MapFileDataWritable(*file, length, file_offset);
if (!buffer_sp)
[11 lines not shown]
[CodeGen][NPM] Specify Loop pass adaptor to not use MSSA (#176690)
this needs to be done since "loop-mssa" adapter assumes all passes that
are part of it to preserve MSSA, CanonicalizeFreezeInLoopsPass doesen't
do this. I'm not really sure of the history here (about having two
variants of loop pass adatpters)
[bazel] Fixes for compiler-rt Bazel build rules (#177287)
Update the compiler-rt arch-specific file groups to include `.h` file
extensions. At least `arm` and `ppc` have these, and seems better to be
consistent and defensive.
Also add `5` to model list for outlined atomics, matching CMake.
[AMDGPU][GFX1250] Optimize s_wait_xcnt for back-to-back atomic RMWs (#177620)
This patch optimizes the insertion of s_wait_xcnt instruction for
sequences of atomic read-modify-write (RMW) operations in the
SIInsertWaitcnts pass. The Memory Legalizer conservatively inserts a
soft xcnt instruction before each atomic RMW operation as part of PR
168852, which is correct given the nature of atomic operations.
However, for back-to-back atomic RMWs, only the first s_wait_xcnt is
necessary for better runtime performance. This patch tracks atomic
RMW blocks within each basic block and removes redundant soft xcnt
instructions, keeping only the first wait in each sequence. An atomic
RMW block continues through subsequent atomic RMWs and non-memory
instructions (e.g., ALU operations) but is broken by CU-scoped memory
operations, atomic stores, or basic block boundaries.
Cleanup: Remove SmallVector hacks (#177667)
We no longer support any platform that uses Clang 5. This was a
workaround for older clang versions where template arguments weren't
merged between forward declarations and definitions correctly.
Since we don't support anything this old anymore, we can drop this
workaround.
Note: I do not have merge permissions.
nanobsd: Use mtree -C to produce the metalog
Prefer an mtree -C output, which is guaranteed to be mtree-compatible.
Add "gname", "uname", and "tags" to the default keyword set, while
removing "size" and "time", the latter being set on kernel file entries
and taking precedence over makefs -T (when paired with -F).
As a side effect, this produces a cleaner file with sorted keywords.
Note that passing "-u" to sort in order to pipe to mtree is no longer
necessary, but we'll do it out of habit.
Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54854
[flang] Added ConditionallySpeculatable and Pure for some FIR ops. (#174013)
This patch implements `ConditionallySpeculatable` interface for some
FIR operations (`embox`, `rebox`, `box_addr`, `box_dims` and `convert`).
It also adds `Pure` trait for `fir.shape`, `fir.shapeshift`,
`fir.shift` and `fir.slice`.
I could have split this into multiple patches, but the changes
are better tested together on real apps, and the amount of affected
code is small.
There are more `NoMemoryEffect` operations for which I am planning
to do the same in future PRs.
[flang] Support cuf.device_address in FIR AliasAnalysis. (#177518)
Support `cuf.device_address` same way as `fir.address_of`.
This implementation implies that the host address and the device
address `MustAlias` (as shown in the new test). This should be
conservatively correct as long as `MustAlias` does not allow
to assume that the actual addresses are the same (that is what
LLVM documentation implies, I believe).
It is probably worth adding an operation interface to handle
`fir::AddrOfOp` and `cuf::DeviceAddressOp` in FIR AliasAnalysis,
but for the initial implementation I hardcoded the checks.
I also removed the call to `fir::valueHasFirAttribute` that performs
on demand SymbolTable lookups, which may be costly, and added
SymbolTable caching in FIR AliasAnalysis object. Anyway,
`fir::valueHasFirAttribute` does not work for `cuf::DeviceAddressOp`.
astro/calceph: New port
CALCEPH Library is designed to access the binary planetary ephemeris
files, such INPOPxx and JPL DExxx ephemeris files, (called 'original
JPL binary' or 'INPOP 2.0 or 3.0 binary' ephemeris files in the next
sections) and the SPICE kernel files (called 'SPICE' ephemeris files
in the next sections).
amd64: Fix sys/pcpu.h usage in vmm_host.h and md_var.h
Include sys/pcpu in vmm_host.h as its structs and functions are used
there, and add a forward declaration of struct pcpu to md_var.h as it
is used in some function prototypes.
Reviewed by: corvink, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51550
[HIP] Provide implicit include to ROCm library directory (#177704)
Summary:
It's more correct to directly link the HIP runtime if we know the path,
however some users were relying on the old `-L` to pass in some other
non-standard HIP libraries. Put that part back in for now.
[lldb] Avoid redundant calls to `std::shared_ptr::get` (NFC) (#177720)
Avoid redundant calls to `std::shared_ptr::get()`. The class provides a
dereference operator and using that is the standard, idiomatic way to
access the underlying object.