Add explicit anchors to deep headers for AMD DWARF ext doc (#208110)
Anchors get auto-generated only upto level 6, and
https://github.com/llvm/llvm-project/pull/208103 added another level,
causing sphinx to complain about no targets for these anchors.
[clang][ARM64X] Support compiling both native and EC objects with -marm64x (#207612)
When -marm64x is used during the assembly phase, construct jobs for both
native and EC targets and merge their outputs using llvm-objcopy.
Allow passing ArchName to computeTargetTriple on non-Darwin targets to
enable BindArchAction on other platforms. Additionally, allow passing
multiple inputs to ObjcopyJobAction and use this capability to construct
ARM64X merge jobs.
[libc][cpp::string] Fix off-by-one bug in resize and a memory leak (#208077)
AFAICT, `cpp::string` is only used in tests, so these bugs were mostly
inconsequential.
Update AMD DWARF ext doc headers to only have a single title-level header (#208103)
This ensures no leakage of individual headings on the page to the global
TOC, see https://github.com/llvm/llvm-project/pull/184440
[ARM] Don't try to emit AEABI libcalls for non-AEABI targets (#207813)
PR #172672 added ARMTargetLowering::LowerAEABIUnalignedLoad/Store which
lowers some of the unaligned i32/i64 stores to
__aeabi_u{read,write}{4,8}. The libcall is emitted unconditionally, with
no check whether the target environment actually has these AEABI
helpers.
We don't have it for Apple/MachO which leads to a compiler crash.
rdar://175136625
[lldb] Give Wasm stack frames a synthetic call frame address (#208061)
UnwindWasm reported a call frame address of zero for every Wasm frame.
StackID orders frames by their CFA, assuming the stack grows downward so
that a younger frame compares below its caller. With every CFA equal to
zero that ordering collapsed, and CompareCurrentFrameToStartFrame
treated a step into a function as a step out, which silently disabled
step-in avoid-regexp and confused other thread plans.
WebAssembly keeps its call stack inside the engine and exposes no
linear-memory frame address, so synthesize a CFA from each frame's
distance to the outermost frame. That distance is invariant as frames
are pushed and popped above it, so a given frame keeps a stable, ordered
CFA across steps.
[SystemZ][z/OS] Honor alignment of global data
The alignment of sections is set after the section are created.
Thus, the ED structure set at object construction time is updated
with the current section alignment. This only applies to ED type
section. As result, the alignment of global data is correctly set.
[mlir][acc] Add acc.on_device op
Add an operation to represent the runtime call to acc_on_device.
This runtime call is important to fold early in the compilation pipeline
and having an operation allows us to easily recognize it when emitted by
frontends.
[flang][acc] Emit acc.on_device operation for acc_on_device call
It is important we recognize acc_on_device calls as they need to be
folded during compilation. Emitting this operation helps with the
recognition of the runtime call in the optimizer.
[lldb] Remove uses of ConstString in FileSpec methods (#206851)
After this, FileSpec only uses ConstString for storage. In a subsequent
commit, I will change FileSpec's storage.
Revert "[PGO][ICP] Prevent indirect call promotion to functions with incompatible target features" (#208079)
Reverts llvm/llvm-project#192142
Now that https://github.com/llvm/llvm-project/pull/205113 has landed, we
will not inline functions with incompatible target features, even if the
callee is marked `alwaysinline`, so we can promote calls to such
functions while also removing the extra complexity from ICP.
[mlir][acc][flang] Add type sizing utilities (#208074)
Add a general acc utility for computing the size and alignment of a
type. It works for simple scalar types as well as nested and aggregate
types like arrays, tuples, and structures.
Because some types come from other dialects, the utility can hand those
off to a specialized helper that understands them. This lets sizing work
seamlessly even for mixed types, such as an aggregate whose members come
from a different dialect.
Add a Fortran-specific helper so Fortran types are sized correctly,
falling back to the general utility for everything else.
Include unit tests covering a range of scenarios, including scalars,
arrays, aggregates, and mixed-dialect types.
Reland: [LFI][X86] Add X86 LFI target and system instruction rewrites (#207892)
Reintroduction of #189569 using the MCRegisterClass accessor API, which
was recently modified and caused a build error when the previous PR
was merged since it was not rebased onto the latest commit.
[VPlan] Use StepVector without operands, VPBuilder in C++ tests (NFC) (#208075)
Update unit tests construction VScale for VPInstructions without
operands to use StepVector where possible. When VScale is needed,
construct with VPBuilder. Also update constructing other recipes in same
function to use VPBuilder, for consistency.
Split off from approved https://github.com/llvm/llvm-project/pull/207541
[lldb] Support MS style `struct`/`class` in C++ name parser (#196525)
If a type is declared as a `class` or a `struct` is part of the mangled
name in the Microsoft ABI. This is also reflected in the demangled name.
There, it shows up before the qualified name. For example, you could
have `class ns1::ns2::MyClass`. It will show up like this in return
types and function/template arguments.
This adds a check in `CPlusPlusNameParser::ParseFullNameImpl` for these
cases.
[Support] Add missing include for MacOS defines (#208065)
https://github.com/llvm/llvm-project/pull/142733 removed several
includes, including
llvm/Support/ProgramStack.h. This was indirectly including headers that
defined
PRIO_DARWIN_THREAD and PRIO_DARWIN_BG.
Add back sys/resource.h to define them locally.
[libc++][NFC] Rename workflow file for libc++ A/B performance comparisons (#208070)
I want to introduce another workflow that allows running benchmarks on
historical commits of libc++ for LNT submission, so having an
unambiguous name is desirable.
[flang][OpenMP] Support lowering of metadirective (part 3)
Enable lowering of metadirectives that resolve to a loop-associated
variant such as `do`, `simd`, `parallel do`, and `do simd`. The
associated DO construct is made available to the selected variant so the
existing OpenMP loop lowering can process it. A standalone metadirective
uses the following sibling DO, and a begin/end metadirective uses the
first substantive evaluation nested in its block.
For example, when the `vendor(llvm)` selector matches, the `parallel do`
variant is lowered together with the DO loop that follows it:
```fortran
!$omp metadirective when(implementation={vendor(llvm)}: parallel do)
do i = 1, n
y(i) = a*x(i) + y(i)
end do
```
[33 lines not shown]
[SystemZ][z/OS] Emit prolog length
The PPA1 contains fields recording the length of the prolog and the offset
to the instruction updating the stack pointer register. The implementation
consists of the following parts:
- the end of the prolog is marked with a FENCE instruction which prevents
scheduling from moving instructions across the barrier.
- when emitting the PPA1, the FENCE instruction along with other stack
update instructions are used to calculate the length and the offset.
Co-authored-by: Tony Tao <tonytao at ca.ibm.com>