Skip to content

Commit 563aeab

Browse files
scottp101igcbot
authored andcommitted
clean up types
clean up types
1 parent f5c3537 commit 563aeab

File tree

1 file changed

+86
-54
lines changed

1 file changed

+86
-54
lines changed

IGC/AdaptorCommon/RayTracing/AutoGenRTStackAccessPrivateOS.h

Lines changed: 86 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -69,52 +69,60 @@ static Type* _struct_RTStackFormat__MemRay(Module &M)
6969
}(),
7070
Type::getFloatTy(M.getContext()),
7171
Type::getFloatTy(M.getContext()),
72-
_union_anon(M),
72+
_igc_auto_union_anon(M),
7373
IntegerType::get(M.getContext(), 64),
7474
IntegerType::get(M.getContext(), 64),
75-
_union_anon_1(M),
75+
_igc_auto_union_anon_1(M),
7676
};
7777
return StructType::create(M.getContext(), Tys, StructName, false);
7878
}();
7979
}
80-
static Type* _union_anon(Module &M)
80+
static Type* _igc_auto_union_anon(Module &M)
8181
{
8282
return
8383
[&] {
84-
StringRef StructName = "union.anon";
84+
StringRef StructName = "igc.auto.union.anon";
85+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
86+
return Ty;
8587
Type* Tys[] = {
86-
_struct_anon_0(M),
88+
_igc_auto_struct_anon_0(M),
8789
};
8890
return StructType::create(M.getContext(), Tys, StructName, false);
8991
}();
9092
}
91-
static Type* _struct_anon_0(Module &M)
93+
static Type* _igc_auto_struct_anon_0(Module &M)
9294
{
9395
return
9496
[&] {
95-
StringRef StructName = "struct.anon.0";
97+
StringRef StructName = "igc.auto.struct.anon.0";
98+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
99+
return Ty;
96100
Type* Tys[] = {
97101
IntegerType::get(M.getContext(), 64),
98102
};
99103
return StructType::create(M.getContext(), Tys, StructName, false);
100104
}();
101105
}
102-
static Type* _union_anon_1(Module &M)
106+
static Type* _igc_auto_union_anon_1(Module &M)
103107
{
104108
return
105109
[&] {
106-
StringRef StructName = "union.anon.1";
110+
StringRef StructName = "igc.auto.union.anon.1";
111+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
112+
return Ty;
107113
Type* Tys[] = {
108-
_struct_anon_3(M),
114+
_igc_auto_struct_anon_3(M),
109115
};
110116
return StructType::create(M.getContext(), Tys, StructName, false);
111117
}();
112118
}
113-
static Type* _struct_anon_3(Module &M)
119+
static Type* _igc_auto_struct_anon_3(Module &M)
114120
{
115121
return
116122
[&] {
117-
StringRef StructName = "struct.anon.3";
123+
StringRef StructName = "igc.auto.struct.anon.3";
124+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
125+
return Ty;
118126
Type* Tys[] = {
119127
IntegerType::get(M.getContext(), 64),
120128
};
@@ -129,27 +137,31 @@ static Type* _struct_RTStackFormat__MemTravStack(Module &M)
129137
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
130138
return Ty;
131139
Type* Tys[] = {
132-
_union_anon_5(M),
140+
_igc_auto_union_anon_5(M),
133141
};
134142
return StructType::create(M.getContext(), Tys, StructName, false);
135143
}();
136144
}
137-
static Type* _union_anon_5(Module &M)
145+
static Type* _igc_auto_union_anon_5(Module &M)
138146
{
139147
return
140148
[&] {
141-
StringRef StructName = "union.anon.5";
149+
StringRef StructName = "igc.auto.union.anon.5";
150+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
151+
return Ty;
142152
Type* Tys[] = {
143-
_struct_anon_7(M),
153+
_igc_auto_struct_anon_7(M),
144154
};
145155
return StructType::create(M.getContext(), Tys, StructName, false);
146156
}();
147157
}
148-
static Type* _struct_anon_7(Module &M)
158+
static Type* _igc_auto_struct_anon_7(Module &M)
149159
{
150160
return
151161
[&] {
152-
StringRef StructName = "struct.anon.7";
162+
StringRef StructName = "igc.auto.struct.anon.7";
163+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
164+
return Ty;
153165
Type* Tys[] = {
154166
IntegerType::get(M.getContext(), 64),
155167
IntegerType::get(M.getContext(), 32),
@@ -237,16 +249,18 @@ static Type* _struct_RTStackFormat__StackPtrAndBudges(Module &M)
237249
return Ty;
238250
Type* Tys[] = {
239251
IntegerType::get(M.getContext(), 16),
240-
_union_anon_8(M),
252+
_igc_auto_union_anon_8(M),
241253
};
242254
return StructType::create(M.getContext(), Tys, StructName, false);
243255
}();
244256
}
245-
static Type* _union_anon_8(Module &M)
257+
static Type* _igc_auto_union_anon_8(Module &M)
246258
{
247259
return
248260
[&] {
249-
StringRef StructName = "union.anon.8";
261+
StringRef StructName = "igc.auto.union.anon.8";
262+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
263+
return Ty;
250264
Type* Tys[] = {
251265
IntegerType::get(M.getContext(), 16),
252266
};
@@ -331,9 +345,9 @@ static Type* _struct_IGC__RayDispatchGlobalData__RT__Xe(Module &M)
331345
Type* Tys[] = {
332346
IntegerType::get(M.getContext(), 64),
333347
IntegerType::get(M.getContext(), 64),
334-
_union_anon_10(M),
335-
_union_anon_11(M),
336-
_union_anon_12(M),
348+
_igc_auto_union_anon_10(M),
349+
_igc_auto_union_anon_11(M),
350+
_igc_auto_union_anon_12(M),
337351
[&] {
338352
auto *EltTy =
339353
IntegerType::get(M.getContext(), 32);
@@ -344,33 +358,39 @@ static Type* _struct_IGC__RayDispatchGlobalData__RT__Xe(Module &M)
344358
return StructType::create(M.getContext(), Tys, StructName, false);
345359
}();
346360
}
347-
static Type* _union_anon_10(Module &M)
361+
static Type* _igc_auto_union_anon_10(Module &M)
348362
{
349363
return
350364
[&] {
351-
StringRef StructName = "union.anon.10";
365+
StringRef StructName = "igc.auto.union.anon.10";
366+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
367+
return Ty;
352368
Type* Tys[] = {
353369
IntegerType::get(M.getContext(), 32),
354370
};
355371
return StructType::create(M.getContext(), Tys, StructName, false);
356372
}();
357373
}
358-
static Type* _union_anon_11(Module &M)
374+
static Type* _igc_auto_union_anon_11(Module &M)
359375
{
360376
return
361377
[&] {
362-
StringRef StructName = "union.anon.11";
378+
StringRef StructName = "igc.auto.union.anon.11";
379+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
380+
return Ty;
363381
Type* Tys[] = {
364382
IntegerType::get(M.getContext(), 32),
365383
};
366384
return StructType::create(M.getContext(), Tys, StructName, false);
367385
}();
368386
}
369-
static Type* _union_anon_12(Module &M)
387+
static Type* _igc_auto_union_anon_12(Module &M)
370388
{
371389
return
372390
[&] {
373-
StringRef StructName = "union.anon.12";
391+
StringRef StructName = "igc.auto.union.anon.12";
392+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
393+
return Ty;
374394
Type* Tys[] = {
375395
IntegerType::get(M.getContext(), 32),
376396
};
@@ -387,18 +407,18 @@ static Type* _struct_IGC__RayDispatchGlobalData__RayDispatchGlobalDataCommon(Mod
387407
Type* Tys[] = {
388408
IntegerType::get(M.getContext(), 64),
389409
IntegerType::get(M.getContext(), 64),
390-
_union_anon_13(M),
391-
_union_anon_14(M),
410+
_igc_auto_union_anon_13(M),
411+
_igc_auto_union_anon_14(M),
392412
IntegerType::get(M.getContext(), 64),
393413
IntegerType::get(M.getContext(), 32),
394414
IntegerType::get(M.getContext(), 32),
395-
_union_anon_15(M),
415+
_igc_auto_union_anon_15(M),
396416
IntegerType::get(M.getContext(), 64),
397417
IntegerType::get(M.getContext(), 64),
398418
IntegerType::get(M.getContext(), 32),
399419
IntegerType::get(M.getContext(), 32),
400420
IntegerType::get(M.getContext(), 64),
401-
_union_anon_16(M),
421+
_igc_auto_union_anon_16(M),
402422
IntegerType::get(M.getContext(), 32),
403423
IntegerType::get(M.getContext(), 32),
404424
IntegerType::get(M.getContext(), 32),
@@ -411,55 +431,65 @@ static Type* _struct_IGC__RayDispatchGlobalData__RayDispatchGlobalDataCommon(Mod
411431
return StructType::create(M.getContext(), Tys, StructName, false);
412432
}();
413433
}
414-
static Type* _union_anon_13(Module &M)
434+
static Type* _igc_auto_union_anon_13(Module &M)
415435
{
416436
return
417437
[&] {
418-
StringRef StructName = "union.anon.13";
438+
StringRef StructName = "igc.auto.union.anon.13";
439+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
440+
return Ty;
419441
Type* Tys[] = {
420442
IntegerType::get(M.getContext(), 64),
421443
};
422444
return StructType::create(M.getContext(), Tys, StructName, false);
423445
}();
424446
}
425-
static Type* _union_anon_14(Module &M)
447+
static Type* _igc_auto_union_anon_14(Module &M)
426448
{
427449
return
428450
[&] {
429-
StringRef StructName = "union.anon.14";
451+
StringRef StructName = "igc.auto.union.anon.14";
452+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
453+
return Ty;
430454
Type* Tys[] = {
431455
IntegerType::get(M.getContext(), 64),
432456
};
433457
return StructType::create(M.getContext(), Tys, StructName, false);
434458
}();
435459
}
436-
static Type* _union_anon_15(Module &M)
460+
static Type* _igc_auto_union_anon_15(Module &M)
437461
{
438462
return
439463
[&] {
440-
StringRef StructName = "union.anon.15";
464+
StringRef StructName = "igc.auto.union.anon.15";
465+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
466+
return Ty;
441467
Type* Tys[] = {
442468
IntegerType::get(M.getContext(), 64),
443469
};
444470
return StructType::create(M.getContext(), Tys, StructName, false);
445471
}();
446472
}
447-
static Type* _union_anon_16(Module &M)
473+
static Type* _igc_auto_union_anon_16(Module &M)
448474
{
449475
return
450476
[&] {
451-
StringRef StructName = "union.anon.16";
477+
StringRef StructName = "igc.auto.union.anon.16";
478+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
479+
return Ty;
452480
Type* Tys[] = {
453-
_struct_anon_17(M),
481+
_igc_auto_struct_anon_17(M),
454482
};
455483
return StructType::create(M.getContext(), Tys, StructName, false);
456484
}();
457485
}
458-
static Type* _struct_anon_17(Module &M)
486+
static Type* _igc_auto_struct_anon_17(Module &M)
459487
{
460488
return
461489
[&] {
462-
StringRef StructName = "struct.anon.17";
490+
StringRef StructName = "igc.auto.struct.anon.17";
491+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
492+
return Ty;
463493
Type* Tys[] = {
464494
IntegerType::get(M.getContext(), 32),
465495
IntegerType::get(M.getContext(), 32),
@@ -775,11 +805,13 @@ static Type* _struct_RTStackFormat__InstanceLeaf_RTStackFormat__Xe___Part1(Modul
775805
return StructType::create(M.getContext(), Tys, StructName, false);
776806
}();
777807
}
778-
static Type* _struct_anon(Module &M)
808+
static Type* _igc_auto_struct_anon(Module &M)
779809
{
780810
return
781811
[&] {
782-
StringRef StructName = "struct.anon";
812+
StringRef StructName = "igc.auto.struct.anon";
813+
if (auto *Ty = IGCLLVM::getTypeByName(M, StructName))
814+
return Ty;
783815
Type* Tys[] = {
784816
IntegerType::get(M.getContext(), 16),
785817
IntegerType::get(M.getContext(), 16),
@@ -1059,17 +1091,17 @@ auto* _getRayInfo_Xe(Value* arg_0, Value* arg_1, Value* arg_2, const Twine& _Ret
10591091
auto* _getRayFlagsSync_Xe(Value* arg_0, const Twine& _ReturnName = "")
10601092
{
10611093
auto* V_1 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_0, { getInt64(0), getInt32(2), getInt32(4) });
1062-
auto* V_2 = CreateBitCast(V_1, PointerType::get(_struct_anon(*Ctx.getModule()), arg_0->getType()->getPointerAddressSpace()));
1063-
auto* V_3 = CreateInBoundsGEP(_struct_anon(*Ctx.getModule()), V_2, { getInt64(0), getInt32(3) });
1094+
auto* V_2 = CreateBitCast(V_1, PointerType::get(_igc_auto_struct_anon(*Ctx.getModule()), arg_0->getType()->getPointerAddressSpace()));
1095+
auto* V_3 = CreateInBoundsGEP(_igc_auto_struct_anon(*Ctx.getModule()), V_2, { getInt64(0), getInt32(3) });
10641096
auto* V_4 = CreateLoad(getInt16Ty(), V_3, _ReturnName);
10651097
return V_4;
10661098
}
10671099

10681100
void _setRayFlagsSync_Xe(Value* arg_0, Value* arg_1)
10691101
{
10701102
auto* V_2 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_0, { getInt64(0), getInt32(2), getInt32(4) });
1071-
auto* V_3 = CreateBitCast(V_2, PointerType::get(_struct_anon(*Ctx.getModule()), arg_0->getType()->getPointerAddressSpace()));
1072-
auto* V_4 = CreateInBoundsGEP(_struct_anon(*Ctx.getModule()), V_3, { getInt64(0), getInt32(3) });
1103+
auto* V_3 = CreateBitCast(V_2, PointerType::get(_igc_auto_struct_anon(*Ctx.getModule()), arg_0->getType()->getPointerAddressSpace()));
1104+
auto* V_4 = CreateInBoundsGEP(_igc_auto_struct_anon(*Ctx.getModule()), V_3, { getInt64(0), getInt32(3) });
10731105
CreateStore(arg_1, V_4);
10741106
return;
10751107
}
@@ -1488,11 +1520,11 @@ void _createTraceRayInlinePrologue_Xe(Value* arg_0, Value* arg_1, Value* arg_2,
14881520
auto* V_11 = CreateBitCast(V_10, PointerType::get(IGCLLVM::FixedVectorType::get(getFloatTy(), 8), arg_0->getType()->getPointerAddressSpace()));
14891521
CreateStore(arg_1, V_11);
14901522
auto* V_12 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_0, { getInt64(0), getInt32(2), getInt32(4) });
1491-
auto* V_13 = CreateBitCast(V_12, PointerType::get(_struct_anon(*Ctx.getModule()), arg_0->getType()->getPointerAddressSpace()));
1492-
auto* V_14 = CreateInBoundsGEP(_struct_anon(*Ctx.getModule()), V_13, { getInt64(0), getInt32(3) });
1523+
auto* V_13 = CreateBitCast(V_12, PointerType::get(_igc_auto_struct_anon(*Ctx.getModule()), arg_0->getType()->getPointerAddressSpace()));
1524+
auto* V_14 = CreateInBoundsGEP(_igc_auto_struct_anon(*Ctx.getModule()), V_13, { getInt64(0), getInt32(3) });
14931525
auto* V_15 = CreateLoad(getInt16Ty(), V_14);
14941526
auto* V_16 = CreateZExt(V_15, getInt32Ty());
1495-
auto* V_17 = CreateGEP(_union_anon(*Ctx.getModule()), V_12, { getInt64(0), getInt32(0), getInt32(0) });
1527+
auto* V_17 = CreateGEP(_igc_auto_union_anon(*Ctx.getModule()), V_12, { getInt64(0), getInt32(0), getInt32(0) });
14961528
auto* V_18 = CreateAnd(arg_2, getInt64(281474976710655));
14971529
auto* V_19 = CreateOr(V_16, arg_3);
14981530
auto* V_20 = CreateZExt(V_19, getInt64Ty());

0 commit comments

Comments
 (0)