[llvm][release] Reveal download links based on uploaded assets (#167688)
For the 21.x release, download links were supposed to be revealed once
all the release builds had completed successfully. In reality, MacOS
never had a successful build so I had to hand edit the release messages.
This PR fixes this by focusing instead on what is in the release assets
after the release build step has finished (in whatever state that might
be).
1. Links are now built from a format string, with the linked files being
format arguments for that string. This is a balance between ease of
editing the format, and having the file names for use later (I tried
regex-ing file names out of the final links, which can work but is error
prone and will be hard to debug in production).
Here's an example line:
```
<!-- LINUX_X86 * [Linux x86_64](https://github.com/llvm/llvm-project/releases/download/llvmorg-vX.Y.Z-1/LLVM-vX.Y.Z-1-Linux-X64.tar.xz) ([signature](https://github.com/llvm/llvm-project/releases/download/llvmorg-vX.Y.Z-1/LLVM-vX.Y.Z-1-Linux-X64.tar.xz.jsonl)) -->
```
[24 lines not shown]
[LoongArch][Driver] Allow `-gsplit-dwarf` and `-mrelax` to be used together
Benefit from https://github.com/llvm/llvm-project/pull/166597 and
https://github.com/llvm/llvm-project/pull/164813, DWARF fission is
now compatible with linker relaxation.
Similar to RISC-V, this commit allows `-gsplit-dwarf` and `-mrelax`
to be used together.
A new test `relax_dwo_ranges.ll` same as RISC-V is also added.
[SEH] Ensure unreachable blocks are placed in EHScopeMembership (#175550)
The tests function has an unreachable block bb.2 leading to an
unreachable infinite loop bb.3. As BlockFolding removes the unreachable
bb.2, bb.3 is left only referencing itself. This block is then not
marked as unreachable and so left out of EHScopeMembership, leading to
an assert that FallThroughEHScope != EHScopeMembership.end(). This patch
makes sure that blocks not otherwise collected are added to
EHScopeMembership in the same way as unreachable blocks.
[lldb] Make sure that the "TypeSystemClang::GetBuiltinTypeByName" method returns the correct value also for "_BitInt(...)" types. (#165857)
When trying to get the `SBType` object corresponding to the
`_BitInt(...)` type name, we have noticed that the
`SBTarget::FindFirstType` metod returns `nil`. This branch proposes:
- some test that demonstrate that the problem exists
- a possible fix
---------
Co-authored-by: Matej Košík <matej.kosik at codasip.com>
Co-authored-by: Michael Buch <michaelbuch12 at gmail.com>
[TwoAddressInstruction] Track MadeChange when eliminating REG_SEQUENCE (#173535)
When `eliminateRegSequence()` is called, the pass modifies the
`MachineFunction` but `MadeChange` was not being set to true.
This causes the pass to incorrectly return `PreservedAnalyses::all()`
even though changes were made.
[clang][bytecode] Diagnose regular CK_LValueBitCast cast nodes (#175721)
We already do this similarly for CXXReinterpretCastExprs, except in that
case we try harder to make things work.
[LifetimeSafety] Merge lifetimebound attribute on implicit 'this' across method redeclarations (#172146)
Followup on https://github.com/llvm/llvm-project/pull/107627
Fixes https://github.com/llvm/llvm-project/issues/62072
Fixes https://github.com/llvm/llvm-project/issues/172013
Fixes https://github.com/llvm/llvm-project/issues/175391
This PR adds support for merging the `lifetimebound` attribute on the implicit `this` parameter when merging method declarations. Previously, if a method was declared with `lifetimebound` on its function type (which represents the implicit `this` parameter), this attribute would not be propagated to the method definition, causing lifetime safety warnings to be missed.
The implementation adds helper functions to extract the `lifetimebound` attribute from a function type and to merge this attribute from an old method declaration to a new one when appropriate.
[lldb][RISCV] Implement trap handler unwind plan (#166531)
This patch introduces special unwind plan for trap handling for RISC-V
and fixes `TestHandleAbort`
[RISCV] Sync Inst{30-27} assignment into RVPWideningBase. NFC (#175705)
2 of the 3 subclases can pass 'f' straight through from their
instantiations. The third case just needs to concatenate 1b1 to widen f
to 4 bits.
[LifetimeSafety] Add support for derived-to-base conversions (#175631)
Add support for derived-to-base conversions in lifetime analysis.
Added handling for `CK_UncheckedDerivedToBase` and `CK_DerivedToBase` cast kinds in the `FactsGenerator::VisitImplicitCastExpr` method. These cast kinds are now treated similarly to other conversions by flowing origins from source to destination.
Added a unit test `DerivedToBaseThisArg` that verifies lifetime information is correctly propagated through derived-to-base conversions when using member functions inherited from a base class.
[VPlan] Allow VPInstruction::PtrAdd as a user of EVL (#175506)
Fixes #175058
Similar to #175028, on RV64 we insert a zext in between most uses of EVL
so most of the VPlanVerifier EVL checks don't fire unless we're
compiling for RV32.
In this case, we're experiencing a crash because we can have a PtrAdd
that uses EVL. This fixes it by adding PtrAdd to the list of allowed
instructions
[clang][bytecode] Fix crash on arrays with excessive size (#175402)
The bytecode interpreter was crashing when seeing arrays with sizes that
exceed Descriptor::MaxArrayElemBytes. The bounds check in
Program::createDescriptor was using std::numeric_limits<unsigned>::max()
instead of the correct limit Descriptor::MaxArrayElemBytes.
This caused the check to pass for sizes that would later fail the
assertion in the Descriptor constructor.
Fixes #175293
[RISCV] Support RISCV BitInt larger than 128 (#175515)
fa57074d146925a303263905af415cc78f58f353 constraint the RISCV BitInt
with 128 bits.
It is due to fp <-> int convension will crash in backend.
(https://godbolt.org/z/9o1qr4rje)
This patch enable larger than 128 bits BitInt type by
`setMaxLargeFPConvertBitWidthSupported`.
[mlir] Consolidate patterns into `RegionBranchOpInterface` patterns (#174094)
Instead of op-specific cleanup patterns for region branch ops to remove
unused results / block arguments, etc., add a set of patterns that can
handle all `RegionBranchOpInterface` ops. These patterns are enabled
only for selected SCF dialect ops at the moment:
* `scf.execute_region`
* `scf.for`
* `scf.if`
* `scf.index_switch`
* `scf.while`
It is currently not possible to register canoncalization patterns for op
interfaces and some ops have incorrect interface implementations. In
follow-up PRs, the set of ops will be gradually extended within the SCF
dialect (`scf.forall`) and across other dialects
(`gpu.warp_execute_on_lane0`, (maybe) various affine dialect ops, ...),
and maybe eventually to apply to all `RegionBranchOpInterface` ops.
[16 lines not shown]
[clang][bytecode] Fix CK_ToVoid casts for Complex values (#175709)
We need to remove the pointer to the local variable we've created
specifically for this complex binary operator.
Fixes https://github.com/llvm/llvm-project/issues/175670