Revert "[dsymutil] Fix ODR type uniquing for -gsimple-template-names" (#195162)
Reverts llvm/llvm-project#194501 as this is triggering an assert in CI:
```
Assertion failed: ((!HasTemplateParamsInName || Tag != dwarf::DW_TAG_subprogram) && "subprogram with template-like name should have a linkage name"), function getChildDeclContext, file DWARFLinkerDeclContext.cpp, line 114.
```
[clang] teach OpenCL to set the param addrspace before calling CG EmitParmDecl (#184264)
Unfortunately, this still ends up in a slightly awkward place between
Sema and CG, since a few CG phases create implicit parameters (e.g. for
`this`) which also need to be deduced into the correct address space by
Sema. This is intended to be clearly extensible for other targets that
also need this.
Changes the constructor for ImplicitParamDecl to be private again, so
that all users will go through the Create method, by making the object
ctor itself declared `protected` (like all the other VarDecl subtypes).
The memory is later cleaned up by the ASTContext bump allocator, and
since the stack is basically also a bump allocator, is is typically
equally fast. (Reverts 550d13aebbcc03806811a3aa08e674b9b84e08e8)
(If I got my commit stacked extraction right) This should allow removing
the special cases for OpenCL from EmitParmDecl once
https://github.com/llvm/llvm-project/pull/181390 lands, since this
aligns the behavior of that function with the declared intent of each
[7 lines not shown]
[clang][NFC] Reduce one of JSON dump tests (#195026)
#125791 introduced `strict-pack-match` flag for
`ClassTemplateSpecializationDecl`, and covered it with AST dump tests in
`ast-dump-template.cpp`, in both textual and JSON formats. However, JSON
test was generated by a script, which made it overspecified. This PR
extracts the relevant part of ≈9200 lines of FileCheck directives.
[BOLT][AArch64] Add a failing test to demonstrate bug (#194896)
When not in compact-code-model the longjump pass may consider certain
branches in range, but later at JITLink hugify forces them out of range
probably because it aligns hot code at runtime.
[CodeGen][NFC] Refactor inline asm constraint determination (#195104)
The original function was very large and unwieldy. This also sets the
function up for future improvements.
[mlir][linalg][NFC] Decompose interface op description (#194841)
Adds missing description to the decompose interface transform op.
The main objective is to clarify which values the op's return handle
contains without having to cross-reference AggregatedOpInterface.
Assisted-by: Claude
[mlir] Add [may]updateStartingPosition to VectorTransferOpInterface
This commit adds methods to VectorTransferOpInterface that allow
transfer operations to be queried for whether their base memref (or
tensor) and permutation map can be updated in some particular way and
then for performing this update. This is part of a series of changes
designed to make passes like fold-memref-alias-ops more generic,
allowing downstream operations, like IREE's transfer_gather, to
participate in them without needing to duplicate patterns.
[Driver] Disable -fobjc-constant-literals by default (#195000)
Disable the feature by default in the driver so it is no longer
implicitly enabled for ObjC compilations as there are unresolved issues
(see
https://github.com/llvm/llvm-project/pull/185130#issuecomment-4298886165).
Users can still opt in explicitly with -fobjc-constant-literals.
[mlir][ABI] Add ABITypeMapper and ABIRewriteContext (#190661)
Add ABITypeMapper and ABIRewriteContext as the dialect-agnostic
bridge between MLIR dialects and the LLVM ABI Lowering Library.
ABITypeMapper maps MLIR built-in types (integer, float, vector,
index, memref) to abi::Type* using DataLayout for sizes and
alignment. Dialect-specific types fall back to integer mapping
via DataLayoutTypeInterface.
ABIRewriteContext defines the abstract interface that each dialect
(CIR, FIR) implements to rewrite function definitions and call
sites after ABI classification. See the CIR ABI lowering design
document (clang/docs/ClangIRABILowering.md, Section 4) for the
architectural context.
Unit tests for both components (18 test cases).
[LV] Update test to not have trivially simplify-able/dead instrs (NFC) (#195136)
Make a few tests more robust w.r.t. simplifications/DCE by adding users
and adjust a trivially simplify-able AND.
[lldb] Centralize the pexpect timeout to make it easy to override (#195131)
When debugging PExpect tests, the 60 second timeout can make that
process rather tedious. For TestStatusline, I used a class variable to
easily override it while iterating but the idea is applicable more
generally.
[SystemZ] Replace PatLeaf with ImmLeaf
The code snippets for the predicates are a bit shorter, because
the APInt is directly available instead of an SDNode. Main
advantage is that it enables the constraint to be ported to
GlobalISel.
[DWARFLinker] Make ODR uniquing deterministic (#194777)
The parallel DWARF linker deduplicates types across compile units using
a shared TypePool. When multiple CUs define the same type,
allocateTypeDie uses compare_exchange_strong to race for setting the
canonical DIE. The first thread to succeed stores the DIE and clones its
attributes, while subsequent threads use it the canonical one. Which
thread wins depends on OS thread scheduling, making the output
non-deterministic.
This PR fixes the non-determinism by assigning each CompileUnit a
priority based on its position in the link order (object file index, CU
index within the file). When a CU wants to mark DIE as canonical, it
acquires the spinlock, and only stores its DIE if its priority is
strictly lower than the current canonical DIE. This ensures that the
canonical DIE is always the lowest-priority (i.e. first) CU that defines
that type. The replaced DIE is leaked into the bump allocator and the
existing DebugTypeDeclFilePatch and accelerator record filters skips the
orphaned DIEs via getFinalDie() checks.
[2 lines not shown]
[lldb] Remove commented-out code in DWARFExpression (NFC) (#195138)
`DW_OP_addr_sect_offset4` is not a real DWARF opcode; it was a
proprietary LLDB proposal that was never adopted (and has no llvm::dwarf
constant). The same shared-library sliding problem is handled today by
evaluating DW_OP_addr as a FileAddress and converting via
Value::ConvertToLoadAddress.
[libc++][NFC] Simplify the mersenne_twister_engine implementation a bit (#194893)
This replaces some SFINAE and function overloading with `if
_LIBCPP_CONSTEXPR` to simplify the code a bit.
[flang][NFC] Converted five tests from old lowering to new lowering (part 54) (#194774)
Convert five tests to use new HLFIR lowering instead of legacy FIR
lowering:
Lower/Intrinsics/c_f_pointer.f90, Lower/Intrinsics/c_loc.f90,
Lower/default-initialization-globals.f90, Lower/cray-pointer.f90,
Lower/loops.f90
[Flang][Driver] NFC: Move Flang/Fortran only options to a separate file (#194398)
This PR factors out the Flang/Fortranly only options from Options.td
into a separately file (FlangOptions.td).
Assisted-by: codex