18653 Commits

Author SHA1 Message Date
b29a434970 Fix promotion of SLM pointer for opaque pointers
Now we can have CmpInst as the user of the SLM pointer.
Previously there was always a bitcast in between.
2025-10-29 18:21:38 +01:00
81b480d3d3 Add shader metadata for extra GRFs for latency scheduling
New metadata field to allow setting extra GRFs to be used for latency
scheduling.
2025-10-29 15:03:42 +01:00
7106daa2da Remove redundant overlap check from MergeAllocas
The check is also done in AddNonOverlappingAlloca making in
unncecessary.
2025-10-29 11:46:23 +01:00
61653f9c0a SIMD16 drop in case of PTSS exhaustion fix
Final SIMD16 drop in case of PTSS exhaustion now correctly
reports failure if it didn't help to compile
2025-10-29 11:43:01 +01:00
a42d3f6321 Incorporate shader constants into max reg for thread dispatch calculation
Previously DispatchGRFStartRegister was used as base, but it points at
the start of 'constants+input' section of the payload.
GetTotalURBReadLength() refers only to inputs, so constants were missed
and GetMaxRegForThreadDispatch() didn't have the full picture.
2025-10-29 10:33:23 +01:00
26efb14b3b Fix 2D Block Load for block size less than GRF
When 2D block load reads data that have multiple blocks
and one block, which size is calculated by:
```
block size = block width * block height * elem_size (bytes)
```

is less than device GRF size, hardware need whole GRF
anyway and reads each block into new GRF, zeropadding
rest of it. Later instructions expect this data to be
continously in following GRFs, so data needs to be moved.
2025-10-29 09:31:51 +01:00
9a8bfb5db8 Add header file
Add header file
2025-10-29 04:39:27 +01:00
901057c722 Fix largest input register calculation 2025-10-28 19:19:47 +01:00
92d4567325 Limit lowering of PHI instructions
Lowers loads using PHI instructions to incoming blocks to avoid
uncessary address space casts only in case there are generic pointers to
local or private memory.
2025-10-28 16:49:18 +01:00
8832c8577e GenXStructSplitter byte offset fix for opaque pointers
In opaque pointers mode struct elements can be addressed by byte offset
instead of indices. This case is not supported yet, so simply do not
split such structures.
2025-10-28 15:31:02 +01:00
695fc442a8 Add support for enum type in RTCompileOptionsT
Add support for enum type in RTCompileOptionsT
2025-10-28 15:12:35 +01:00
6057876654 Improve disable inlining pass
Remove always inline attribute from call instructions to prevent
LLVM inliner from inlining them.
2025-10-28 14:47:19 +01:00
e3fc880273 Add GenericNullPtrPropagation Pass
Add new pass which propagates null pointers accross address space casts
and remove no longer needed Generic Pointers Comparision Pattern Match.

This change is needed to fix bug, where sometimes comparison between
generic pointers returns incorrect results.
2025-10-28 14:43:01 +01:00
86f9df15cd Bump Zebin version
Bump zebin version to 1.61
2025-10-28 14:10:48 +01:00
0547781257 Add require_assert_buffer and require_sync_buffer to zeinfo
Add require_assert_buffer and require_sync_buffer to zeinfo
2025-10-28 11:25:40 +01:00
f59fbf1a03 Unify regkey for simd16 drop for XE2 and XE3
Simplify logic by using common key, instead having seperate keys.
2025-10-28 11:15:42 +01:00
326333aec2 Minor refactor
Minor refactor
2025-10-28 10:24:16 +01:00
a575afde7b Fix a crash in EmitVISAPass
Fix a crash where we look for a previous instruction but it's not there, resulting in dyn_casting a nullptr.
2025-10-27 22:02:02 +01:00
5f4fc0e861 Disable build plugin for compilation without tests
.
2025-10-27 19:56:31 +01:00
6230f5290f Remat threshold increase
This change is to allow for bigger early rematerialization to avoid redundant spills.
2025-10-27 16:53:20 +01:00
ef5a973738 Enable more aggresive trimming for very large kernels
Enable trimming of small functions, in case kernel far exceedes
threshold even after default trimming is performed, to keep compilation
time in check.
2025-10-27 16:46:06 +01:00
66e66680f7 Fix problem in split barrier
Fixed the problem in split barrier when we are using with regular barrier.
Case:
splitbarrier.signal()
regularbarrier()
splitbarrier.wait()

was causing the hang due assigning the same ID of the barrier in the regular barrier and split barrier.
Now, the split barrier will take other ID than the regular one.
2025-10-27 12:54:22 +01:00
d7a41cf31b Rewrite TargetExtTy retyper using ValueMapTypeRemapper
This change rewrites the TargetExtTy retyper to use the
ValueMapTypeRemapper infrastructure, significantly improving the overall
design and maintainability of the code. The change also removes unused
cases added for additional safety if earlier retyping logic fails.

Two additional test cases are added, covering more complex retyping
scenarios.
2025-10-27 10:32:46 +01:00
ba8538b4e6 Skip split on spill if variable is not live-in/live-out
Split on spill pass splits live-interval of variables that are
live-in/live-out of a loop and are used inside the loop. Splitting such
a spilled variable reduces RA constraints on the split variable, making
it possible to allocate a register for that variable in the loop.

This split must be done only when the variable is live-in to the loop or
live-out of the loop and is defined in the loop. Latter condition is
because in case a variable is written in the loop, it's also spilled to
home location at loop exit.
2025-10-27 07:19:30 +01:00
1a180031e5 Changes in code. 2025-10-27 05:25:19 +01:00
5d482f7901 Disable badasm VC lit
.
2025-10-24 22:52:09 +02:00
945b3f6733 Sampler opaque ptr readiness
This change is part of the effort to support opaque pointers in next
llvm versions.
2025-10-24 17:09:00 +02:00
ecf98ed502 Refresh build scripts
Removed Ubuntu 20.04 support from build scripts.
Updated `add-apt-repository` section to current versions.
Unified buildSLT.sh to versions in buildIGC.sh.
2025-10-24 15:22:58 +02:00
06dfb54d9b Bump MINOR to 23 2025-10-24 14:51:30 +02:00
9bb52b0625 Revert "Remove usages of legacy SPIR-V Translator macros pt. 4"
Revert Revert "Remove usages of legacy SPIR-V Translator macros pt. 4"
2025-10-24 12:30:28 +02:00
fd46428741 Switch builds to LLVM 16 and update docs
Switch builds to use LLVM 16. Updated the documentation to treat LLVM 16 as default.
Refreshed parts of buildIGC.sh regarding supported versions. Fixed a bug when setting a variable in buildIGC.sh to a default value.

Force enabled exceptions for VC. This is a workaround while we're investigating why they're disabled.
2025-10-24 12:25:56 +02:00
d8e9c579df Revert: Bump MINOR to 23 2025-10-24 11:47:53 +02:00
53a472d310 optimize i64 built-in variables to i32
OpenCL represents built-in variables like `get_global_id` with generic
type `size_t`, which translates to i64. This change adds a new
optimization that simplifies built-in calculation to i32 if built-in's
use has an assumption hinting that value fits in i32 range.
2025-10-24 11:31:59 +02:00
61ac4bc1bd Fix a bug for scheduling for dpas block
The original logic may failed if two macro are build in adjacent
scheduling, the candidate instruction may depends on first block but not
second block. As a result, it cannot be added into second block.
2025-10-24 03:36:42 +02:00
b89fdf0758 Add corner case to HWConformity check
Additional checks for src alignment if dst spans more than 2GRF.
2025-10-23 21:29:58 +02:00
3287945f37 IGA: code cleanup for DpasMacroBuilder (NFC)
Removed unused code.
2025-10-23 18:26:57 +02:00
bf462ba158 Bump MINOR to 23 2025-10-23 16:27:15 +02:00
58e48ef812 Reformat SPV_INTEL_subgroup_matrix_multiply_accumulate enum
Reformat SPV_INTEL_subgroup_matrix_multiply_accumulate enum values
for easier comparison with the spec.
2025-10-23 16:10:01 +02:00
b6199548fd Changes in code. 2025-10-23 15:59:29 +02:00
2e97ce64cd Replace single iteration for loop.
Replace a for loop that only executes once with dereferencing of the
iterator returned by `begin()`.
2025-10-23 14:07:52 +02:00
5689ca664f Update IGC flag documentation.
Update IGC flag documentation.
2025-10-23 12:02:15 +02:00
e11d76fe72 Remove usages of legacy SPIR-V Translator macros pt. 4
Remove usages of legacy SPIRV Translator macros such as `SPIRV_BUILTIN`,
`SPIRV_BUILTIN_NOOP` and `SPIRV_OCL_BUILTIN`.
2025-10-23 11:59:01 +02:00
7308ad7501 handle bitcasted opaque ptrs instead of skipping them in SOALayoutChecker
When the `SOALayoutChecker::visitBitCastInst()` encountered a ptr bitcast
on opaque pointers, we just used to skip it. With this change, we checks users of
the bitcast, like it's done on typed pointers (just without ptr
type checks).

Such bitcasted ptr `%p` would be skipped without properly handling it.
```llvm
%arr = alloca [32 x float], align 4
%p = bitcast ptr %arr to ptr
```

---------------------------
2025-10-23 09:49:10 +02:00
6da778b285 Implement fine control over CloneAddressArithmetic pass
Implement fine control over CloneAddressArithmetic pass
2025-10-23 04:37:14 +02:00
7562ebc444 Enable simd16_dual8 alongside simd16
Enable simd16_dual8 alongside simd16
2025-10-23 04:22:03 +02:00
91aa64c9fd Avoid fencing BTD/TraceRayAsync calls if there are no stores prior to them.
By default, we always insert LSC fence before send.btd / send.rta calls, but it isn't necessary.
2025-10-22 23:33:35 +02:00
28b02a938e [NFC] nit on cmake comment
IST is not IGCStandalone
2025-10-22 21:37:00 +02:00
2daa009f99 [Autobackout][FunctionalRegression]Revert of change: 857fb62d05: Fix problem in split barrier
Fixed the problem in split barrier when we are using with regular barrier.
    Case:
    splitbarrier.signal()
    regularbarrier()
    splitbarrier.wait()

    was causing the hang due assigning the same ID of the barrier in the regular barrier and split barrier.
    Now, the split barrier will take other ID than the regular one.
2025-10-22 18:04:02 +02:00
0120924892 Adding hasVLA attribute
If a function contains dynamic alloca
then ModuleAllocaAnalysis pass adds 'hasVLA' attribute.
2025-10-22 18:00:29 +02:00
a9cd884f4c Emit error for functions exceeding hardware scratch space limits
Emit a compilation error when non-kernel functions exceed the hardware-supported
scratch space limit instead of silently dropping the kernel from the final
binary. This issue was observed on O0 compilation path.
2025-10-22 12:51:28 +02:00