Remove nomenclature clash in statistic pass with one of the stats (#177267)
Attribute TotalInstructionCount is used, but previously the name of the
stat printed out was "Total"+property, which made it look like
TotalTotalInstruction. Num does not provide such clashes in the
nomenclature.
[lld][COFF] Use `.contains` rather than `.count` for set membership. NFC (#177067)
Also converted a couple of `std::set` to
`llvm::StringSet`/`llvm::SmallSet`.
This matches the usage in the other linker backends.
See #176610
[DTLTO][NFC] Minor cleanups and improvements to DTLTO tests (#177282)
This change makes small, non-functional improvements to the DTLTO test
suite, including:
- Tightening+Regularizing FileCheck match expressions across tests
- Simplifying `signal.test` using more lit macro features
[IR] Support constructing `dead_on_return` without an argument (#177272)
After #171712, `dead_on_return` takes an optional argument indicating
the number of bytes known dead. The existing clang callsite uses the
attribute builder interface directly which supports the optional
argument through `DeadOnReturnInfo`. However, users constructing the
Attribute directly (e.g. `rustc`) were using `Attribute::get` which will
now default to providing a 0 value to the optional argument.
Add the additional method `Attribute::getWithDeadOnReturnInfo` to allow
users which produce explicit `Attribute` values to continue to indicate
`dead_on_return` without an argument.
[M68k] Fix MOVEM collapse pass for 2 instances of same register (#174349)
Add test case for MOVEM collapse opt pass failure and fix pass handling
of 2 appearances of the same register in a MOVEM block.
[Sanitizers] Remove unused variable (#177061)
Must've remained from debugging the test case.
rdar://119958411
Co-authored-by: Mariusz Borsa <m_borsa at apple.com>
[TableGen] Prefer base class on tied RC sizes
When searching for a matching subclass tablegen behavior is non
deterministic if we have several classes with the same size.
Break the tie by chooisng a class with smaller BaseClassOrder.
[clang][test] Specify value of `-fopenmp=libomp` for tests. (#177239)
`libomp` is the default value when unconfigured in cmake, but llvm can
be configured to have `libgomp` be the default instead. Explicitly
specify this value so the test does not fail when it assumes libomp is
always the default.
Fix for f369d23ceaa49ffa9e6ef9673851749d66b35b3f (#150580)
[LifetimeSafety] Remove "experimental-" prefix from flags and diagnostics (#176821)
Remove the "experimental-" prefix from lifetime safety diagnostic groups
and command-line options. This enables the analysis in `-Wall`.
We are now in a pretty stable state with no crashes. This change
indicates that lifetime safety analysis is no longer considered
experimental and is now a stable feature. By removing the
"experimental-" prefix, we're signaling to users that this functionality
is ready for use.
- Renamed diagnostic groups from `experimental-lifetime-safety*` to
`lifetime-safety*`
- Updated command-line options from `-fexperimental-lifetime-safety*` to
`-flifetime-safety*` and this is now ON by default.
- Added a check to only enable lifetime safety analysis when relevant
diagnostics are enabled
- Updated test files to use the new flag names
[CIR][X86] Add support for shuff32x4/shufi32x4 builtins (#172960)
This implementation is adapted from the existing code for
`X86::BI__builtin_ia32_shuf_i*` and `X86::BI__builtin_ia32_shuf_f*` from
`/llvm-project/clang/lib/CodeGen/TargetBuiltins/X86.cpp`.
It adds support for the following X86 builtins:
- __builtin_ia32_shuf_f32x4
- __builtin_ia32_shuf_f64x2
- __builtin_ia32_shuf_i32x4
- __builtin_ia32_shuf_i64x2
- __builtin_ia32_shuf_f32x4_256
- __builtin_ia32_shuf_f64x2_256
- __builtin_ia32_shuf_i32x4_256
- __builtin_ia32_shuf_i64x2_256
Part of https://github.com/llvm/llvm-project/issues/167765
[TableGen] Prefer base class on tied RC sizes
When searching for a matching subclass tablegen behavior is non
deterministic if we have several classes with the same size.
Break the tie by chooisng a class with smaller BaseClassOrder.
[clang] Fix lifetime extension of temporaries in for-range-initializers in templates (#177191)
Fixes https://github.com/llvm/llvm-project/issues/165182.
This patch fix the lifetime extension of temporaries in
for-range-initializers in templates. Whether this issue was occurred
when the for-range statement in a dependent context, but itself is not
type/value dependent.
---------
Signed-off-by: Wang, Yihan <yronglin777 at gmail.com>
[NFCI][AMDGPU] Convert more `SubtargetFeatures` to use `AMDGPUSubtargetFeature` and X-macros (#177256)
Extend the X-macro pattern to eliminate boilerplate for additional
subtarget features.
This reduces ~50 lines of repetitive member declarations and getter
definitions.
Revert "[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)"
This reverts commit 5c29b64fda6a5a66e09378eec9f28a42066a7c6a.
This was causing failures at HEAD on x86-64 Linux.
[msan] Handle aarch64_neon_vcvt* (#177243)
This fills in missing gaps in MSan's AArch64 NEON vector conversion
intrinsic handling (intrinsics named aarch64_neon_vcvt* instead of
aarch64_neon_fcvt*). SVE support sold separately.
It also generalizes handleNEONVectorConvertIntrinsic to handle
conversions to/from fixed-point.
[CGObjC] Allow clang.arc.attachedcall on -O0 (#164875)
It is supported in GlobalISel there. On X86, we always kick to
SelectionDAG anyway, so there is no point in not doing it for X86 too.
I do not have merge permissions.
[VPlan] Support VPWidenPointerInduction in getSCEVExprForVPValue (NFCI)
Support VPWidenPointerInductionRecipe in getSCEVExprForVPValue.
This is used in code paths when computing SCEV expressions in the
VPlan-based cost model, which should produce costs matching the legacy
cost model.