[flang][driver] Improve diagnostic for assembly inputs
When an assembly file is passed to the Flang driver, it currently fails
with a confusing internal error mentioning the unsupported `-cc1as`
tool.
This update detects assembly inputs early in the driver and emits a
clear, user-facing diagnostic explaining that Flang does not support
assembly files as input. The logic is implemented in a small helper
function and is intentionally temporary, so it can be removed once Flang
gains support for assembling inputs.
Fixes: #173528
[lldb-dap] Allow evaluate requests without a frame context (#179667)
EvaluateRequests handler now uses the target's context if no valid
frameId is provided, enabling evaluation of
global variables without requiring a valid stack frame.
In repl mode it now uses the last `successful` variable or command
expression, if the provided user's expression is empty.
Try to evaluate the expression if the evaluation context is `Unknown`
[LifetimeSafety] Revisit tracking moved objects (#178670)
Improve lifetime safety analysis by tracking moved objects and providing
more precise warnings for potentially false positive cases.
- Added support for detecting moves in function calls with rvalue
reference parameters
- Added a new `MovedOriginFact` to track when objects are moved
- Modified the lifetime checker to detect when a loan's storage has been
moved
- Added new diagnostic messages that indicate when a warning might be a
false positive due to moved storage
- Added notes in diagnostics to show where objects were potentially
moved
[LV] Optimize FindLast recurrences to FindIV (NFCI). (#177870)
This patch restructures Find(First|Last)IV handling. Instead of
differentiating between FindLast, FindFirstIV and FindLastIV up front,
this patch simplifies the logic in IVDescriptor to just identify the
FindLast pattern up-front.
It then adds a new VPlan transformation to optimize FindLast reductions
to FindIV reductions if there is a suitable sentinel value.
Find(Last|First)IV recurrence kinds to a single FindIV kind.
This is simpler and more accurate, given selecting the first/last
induction of the final IV reduction is directly controlled by the
corresponding recurrence kind of the ComputeReductionResult.
The new structure also allows further optimizations, like vectorizing
FindLastIV with another boolean reduction that tracks if the condition
in the loop was ever true, if there is no suitable sentinel value.
PR: https://github.com/llvm/llvm-project/pull/177870
[CIR] Add TargetLowering pass (#179245)
This patch adds a new TargetLowering pass to the CIR pipeline. The new
pass is run immediately before CXXABILowering. This new pass does not
perform any heavy transformations yet -- for now it only converts sync
scopes attached to load and store operations according to the target
info, which was done in the LLVM lowering pass.
Related to #175968 .
[lldb-dap] Fix flaky TestDAP_stopped_events.py (#179689)
We are waiting for both stopped event at once.
We may not get both events within the (0.25 seconds) time interval to
fetch more events. Retry with the `DEFAULT TIMEOUT` if we got one of the
event.
Increase the `EVENT_QUIET_PERIOD`'s value for ASAN mode
Fixes #179648
[SPIRV] Add a `SPIRVTypeInst` type with some guardrails
Currently `SPIRVType` is an alias of `MachineInstr`:
```cpp
using SPIRVType = const MachineInstr;
```
Consider the function below from the backend:
```cpp
inline Register getTypeReg(MachineRegisterInfo *MRI, Register OpReg) {
SPIRVType *TypeInst = MRI->getVRegDef(OpReg);
return TypeInst && TypeInst->getOpcode() ==
SPIRV::OpFunctionParameter
? TypeInst->getOperand(1).getReg()
: OpReg;
}
```
[10 lines not shown]
IR: Promote "denormal-fp-math" to a first class attribute (#174293)
Convert "denormal-fp-math" and "denormal-fp-math-f32" into a first
class denormal_fpenv attribute. Previously the query for the effective
denormal mode involved two string attribute queries with parsing. I'm
introducing more uses of this, so it makes sense to convert this
to a more efficient encoding. The old representation was also awkward
since it was split across two separate attributes. The new encoding
just stores the default and float modes as bitfields, largely avoiding
the need to consider if the other mode is set.
The syntax in the common cases looks like this:
`denormal_fpenv(preservesign,preservesign)`
`denormal_fpenv(float: preservesign,preservesign)`
`denormal_fpenv(dynamic,dynamic float: preservesign,preservesign)`
I wasn't sure about reusing the float type name instead of adding a
new keyword. It's parsed as a type but only accepts float. I'm also
debating switching the name to subnormal to match the current
[17 lines not shown]
[NFC][LowerMemIntrinsics] Use TypeSize consistently for type sizes
PR #169040 already started using `TypeSize` for the return value of
`DataLayout::getType*Size` in the memset lowering, this PR adjusts other uses
in LowerMemIntrinsics to do the same. Currently, scalable vector types are not
supported as access types for the mem-intrinsic lowering.
[LLVM][CodeGen][DirectX] Fix scalarisation when vector ConstantFP is used. (#172684)
When using -use-constant-fp-for-fixed-length-splat `splat (float C)`
becomes ConstantFP(C) rather than ConstantVector(C, C, C...).
[SystemZ][z/OS] Support both EBCDIC & ASCII form of type_info::name() (#179687)
On z/OS, typename is stored as 2 encodings: EBCDIC (default system
encoding) followed by ASCII.