[AArch64] Form CCMP for CBB and CBH
AArch64ConditionalCompares forms CMP/CCMP chains to transform patterns
such as
Head Head
/ | CmpBB
/ | / |
| CmpBB => / |
| / | Tail |
| / | | |
Tail | | |
| | | |
... ... ... ...
where Head is terminated by a conditional branch and CmpBB contains
a cmp + conditional branch.
We usually try to split any fused conditional branches to be able to
[8 lines not shown]
[RISCV][GlobalISel] Add G_CLMULH support (#221686)
Add G_CLMULH to represent the high half of a carry-less multiplication
in generic Machine IR.
Translate llvm.riscv.clmulh to G_CLMULH and mark it legal for native
XLEN scalar types when Zbkc is available. Reuse the existing
SelectionDAG pattern to select the RISC-V CLMULH instruction.
[AMDGPU][lld] Remove "using namespace llvm" from AMDGPU.cpp (#222818)
AMDGPU class in anonymous namespace collides with llvm::AMDGPU, causing
an error with MSVC.
[CIR][AMDGPU] Add support for AMDGCN global/DS load builtins (#220611)
Adds codegen support for AMDGCN global and DS load/read builtins with
transpose variants. These builtins are lowered to their corresponding
`llvm.amdgcn.*` intrinsics.
[SSAF][PointerFlow] Factor out and make the pointer-flow matching reusable
The PointerFlowExtractor matches AST nodes representing pointer-flows
and converts them to entity-based data structures directly. This
commit divides this procedure into two steps: 1) match and represent
AST nodes as PointerFlowPairs; 2) convert PointerFlowPairs to
entity-based edges. Therefore, other SSAF tools may use
PointerFlowPairs.
The refactoring also improves coverage: it separates pointer-type
checking from structural matching, so structural matching alone now
discovers cases that were previously missed due to overly aggressive
type checking (e.g. a record-typed call argument or return value
initialized with a braced-init-list).
Along the way, this also fixes a bug for unnamed bit-fields.
First patch for
rdar://187125348
[SSAF][PointerFlow] Drop unused TUSummaryExtractor param from translateDeclPointerLevel
TUSummaryExtractor is only needed to mint EntityIds when building an
EntityPointerLevel; translateDeclPointerLevel just walks the Expr and
returns raw DeclPointerLevels, so it never touched Extractor.
This is the second patch the radar below depends on:
rdar://187125348
[Mips] Fix buildbot failure of MIPS I double store using SWC1 (#221912)
Expand ExtractElementF64_FPR to FMOV_S instead of MFC1 to avoid
incorrect integer store.
Fix x86_64-expensive-checks compile error as for pr
https://github.com/llvm/llvm-project/pull/209362.
Fix #62190.
[mlir][AMDGPU] Split the dialect declaration (NFC)
Introduce a self-contained dialect declaration so RegisterAllDialects does not
need the generated AMDGPU operation umbrella.
Across five controlled rebuilds of the affected TU, median instructions fell
from 71.757B to 70.331B (-1.987%) and median wall time fell from 11.01s to
10.77s (-2.180%).
Assisted-by: Codex
[mlir][Func] Split the dialect declaration (NFC)
Introduce a self-contained dialect declaration and use it in ten configured
consumers that do not need the generated operation umbrella.
Across three controlled -j16 rebuilds of the affected TUs, median instructions
fell from 224.883B to 220.787B (-1.821%) and median wall time fell from 8.44s
to 8.31s (-1.540%).
Assisted-by: Codex
[mlir][Bufferization] Split the dialect declaration (NFC)
Introduce a self-contained dialect declaration and use it in four consumers
that do not need the generated operation umbrella.
Across three controlled serial rebuilds of the affected TUs, median
instructions fell from 97.470B to 94.887B (-2.650%) and median wall time fell
from 15.20s to 14.70s (-3.289%). Three -j16 runs confirmed a 2.623% reduction
in instructions, with wall time improving 0.722% on the parallel critical path.
Assisted-by: Codex
[LoongArch] Generate more PCRel relocations for resolvable sub-symbols
Use PC-relative relocations when the sub-symbol offset can be resolved
during assembly, avoiding ADD/SUB relocation pairs.
Fixes #210052
Reviewers: SixWeining, MaskRay
Reviewed By: MaskRay
Pull Request: https://github.com/llvm/llvm-project/pull/211754
[flang] Fold fir.convert of an integer constant between integer types (#222188)
`fir::ConvertOp::fold` doesn't handle an integer constant converted to
another integer type. `ForwardConstantConvertPattern` covers the
neighboring case where the result is `index`, so `fir.convert %c10_i32 :
(i32) -> index` already canonicalizes to an index constant while
`fir.convert %c1_i32 : (i32) -> i64` does not. This PR adds the
integer-to-integer case.
The width change follows the rules codegen applies to a non-constant
operand (`CodeGen.cpp`'s integer-to-integer conversion): narrowing
truncates, widening zero-extends an i1 or unsigned source and
sign-extends anything else. The result must be signless because the
constant materialises as an `arith.constant`, which only accepts
signless integers.
It composes with `arith::IndexCastOp::fold`, so a value widened then
cast to `index` collapses to one index constant, and it lets other
patterns see through the constant: with a literal shift,
[5 lines not shown]
[Offloading] Add support for compressed OffloadBinary types
Summary:
Offload binaries are used to store many heterogenous architectures into
a singel offloading blob. These lists can get very large so this PR adds
the option to compress them with the LLVM provided compression
libraries.
The implementation is quite simple, we simply compress all the buffers
after the header into a single compressed blob, then re-construct the
header. Extracting is the reverse.
The biggest change is that the offload binary now **owns** the memory,
whereas before we simply took a reference to it. This is necessary
because the decompression must create new memory compared to what the
user provided. This adds an extra copy internally, but it also
simplifies the V2 additions.
This does not wire up any clang/HIP support, just providing the
functionality.
[LLVM] Add zstd compressed frame magic to LLVM magic
Summary:
ZSTD uses magic to indentify compressed frames in the bitstream. Add
this as a recognized file magic type so that we can identify compressed
streams that LLVM creates.
[AMDGPU][lld] Remove "using namespace llvm" from AMDGPU.cpp
AMDGPU class in anonymous namespace collides with llvm::AMDGPU,
causing an error with MSVC.
[ld64.lld, llvm-otool] Minimal arm64e.x1 support (#222721)
Just enough for `llvm-otool -hv` to dump the cpusubtype, and for
ld64.lld to not reject .tbd files that have an arm64e.x1 slice.
This is needed to link mac binaries against the macOS 27 SDK.
[lldb][Darwin] Don't mark threads as having hit bp if not (#222488)
When a multithreaded program stops exeuction with a mach exception on
more than one thread, if one of the threads is *at* a breakpoint site,
but hasn't *hit* the breakpoint yet, lldb was incorrectly stepping over
the breakpoint instruction when it resumed execution. This would result
in TestConcurrentManyBreakpoints reporting that a breakpoint hit on 100
threads was only hit 99 times, because one of the breakpoints was
silently stepped past without being counted.
The bug happened because on Darwin/debugserver systems the stop info
packet includes a `jstopinfo` which is a JSON dictionary of all threads
that have an exception. When `jstopinfo` is present, ProcessGDBRemote
was initializing any thread not included in `jstopinfo` as having an
empty StopInfo. It did this without checking if we are _at_ a breakpoint
site, and marking the thread as "Stopped at unexecuted breakpoint
instruction". Because the threads now had an empty StopInfo already, the
other places where we might check "if stopped at unexecuted breakpoint
instruction" were never executed.
[10 lines not shown]