@@ -1360,163 +1360,7 @@ llvm::Metadata* SubGroupSizeMetaData::getSIMD_sizeNode( const llvm::MDNode* pPar
1360
1360
1361
1361
unsigned int offset = _Mybase::getStartIndex ();
1362
1362
return pParentNode->getOperand (0 + offset).get ();
1363
- }
1364
-
1365
-
1366
-
1367
- // /
1368
- // Ctor - loads the WorkgroupWalkOrderMetaData from the given metadata node
1369
- //
1370
- WorkgroupWalkOrderMetaData::WorkgroupWalkOrderMetaData (const llvm::MDNode* pNode, bool hasId) :
1371
- _Mybase(pNode, hasId),
1372
- m_Dim0(getDim0Node(pNode)),
1373
- m_Dim1(getDim1Node(pNode)),
1374
- m_Dim2(getDim2Node(pNode)),
1375
- m_pNode(pNode)
1376
- {}
1377
-
1378
- // /
1379
- // Default Ctor - creates the empty, not named SubGroupSizeMetaData object
1380
- //
1381
- WorkgroupWalkOrderMetaData::WorkgroupWalkOrderMetaData () :
1382
- m_pNode(NULL )
1383
- {}
1384
-
1385
- // /
1386
- // Ctor - creates the empty, named SubGroupSizeMetaData object
1387
- //
1388
- WorkgroupWalkOrderMetaData::WorkgroupWalkOrderMetaData (const char * name) :
1389
- _Mybase(name),
1390
- m_pNode(NULL )
1391
- {}
1392
-
1393
- bool WorkgroupWalkOrderMetaData::hasValue () const
1394
- {
1395
- if (m_Dim0.hasValue ())
1396
- {
1397
- return true ;
1398
- }
1399
-
1400
- if (m_Dim1.hasValue ())
1401
- {
1402
- return true ;
1403
- }
1404
-
1405
- if (m_Dim2.hasValue ())
1406
- {
1407
- return true ;
1408
- }
1409
-
1410
- return NULL != m_pNode || dirty ();
1411
- }
1412
-
1413
- // /
1414
- // Returns true if any of the SubGroupSizeMetaData`s members has changed
1415
- bool WorkgroupWalkOrderMetaData::dirty () const
1416
- {
1417
- if (m_Dim0.dirty ())
1418
- {
1419
- return true ;
1420
- }
1421
-
1422
- if (m_Dim1.dirty ())
1423
- {
1424
- return true ;
1425
- }
1426
-
1427
- if (m_Dim2.dirty ())
1428
- {
1429
- return true ;
1430
- }
1431
- return false ;
1432
- }
1433
-
1434
- // /
1435
- // Discards the changes done to the SubGroupSizeMetaData instance
1436
- void WorkgroupWalkOrderMetaData::discardChanges ()
1437
- {
1438
- m_Dim0.discardChanges ();
1439
- m_Dim1.discardChanges ();
1440
- m_Dim2.discardChanges ();
1441
- }
1442
-
1443
- // /
1444
- // Generates the new MDNode hierarchy for the given structure
1445
- llvm::Metadata* WorkgroupWalkOrderMetaData::generateNode (llvm::LLVMContext& context) const
1446
- {
1447
- llvm::SmallVector<llvm::Metadata*, 5 > args;
1448
-
1449
- llvm::Metadata* pIDNode = _Mybase::generateNode (context);
1450
- if (NULL != pIDNode)
1451
- {
1452
- args.push_back (pIDNode);
1453
- }
1454
-
1455
- args.push_back (m_Dim0.generateNode (context));
1456
- args.push_back (m_Dim1.generateNode (context));
1457
- args.push_back (m_Dim2.generateNode (context));
1458
-
1459
- return llvm::MDNode::get (context, args);
1460
- }
1461
-
1462
- // /
1463
- // Saves the structure changes to the given MDNode
1464
- void WorkgroupWalkOrderMetaData::save (llvm::LLVMContext& context, llvm::MDNode* pNode) const
1465
- {
1466
- assert (pNode && " The target node should be valid pointer" );
1467
-
1468
- // we assume that underlying metadata node has not changed under our foot
1469
- if (pNode == m_pNode && !dirty ())
1470
- {
1471
- return ;
1472
- }
1473
- #if 0
1474
- // check that we could save the new information to the given node without regenerating it
1475
- if (!compatibleWith(pNode))
1476
- {
1477
- pNode->replaceAllUsesWith(generateNode(context));
1478
- return;
1479
- }
1480
- #endif
1481
-
1482
- m_Dim0.save (context, llvm::cast<llvm::MDNode>(getDim0Node (pNode)));
1483
- m_Dim1.save (context, llvm::cast<llvm::MDNode>(getDim1Node (pNode)));
1484
- m_Dim2.save (context, llvm::cast<llvm::MDNode>(getDim2Node (pNode)));
1485
- }
1486
-
1487
- llvm::Metadata* WorkgroupWalkOrderMetaData::getDim0Node (const llvm::MDNode* pParentNode) const
1488
- {
1489
- if (!pParentNode)
1490
- {
1491
- return NULL ;
1492
- }
1493
-
1494
- unsigned int offset = _Mybase::getStartIndex ();
1495
- return pParentNode->getOperand (0 + offset).get ();
1496
- }
1497
-
1498
- llvm::Metadata* WorkgroupWalkOrderMetaData::getDim1Node (const llvm::MDNode* pParentNode) const
1499
- {
1500
- if (!pParentNode)
1501
- {
1502
- return NULL ;
1503
- }
1504
-
1505
- unsigned int offset = _Mybase::getStartIndex ();
1506
- return pParentNode->getOperand (1 + offset).get ();
1507
- }
1508
-
1509
- llvm::Metadata* WorkgroupWalkOrderMetaData::getDim2Node (const llvm::MDNode* pParentNode) const
1510
- {
1511
- if (!pParentNode)
1512
- {
1513
- return NULL ;
1514
- }
1515
-
1516
- unsigned int offset = _Mybase::getStartIndex ();
1517
- return pParentNode->getOperand (2 + offset).get ();
1518
- }
1519
-
1363
+ }
1520
1364
1521
1365
// /
1522
1366
// Ctor - loads the VectorTypeHintMetaData from the given metadata node
@@ -2241,7 +2085,6 @@ FunctionInfoMetaData::FunctionInfoMetaData(const llvm::MDNode* pNode, bool hasId
2241
2085
m_ThreadGroupSize(ThreadGroupSizeMetaData::get(getThreadGroupSizeNode(pNode), true)),
2242
2086
m_ThreadGroupSizeHint(ThreadGroupSizeMetaData::get(getThreadGroupSizeHintNode(pNode), true)),
2243
2087
m_SubGroupSize(SubGroupSizeMetaData::get(getSubGroupSizeNode(pNode), true)),
2244
- m_WorkgroupWalkOrder(WorkgroupWalkOrderMetaData::get(getWorkgroupWalkOrderNode(pNode), true)),
2245
2088
m_LocalOffsets(getLocalOffsetsNode(pNode), true),
2246
2089
m_ResourceAlloc(ResourceAllocMetaData::get(getResourceAllocNode(pNode), true)),
2247
2090
m_OpenCLVectorTypeHint(VectorTypeHintMetaData::get(getOpenCLVectorTypeHintNode(pNode), true)),
@@ -2265,7 +2108,6 @@ FunctionInfoMetaData::FunctionInfoMetaData(): m_Type("function_type"),
2265
2108
m_ThreadGroupSize(ThreadGroupSizeMetaDataHandle::ObjectType::get(" thread_group_size" )),
2266
2109
m_ThreadGroupSizeHint(ThreadGroupSizeMetaDataHandle::ObjectType::get(" thread_group_size_hint" )),
2267
2110
m_SubGroupSize(SubGroupSizeMetaDataHandle::ObjectType::get(" sub_group_size" )),
2268
- m_WorkgroupWalkOrder(WorkgroupWalkOrderMetaDataHandle::ObjectType::get(" intel_reqd_workgroup_walk_order" )),
2269
2111
m_LocalOffsets(" local_offsets" ),
2270
2112
m_ResourceAlloc(ResourceAllocMetaDataHandle::ObjectType::get(" resource_alloc" )),
2271
2113
m_OpenCLVectorTypeHint(VectorTypeHintMetaDataHandle::ObjectType::get(" opencl_vec_type_hint" )),
@@ -2291,7 +2133,6 @@ FunctionInfoMetaData::FunctionInfoMetaData(const char* name):
2291
2133
m_ThreadGroupSize(ThreadGroupSizeMetaDataHandle::ObjectType::get(" thread_group_size" )),
2292
2134
m_ThreadGroupSizeHint(ThreadGroupSizeMetaDataHandle::ObjectType::get(" thread_group_size_hint" )),
2293
2135
m_SubGroupSize(SubGroupSizeMetaDataHandle::ObjectType::get(" sub_group_size" )),
2294
- m_WorkgroupWalkOrder(WorkgroupWalkOrderMetaDataHandle::ObjectType::get(" intel_reqd_workgroup_walk_order" )),
2295
2136
m_LocalOffsets(" local_offsets" ),
2296
2137
m_ResourceAlloc(ResourceAllocMetaDataHandle::ObjectType::get(" resource_alloc" )),
2297
2138
m_OpenCLVectorTypeHint(VectorTypeHintMetaDataHandle::ObjectType::get(" opencl_vec_type_hint" )),
@@ -2344,12 +2185,6 @@ bool FunctionInfoMetaData::hasValue() const
2344
2185
return true ;
2345
2186
}
2346
2187
2347
-
2348
- if (m_WorkgroupWalkOrder->hasValue ())
2349
- {
2350
- return true ;
2351
- }
2352
-
2353
2188
if (m_LocalOffsets.hasValue ())
2354
2189
{
2355
2190
return true ;
@@ -2443,11 +2278,7 @@ bool FunctionInfoMetaData::dirty() const
2443
2278
if ( m_SubGroupSize.dirty () )
2444
2279
{
2445
2280
return true ;
2446
- }
2447
- if (m_WorkgroupWalkOrder.dirty ())
2448
- {
2449
- return true ;
2450
- }
2281
+ }
2451
2282
if ( m_LocalOffsets.dirty () )
2452
2283
{
2453
2284
return true ;
@@ -2505,7 +2336,6 @@ void FunctionInfoMetaData::discardChanges()
2505
2336
m_ThreadGroupSize.discardChanges ();
2506
2337
m_ThreadGroupSizeHint.discardChanges ();
2507
2338
m_SubGroupSize.discardChanges ();
2508
- m_WorkgroupWalkOrder.discardChanges ();
2509
2339
m_LocalOffsets.discardChanges ();
2510
2340
m_ResourceAlloc.discardChanges ();
2511
2341
m_OpenCLVectorTypeHint.discardChanges ();
@@ -2558,11 +2388,6 @@ llvm::Metadata* FunctionInfoMetaData::generateNode(llvm::LLVMContext& context) c
2558
2388
args.push_back (m_SubGroupSize.generateNode (context));
2559
2389
}
2560
2390
2561
- if (m_WorkgroupWalkOrder->hasValue ())
2562
- {
2563
- args.push_back (m_WorkgroupWalkOrder.generateNode (context));
2564
- }
2565
-
2566
2391
if (isLocalOffsetsHasValue ())
2567
2392
{
2568
2393
args.push_back (m_LocalOffsets.generateNode (context));
@@ -2652,7 +2477,6 @@ void FunctionInfoMetaData::save(llvm::LLVMContext& context, llvm::MDNode* pNode)
2652
2477
m_ThreadGroupSize.save (context, llvm::cast<llvm::MDNode>(getThreadGroupSizeNode (pNode)));
2653
2478
m_ThreadGroupSizeHint.save (context, llvm::cast<llvm::MDNode>(getThreadGroupSizeHintNode (pNode)));
2654
2479
m_SubGroupSize.save (context, llvm::cast<llvm::MDNode>(getSubGroupSizeNode (pNode)));
2655
- m_WorkgroupWalkOrder.save (context, llvm::cast<llvm::MDNode>(getSubGroupSizeNode (pNode)));
2656
2480
m_LocalOffsets.save (context, llvm::cast<llvm::MDNode>(getLocalOffsetsNode (pNode)));
2657
2481
m_ResourceAlloc.save (context, llvm::cast<llvm::MDNode>(getResourceAllocNode (pNode)));
2658
2482
m_OpenCLVectorTypeHint.save (context, llvm::cast<llvm::MDNode>(getOpenCLVectorTypeHintNode (pNode)));
@@ -2775,24 +2599,6 @@ llvm::MDNode* FunctionInfoMetaData::getSubGroupSizeNode( const llvm::MDNode* pPa
2775
2599
return NULL ;
2776
2600
}
2777
2601
2778
- llvm::MDNode* FunctionInfoMetaData::getWorkgroupWalkOrderNode (const llvm::MDNode* pParentNode) const
2779
- {
2780
- if (!pParentNode)
2781
- {
2782
- return NULL ;
2783
- }
2784
-
2785
- unsigned int offset = _Mybase::getStartIndex ();
2786
- for (NodeIterator i = NodeIterator (pParentNode, 0 + offset), e = NodeIterator (pParentNode); i != e; ++i)
2787
- {
2788
- if (isNamedNode (i.get (), " sub_group_size" ))
2789
- {
2790
- return llvm::dyn_cast<llvm::MDNode>(i.get ());
2791
- }
2792
- }
2793
- return NULL ;
2794
- }
2795
-
2796
2602
llvm::Metadata* FunctionInfoMetaData::getLocalSizeNode ( const llvm::MDNode* pParentNode) const
2797
2603
{
2798
2604
if ( !pParentNode )
0 commit comments