Centralize prefetch target storage in MachineFunction. (#184194)
### Prefetch Symbol Resolution
Based on this
[suggestion](https://discourse.llvm.org/t/rfc-code-prefetch-insertion/88668/29?u=rlavaee),
we must identify if a prefetch target is defined in the current module
to avoid **undefined symbol errors**. Since this occurs during
sequential **CodeGen**, we must rely on function names rather than IR
Module APIs.
**Key Changes:**
* **`MachineFunction` Integration:** Added a `PrefetchTargets` field
(with serialization) to track all targets associated with a function.
* **Guaranteed Emission:** All prefetch targets are now emitted
regardless of basic block or callsite index matches to ensure the symbol
exists.
* **Fallback Placement:** Targets with non-matching callsite indices are
emitted at the end of the block to resolve the reference.
[AMDGPU] Cgscc amdgpu attributor boilerplate NFC (#179719)
This PR is adding a boilerplate of CGSCC AMDGPUAttributor pass
(amdgpu-attributor-cgscc) by doing refactoring from the existing Module
AMDGPUAttributor pass (amdgpu-attributor).
CGSCC AMDGPUAttributor pass sets `AttributorConfig.IsModulePass =
false`, and make Attributor's `Functions` set contain only functions in
a SCC.
The main implementations of abstract attributes have not changed - NFC.
Subsequently, in future work some of the AMDGPU abstract attributors
might move to be handled by CGSCC pass.
---------
Co-authored-by: Matt Arsenault <arsenm2 at gmail.com>
[flang][cuda] Relax host intrinsic semantic check in acc routine (#185483)
Semantic check that checks if any actual argument is on the device
doesn't need to be active in acc routine function/subroutine.
mail/courier-imap: Clean up a and modernize Makefile
- Use bsd.port.options.mk instead of pre/post mk
- Apply portlint and portclippy suggestions
PR: 293399
[CIR] Change CmpOp assembly format to use bare keyword style (#185114)
Update the assembly format of cir.cmp from the parenthesized style
`cir.cmp(gt, %a, %b) : !s32i, !cir.bool`
to the bare keyword style used by other CIR ops like cir.cast:
`cir.cmp gt %a, %b : !s32i`
The result type (!cir.bool) is now automatically inferred as it is
always cir::BoolType.
[AArch64] Add partial reduce patterns for new fdot instructions (#184659)
This patch enables generation of new dot instruction added in under
FEAT_F16F32DOT from partial reduce nodes.
[HLSL] Implement Texture2D default template (#184207)
The Texture2D type has a default template of float4. This can be written
in a couple way: `Texture2D<>` or `Texture2D`. This must be implemented
for consistenty with DXC in HLSL202x.
To implement `Texture2D<>` we simply add a default type for the template
parameter.
To implement `Texture2D`, we have to add a special case for a template
type without a template instantiation. For HLSL, we check if it is a
texture type. If so, the default type is filled in.
Note that HLSL202x does not support C++17 Class Template Argument
Deduction, so we cannot use that feature to give us `Texture2D`.
See https://github.com/llvm/wg-hlsl/pull/386 for alternatives that were
considered.
[13 lines not shown]
[clang][ssaf] Implement Entity Linker CLI and patching for JSON Format
This PR implements Entity ID patching for the JSON serialization format
and introduces `ssaf-linker`, a command-line tool that drives the
`EntityLinker`.
1. Entity ID references inside summary blobs use the sentinel
representation `{"@": <uint64>}`. Patching walks the JSON value tree
recursively, recognizes sentinels, and rewrites their indices using the
`EntityResolutionTable` provided by the linker.
2. An object with an `@` key but extra keys `(size != 1)`, an `@` value
that is not a valid `uint64`, and an entity ID not present in the
resolution table, lead to patching errors.
3. `JSONFormat::EntityIdConverter` is replaced with two `function_ref`
typedefs to eliminate the wrapper class.
4.`ssaf-linker` is implemented in `clang/tools/ssaf-linker/` and gets
built at `bin/ssaf-linker`.
5. lit tests check CLI, verbose output, timing output, validation
errors, I/O errors, linking errors, and successful linking.
rdar://162570931