1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
|
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2024 Intel Corporation
SPDX-License-Identifier: MIT
============================= end_copyright_notice ===========================*/
// This is a target description file for the Intel Gen architecture, referred
// to here as the "GenX" architecture.
//
//===----------------------------------------------------------------------===//
// Get the target-independent interfaces which we are implementing...
//
include "llvm/Target/Target.td"
//===----------------------------------------------------------------------===//
// GenX Subtarget state - these are typically inferred from the Proc
//===----------------------------------------------------------------------===//
def FeatureLongLong : SubtargetFeature<"longlong", "HasLongLong", "true",
"supports long long">;
def FeatureFP64: SubtargetFeature<"fp64", "HasFP64", "true",
"support for double types">;
def FeatureIEEEDivSqrt : SubtargetFeature<"ieee_div_sqrt",
"HasIEEEDivSqrt",
"true",
"supports IEEE-754 div and sqrt">;
def FeatureFDivFSqrt64Emulation :
SubtargetFeature<"fp64_fdiv_fsqrt_emu", "FDivFSqrt64Emu", "true",
"emulate double precision division and square root",
[FeatureFP64]>;
def FeatureGRFByteSize64 : SubtargetFeature<"grf_byte_size_64",
"GRFByteSize",
"64",
"Every GRF byte size is 64">;
def FeatureLSCMaxWidth32 : SubtargetFeature<"lsc_max_width_32",
"LSCMaxWidth",
"32",
"LSC messages have a maximum width of 32">;
def FeaturePartialI64Emulation : SubtargetFeature<"lightweight_i64_emulation",
"PartialI64Emulation",
"true",
"emulate subset of 64-bit operations">;
def FeatureNoLegacyDataport : SubtargetFeature<"no_legacy_dataport",
"NoLegacyDataport",
"true",
"true if platform has no legacy dataport">;
def FeatureUseMulDDQ : SubtargetFeature<"mul_ddq",
"UseMulDDQ",
"true",
"use native support for mul [U]Dx[U]D->Q">;
def FeatureLongLongEmulation : SubtargetFeature<"emulate_i64",
"EmulateLongLong",
"true",
"emulate 64-bit operations">;
def FeatureNoJmpi : SubtargetFeature<"disable_jmpi", "DisableJmpi",
"true", "disable jmpi">;
def FeatureVectorDecomp : SubtargetFeature<"disable_vec_decomp",
"DisableVectorDecomposition",
"true",
"disable vector decomposition pass">;
def FeatureNoJumpTables : SubtargetFeature<"disable_jump_tables", "DisableJumpTables",
"true", "disable switch to jump tables lowering">;
def FeatureSwitchjmp : SubtargetFeature<"switchjmp", "HasSwitchjmp", "true",
"supports switchjmp visa instruction">;
def FeaturePreemption : SubtargetFeature<"preemption", "HasPreemption", "true",
"supports preemption">;
def FeatureSystolicDenormControl : SubtargetFeature<
"systolic_denorm_control", "HasSystolicDenormControl", "true",
"supports control for systolic pipeline types denormal values">;
def FeatureWAFusedEUNoMask : SubtargetFeature<
"wa_nomask_fusedEU", "WaNoMaskFusedEU", "true",
"needs workaround for nomask operations under divergent control-flow">;
def FeatureFusedEU : SubtargetFeature<"fusedEU", "HasFusedEU", "true", "has fused EUs">;
def FeatureIntDivRem32: SubtargetFeature<"divrem32",
"HasIntDivRem32",
"true",
"supports 32-bit integer division">;
def FeatureInstrAdd64: SubtargetFeature<"add64",
"HasAdd64",
"true",
"enable support for native add64 instruction">;
def FeatureInstrBitRotate: SubtargetFeature<"bitrotate",
"HasBitRotate",
"true",
"support of rol/ror instructions">;
def FeatureInstr64BitRotate: SubtargetFeature<"bitrotate64",
"Has64BitRotate",
"true",
"support of 64-bit rol/ror instructions">;
def FeatureInstrLocalIntegerCas64: SubtargetFeature<"localintegercas64",
"HasLocalIntegerCas64",
"true",
"support of local 64-bit integer compare exchange instruction">;
def FeatureInstrGlobalAtomicAddF64: SubtargetFeature<"globaldoubleaddsub",
"HasGlobalAtomicAddF64",
"true",
"support of global double precision atomic add/sub instructions">;
def FeatureHWTIDFromPredef: SubtargetFeature<"hwtidfrompredef",
"GetsHWTIDFromPredef",
"true",
"hwtid is obtained from predefined variable">;
def FeatureHasL1ReadOnlyCache: SubtargetFeature<"has_l1_read_only_cache",
"HasL1ReadOnlyCache",
"true",
"Has L1 read-only cache">;
def FeatureSupressLocalMemFence: SubtargetFeature<"supress_local_mem_fence",
"HasLocalMemFenceSupress",
"true",
"Supresses local memory fence">;
def FeatureHasPackedFloat : SubtargetFeature<"has_packed_float",
"HasPackedFloat",
"true",
"true if packed float immediate vector operands are supported">;
def FeatureMultiTile: SubtargetFeature<"multi_tile",
"HasMultiTile",
"true",
"Multi-tile">;
def FeatureL3CacheCoherentCrossTiles: SubtargetFeature<"l3_cache_coherent_cross_tiles",
"HasL3CacheCoherentCrossTiles",
"true",
"Has L3 cache coherent cross tiles">;
def FeatureL3FlushOnGPUScopeInvalidate: SubtargetFeature<"l3_flush_on_gpu_scope_invalidate",
"HasL3FlushOnGPUScopeInvalidate",
"true",
"Has L3 flush on GPU scope invalidate">;
// Targets that use compute walker command require loading of thread
// payload by compiler.
def FeatureThreadPayloadInMemory : SubtargetFeature<"thread_payload_in_memory",
"HasThreadPayloadInMemory",
"true",
"need to load thread payload from memory">;
def FeatureHasLSC : SubtargetFeature<"feature_has_lsc",
"HasLSCMessages", "true",
"Target supports LSC messages">;
def FeatureHasLSCTyped : SubtargetFeature<"feature_has_lsc_typed",
"HasLSCTypedMessages", "true",
"Target supports typed LSC messages",
[FeatureHasLSC]>;
def FeatureHasLSCOffset : SubtargetFeature<"feature_has_lsc_offset",
"HasLSCOffset", "true",
"Target supports constant offset for LSC messages",
[FeatureHasLSC]>;
def FeatureTransLegacy : SubtargetFeature<"translate_legacy_message",
"TranslateLegacyMessages",
"true",
"translate legacy message to LSC",
[FeatureHasLSC]>;
def FeatureHasSampler : SubtargetFeature<"feature_has_sampler",
"HasSampler", "true",
"Target supports sampler messages">;
def FeatureHasAdd3 : SubtargetFeature<"feature_has_add3",
"HasAdd3", "true",
"Target supports 3-way addition">;
def FeatureHasBfn : SubtargetFeature<"feature_has_bfn",
"HasBfn", "true",
"Target supports 3-way boolean function">;
def FeatureHasHalfSIMDLSC : SubtargetFeature<"feature_has_half_simd_lsc",
"HasHalfSIMDLSC",
"true",
"Target supports half simd lsc">;
def WarnCallable : SubtargetFeature<"warn_callable", "WarnCallable",
"true", "warn instead of error on callable violation">;
def OCLRuntime : SubtargetFeature<"ocl_runtime", "OCLRuntime", "true",
"Prepare structures for OCL runtime">;
def FeatureMultiIndirectByteRegioning : SubtargetFeature<"multi_indirect_byte_regioning",
"HasMultiIndirectByteRegioning",
"true",
"Vx1 and VxH indirect addressing for Byte datatypes">;
def FeatureWaNoA32ByteScatter : SubtargetFeature<"wa_no_a32_byte_scatter_stateless",
"HasWaNoA32ByteScatter", "true",
"Target doesn't support A32 byte scatter stateless message">;
def FeatureIndirectGRFCrossing : SubtargetFeature<"indirect_grf_crossing",
"HasIndirectGRFCrossing", "true",
"Target supports an indirect region crossing one GRF boundary">;
def FeatureIndirectByteGRFCrossing : SubtargetFeature<"indirect_byte_grf_crossing",
"HasIndirectGRFCrossing", "true",
"Target supports an indirect region crossing one GRF boundary">;
def FeatureSLM64K : SubtargetFeature<"slm_64k",
"MaxSLMSize", "64",
"Target supports up to 64k of SLM">;
def FeatureSLM128K : SubtargetFeature<"slm_128k",
"MaxSLMSize", "128",
"Target supports up to 128k of SLM">;
def FeatureHasSad2 : SubtargetFeature<"feature_has_sad2",
"HasSad2", "true",
"Target supports sad2/sad2a instructions">;
def FeatureHasOWordSLM : SubtargetFeature<"feature_has_slm_oword",
"HasSLMOWord", "true",
"Target supports OWord block SLM messages">;
def FeatureHasMadSimd32 : SubtargetFeature<"feature_has_mad_simd32",
"HasMadSimd32", "true",
"Target supports SIMD32 mad instruction">;
def FeatureHasNamedBarriers : SubtargetFeature<"feature_has_named_barriers",
"HasNamedBarriers", "true",
"Target supports named barriers">;
def FeatureHasMediaWalker : SubtargetFeature<"feature_has_media_walker",
"HasMediaWalker", "true",
"Target supports media walker interface">;
def FeatureHasLargeGRF : SubtargetFeature<"feature_has_large_grf",
"HasLargeGRF", "true",
"Target supports large GRF mode">;
def FeatureHas7ThreadsPerEU : SubtargetFeature<"feature_7threads_per_eu",
"NumThreadsPerEU", "7",
"Target has 7 threads per EU">;
def FeatureHas8ThreadsPerEU : SubtargetFeature<"feature_8threads_per_eu",
"NumThreadsPerEU", "8",
"Target has 8 threads per EU">;
//===----------------------------------------------------------------------===//
// GenX processors supported.
//===----------------------------------------------------------------------===//
class Proc<string Name, list<SubtargetFeature> Features>
: Processor<Name, NoItineraries, Features>;
def : Proc<"generic", []>;
def : Proc<"Gen8", [
FeatureFP64,
FeatureHWTIDFromPredef,
FeatureHas7ThreadsPerEU,
FeatureHasMediaWalker,
FeatureHasPackedFloat,
FeatureHasSad2,
FeatureHasSampler,
FeatureIEEEDivSqrt,
FeatureInstrAdd64,
FeatureIntDivRem32,
FeatureLongLong,
FeatureMultiIndirectByteRegioning,
FeatureSLM64K,
FeatureSwitchjmp,
FeatureWaNoA32ByteScatter,
]>;
def : Proc<"Gen9", [
FeatureFP64,
FeatureHWTIDFromPredef,
FeatureHas7ThreadsPerEU,
FeatureHasMediaWalker,
FeatureHasPackedFloat,
FeatureHasSad2,
FeatureHasSampler,
FeatureIEEEDivSqrt,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrAdd64,
FeatureIntDivRem32,
FeatureLongLong,
FeatureMultiIndirectByteRegioning,
FeaturePreemption,
FeatureSLM64K,
FeatureSwitchjmp,
FeatureUseMulDDQ,
FeatureWaNoA32ByteScatter,
]>;
def : Proc<"Gen9LP", [
FeatureFP64,
FeatureHWTIDFromPredef,
FeatureHas7ThreadsPerEU,
FeatureHasMediaWalker,
FeatureHasPackedFloat,
FeatureHasSad2,
FeatureHasSampler,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrAdd64,
FeatureIntDivRem32,
FeatureLongLong,
FeatureMultiIndirectByteRegioning,
FeaturePreemption,
FeatureSLM64K,
FeatureSwitchjmp,
FeatureUseMulDDQ,
FeatureWaNoA32ByteScatter,
]>;
def : Proc<"Gen11", [
FeatureHWTIDFromPredef,
FeatureHas7ThreadsPerEU,
FeatureHasMadSimd32,
FeatureHasMediaWalker,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureHasSampler,
FeatureIEEEDivSqrt,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrBitRotate,
FeatureIntDivRem32,
FeatureLongLongEmulation,
FeatureMultiIndirectByteRegioning,
FeaturePreemption,
FeatureSLM64K,
FeatureSwitchjmp,
]>;
def : Proc<"XeLP", [
FeatureFusedEU,
FeatureHWTIDFromPredef,
FeatureHas7ThreadsPerEU,
FeatureHasMadSimd32,
FeatureHasMediaWalker,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureHasSampler,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrBitRotate,
FeatureIntDivRem32,
FeatureLongLongEmulation,
FeatureMultiIndirectByteRegioning,
FeaturePreemption,
FeatureSLM64K,
FeatureWAFusedEUNoMask,
]>;
def : Proc<"XeHP", [
FeatureFP64,
FeatureFusedEU,
FeatureHas8ThreadsPerEU,
FeatureHasAdd3,
FeatureHasBfn,
FeatureHasLargeGRF,
FeatureHasMadSimd32,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureHasSampler,
FeatureIEEEDivSqrt,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrAdd64,
FeatureInstrBitRotate,
FeatureLongLong,
FeatureMultiIndirectByteRegioning,
FeatureSLM128K,
FeatureThreadPayloadInMemory,
]>;
def : Proc<"XeHPG", [
FeatureFusedEU,
FeatureHas8ThreadsPerEU,
FeatureHasAdd3,
FeatureHasBfn,
FeatureHasLSC,
FeatureHasLargeGRF,
FeatureHasMadSimd32,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureHasSampler,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrBitRotate,
FeatureLongLongEmulation,
FeatureMultiIndirectByteRegioning,
FeatureSLM128K,
FeatureThreadPayloadInMemory,
]>;
def : Proc<"XeLPG", [
FeatureFDivFSqrt64Emulation,
FeatureFP64,
FeatureFusedEU,
FeatureHas8ThreadsPerEU,
FeatureHasAdd3,
FeatureHasBfn,
FeatureHasLSC,
FeatureHasLargeGRF,
FeatureHasMadSimd32,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureHasSampler,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrBitRotate,
FeatureLongLongEmulation,
FeatureMultiIndirectByteRegioning,
FeatureSLM128K,
FeatureThreadPayloadInMemory,
]>;
def : Proc<"XeLPGPlus", [
FeatureFDivFSqrt64Emulation,
FeatureFP64,
FeatureFusedEU,
FeatureHas8ThreadsPerEU,
FeatureHasAdd3,
FeatureHasBfn,
FeatureHasLSC,
FeatureHasLargeGRF,
FeatureHasMadSimd32,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureHasSampler,
FeatureIndirectByteGRFCrossing,
FeatureIndirectGRFCrossing,
FeatureInstrBitRotate,
FeatureLongLongEmulation,
FeatureMultiIndirectByteRegioning,
FeatureSLM128K,
FeatureThreadPayloadInMemory,
]>;
def : Proc<"XeHPC", [
FeatureFP64,
FeatureGRFByteSize64,
FeatureHas8ThreadsPerEU,
FeatureHasAdd3,
FeatureHasBfn,
FeatureHasLSC,
FeatureHasLargeGRF,
FeatureHasMadSimd32,
FeatureHasNamedBarriers,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureIEEEDivSqrt,
FeatureIndirectGRFCrossing,
FeatureInstr64BitRotate,
FeatureInstrAdd64,
FeatureInstrGlobalAtomicAddF64,
FeatureInstrLocalIntegerCas64,
FeatureLSCMaxWidth32,
FeatureLongLong,
FeaturePartialI64Emulation,
FeatureSLM128K,
FeatureSwitchjmp,
FeatureThreadPayloadInMemory,
]>;
def : Proc<"XeHPCVG", [
FeatureFP64,
FeatureGRFByteSize64,
FeatureHas8ThreadsPerEU,
FeatureHasAdd3,
FeatureHasBfn,
FeatureHasLSC,
FeatureHasLargeGRF,
FeatureHasMadSimd32,
FeatureHasNamedBarriers,
FeatureHasOWordSLM,
FeatureHasPackedFloat,
FeatureIEEEDivSqrt,
FeatureIndirectGRFCrossing,
FeatureInstr64BitRotate,
FeatureInstrAdd64,
FeatureInstrGlobalAtomicAddF64,
FeatureInstrLocalIntegerCas64,
FeatureLSCMaxWidth32,
FeatureLongLong,
FeaturePartialI64Emulation,
FeatureSLM128K,
FeatureSwitchjmp,
FeatureThreadPayloadInMemory,
]>;
def : Proc<"Xe2", [
FeatureFP64,
FeatureGRFByteSize64,
FeatureHas8ThreadsPerEU,
FeatureHasAdd3,
FeatureHasBfn,
FeatureHasLSC,
FeatureHasLSCOffset,
FeatureHasLSCTyped,
FeatureHasLargeGRF,
FeatureHasMadSimd32,
FeatureHasNamedBarriers,
FeatureHasOWordSLM,
FeatureHasSampler,
FeatureIEEEDivSqrt,
FeatureIndirectGRFCrossing,
FeatureInstr64BitRotate,
FeatureInstrAdd64,
FeatureInstrGlobalAtomicAddF64,
FeatureInstrLocalIntegerCas64,
FeatureLSCMaxWidth32,
FeatureLongLong,
FeatureNoLegacyDataport,
FeaturePartialI64Emulation,
FeaturePreemption,
FeatureSLM128K,
FeatureSwitchjmp,
FeatureSystolicDenormControl,
FeatureThreadPayloadInMemory,
FeatureTransLegacy,
]>;
def GenX : Target {
// Nothing here (yet?)
}
|