[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
[LLD][MachO][NFC] Rename Reloc to Relocation (#175586)
Due to heavy use of using namespace llvm, Reloc is often ambiguous with
llvm::Reloc, the relocation model. Previously, this was sometimes
disambiguated with macho::Reloc. This ambiguity is even more problematic
when using pre-compiled headers, where it's no longer "obvious" whether
it should be Reloc or macho::Reloc.
Therefore, rename Reloc to Relocation. This is also consistent with
lld/ELF, where the type is also named Relocation.
[CSSPGO][NFC] Remove unused code in finalizeWeightPropagation() (#175521)
Remove unused code since the usage of `EntryWeight` was dropped in
[D134756](https://reviews.llvm.org/D134756).
[clang-doc] Fix misnamed, mismatched, or incorrect tags (#175112)
This is mostly a chore patch that fixes misnamed, mismatched,
or non-existant tags. That includes renaming the function tags in the
class template to `Has*Methods` instead of `Has*Functions`. The "method"
style was already preferred in the template HTML.
Some extraneous tags were removed from the enum template. All templates
should use
`Description` for rendering comments, but it was still using an old tag
name. Also, the JSON generator currently doesn't serialize individual
enum value comments, so that tag was removed. Same for public members.
`Description` is removed for friends due to the way Mustache handles
missing
tags. If `Description` isn't present, it will use the parent's
description which is undesirable.
[RISCV] Merge the 'f' and 'r' field argument of the RVPPairBase class. (#175694)
I don't think the spec ever calls this field 'r' for any of the
instructions that use this class. The bit is either a constant 0/1 or
part of 'f'. Make it a 4-bit 'f' and make the derived classes
concatenate the 0/1 when they need to widen from 3 bits to 4.
[LoongArch] Enable tail calls for sret and byval functions (#168506)
Allow tail calls for functions returning via sret when the caller's sret
pointer can be reused. Also support tail calls for byval arguments.
The previous restriction requiring exact match of caller and callee
arguments is relaxed: tail calls are allowed as long as the callee does
not use more stack space than the caller.
Fixes #168152
[RISCV] Add isCommutable=1 to some binary P extension instructions. (#175692)
This allows MachineCSE to commute these instructions if it would allow
CSE.