[BPF] Use ".L" local prefix label for basic blocks (#95103)
Previously, PrivateLabelPrefix was default-initialized to "L", so basic
block labels were added to the symbol table. This seems like an
oversight, so use ".L" for all private labels.
[CIR] Fix reference alignment to use pointee type
getNaturalTypeAlignment on a reference type returned pointer alignment
instead of pointee alignment. Pass the pointee type with
forPointeeType=true to match traditional codegen's
getNaturalPointeeTypeAlignment behavior. Fix applies to both argument
and return type attribute construction paths.
Revert "[CI] Try lowering max parallel link jobs on Windows (#185255)"
This reverts commit af22b50fac2311ff3f859e4e8bdec552c7aa8d5a.
This seems to have had no noticeable effect on the frequency of failures
so likely was not the issue.
[X86] combineConcatVectorOps - concat(vtruncs(x),vtruncs(y)) -> packss(shuffle(x,y),shuffle(x,y)) (#186678)
Although at worst this isn't a reduction in instruction count, the shuffle/packss sequence is much easier for further folds / shuffle combining
[CodeGenPrepare][NFC] Get BPI/BFI from pass/analysis manager (#186651)
BranchProbabilityInfo will compute it's own dominator tree and
post-dominator tree if none is specified; avoid this by using the
analysis manager/pass manager to get the analysis, which will reuse the
previously computed DomTree.
[CFG][InstCombine][NFC] Use block numbers when finding backedges (#186668)
The functions traverse all basic blocks, so SmallPtrSets use a single
vector indexed by block number.
[SimplifyCFG][NFC] Renumber blocks when changing func (#186666)
Keep numbering dense when changing the function. SimplifyCFG is a good
candidate, because it is likely to remove blocks and preserves few
analyses.
[Transforms/Utils][NFC] Replace SmallPtrSet with vector (#186664)
Typically most blocks in a function are reachable, so use a vector
indexed by block number instead of a SmallPtrSet.
[CodeGen] Fix multiple connected component issue in rematerializer
This fixes a rematerializer issue wherein re-creating the interval of a
non-rematerializable super-register defined over multiple MIs, some of
which defining entirely dead subregisters, could cause a crash when
changing the order of sub-definitions (for example during scheduling)
because the re-created interval could end up with multiple connected
components, which is illegal. The solution is to split separate
components of the interval in such cases. The added unit test crashes
without that added behavior.
Support float8_e3m4 and float8_e4m3 in np_to_memref (#186453)
This patch adds support for `float8_e3m4` and `float8_e4m3` in
`np_to_memref.py` by adding the appropriate ctypes structures
[CIR] Fix reference alignment to use pointee type
getNaturalTypeAlignment on a reference type returned pointer alignment
instead of pointee alignment. Pass the pointee type with
forPointeeType=true to match traditional codegen's
getNaturalPointeeTypeAlignment behavior. Fix applies to both argument
and return type attribute construction paths.
[clang-tidy] Adds do-while support to performance-inefficient-string-concatenation (#186607)
Closes #186362
---------
Co-authored-by: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
[CIR] Split BinOpOverflowOp into separate overflow-checked ops
Replace the monolithic cir.binop.overflow operation and its
BinOpOverflowKind enum with three individual operations:
cir.add.overflow, cir.sub.overflow, and cir.mul.overflow.
This follows the same pattern used when BinOp and UnaryOp were
previously split into per-operation ops (cir.add, cir.sub, etc.),
eliminating enum dispatch and enabling per-op traits like Commutative.
[clang-format] Add option AllowShortRecordOnASingleLine (#154580)
This patch supersedes PR #151970 by adding the option
``AllowShortRecordOnASingleLine`` that allows the following formatting:
```c++
struct foo {};
struct bar { int i; };
struct baz
{
int i;
int j;
int k;
};
```
---------
Co-authored-by: owenca <owenpiano at gmail.com>
[CIR] Split BinOpOverflowOp into separate overflow-checked ops
Replace the monolithic cir.binop.overflow operation and its
BinOpOverflowKind enum with three individual operations:
cir.add.overflow, cir.sub.overflow, and cir.mul.overflow.
This follows the same pattern used when BinOp and UnaryOp were
previously split into per-operation ops (cir.add, cir.sub, etc.),
eliminating enum dispatch and enabling per-op traits like Commutative.
[Analysis][NFC] Move BranchProbabilityInfo constr to cpp (#186648)
The implementation details of the analysis are irrelevant for users,
therefore move these to the .cpp file.
[clang][bytecode] Remove unused members from `EvalEmitter` (#186601)
Remove the DenseMap handling lambda paramter mappings from
`EvalEmitter`. This was always unused. Remove it and use `if constexpr`
to keep things compiling.
[clang-format] Upgrade ShortFunctionStyle to a struct (#134337)
The current clang-format configuration
option AllowShortFunctionsOnASingleLine uses a single enum
(ShortFunctionStyle) to control when short function definitions can be
merged onto a single line. This enum provides predefined combinations of
conditions
(e.g., None, Empty only, Inline only, Inline including Empty, All).
This approach has limitations:
1. **Lack of Granularity:** Users cannot specify arbitrary combinations
of conditions. For example, a user might want to allow merging
for both empty functions and short top-level functions, but not for
short functions defined within classes. This is not possible with the
current enum options except by choosing All, which might merge more than
desired.
2. **Inflexibility:** Adding new conditions for merging (e.g.,
[15 lines not shown]