[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>
[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>
[flang][OpenMP][NFC] Share SetSymbolDSA between semantics and lowering (#207826)
Move the DSA helper from the private OmpAttributeVisitor::SetSymbolDSA
into the public openmp-dsa header next to GetSymbolDSA, and share the
DSA flag set through a single GetDataSharingAttributeFlags().
This lets an upcoming metadirective lowering change reuse the helper to
set the predetermined DSA of the loop induction variables of a selected
variant. A loop-associated variant is resolved during lowering, so the
usual semantic DSA resolution never runs on its loop nest and lowering
must set those flags itself.
Assisted with Copilot.
[Attributor] AAAddressSpace should use the AA for recursive lookups
If we stripped some values, we can use the AAAddressSpace again for
an optimistic AS value. If we didn't strip any value, we can still use
the TLI.
[libc++] Use a median-of-3 for the A/B comparison benchmarking job (#208023)
After a bit of testing, I think this provides a good tradeoff between
resource utilization and noise reduction. Furthermore, the comparison
script (which produces the output) will be augmented to surface the
variability of the results in a separate PR.