Jlm
Loading...
Searching...
No Matches
AggregateAllocaSplittingTests.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2026 Nico Reißmann <nico.reissmann@gmail.com>
3 * See COPYING for terms of redistribution.
4 */
5
6#include <gtest/gtest.h>
7
16#include <jlm/rvsdg/gamma.hpp>
17#include <jlm/rvsdg/lambda.hpp>
18#include <jlm/rvsdg/theta.hpp>
19#include <jlm/rvsdg/Trace.hpp>
20
21static void
23{
24 using namespace jlm::llvm;
25 using namespace jlm::rvsdg;
26
27 auto [allocaNode, allocaOperation] =
29 EXPECT_TRUE(allocaNode && allocaOperation);
30 EXPECT_EQ(*allocaOperation->allocatedType(), type);
31}
32
33TEST(AggregateAllocaSplittingTests, getElementPtrTest)
34{
35 using namespace jlm::llvm;
36 using namespace jlm::rvsdg;
37 using namespace jlm::util;
38
39 // Arrange
40 auto bit32Type = BitType::Create(32);
41 auto bit64Type = BitType::Create(64);
42 const auto pointerType = PointerType::Create();
43 const auto memoryStateType = MemoryStateType::Create();
44 const auto structType = StructType::CreateIdentified({ bit32Type, bit64Type }, false);
45 const auto functionType = FunctionType::Create({}, { memoryStateType });
46
47 LlvmRvsdgModule rvsdgModule(FilePath(""), "", "");
48 auto & rvsdg = rvsdgModule.Rvsdg();
49
50 auto lambdaNode = LambdaNode::Create(
51 rvsdg.GetRootRegion(),
52 LlvmLambdaOperation::Create(functionType, "f", Linkage::externalLinkage));
53
54 auto & zero32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 0);
55 auto & zero64Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 64, 0);
56 auto & one32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 1);
57 auto & allocaNode = AllocaOperation::createNode(structType, *one32Node.output(0), 4);
58
59 auto & gepXNode = GetElementPtrOperation::createNode(
60 *allocaNode.output(0),
61 { zero32Node.output(0), zero32Node.output(0) },
62 structType);
63 auto & storeGepXNode = StoreNonVolatileOperation::CreateNode(
64 *gepXNode.output(0),
65 *zero32Node.output(0),
66 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
67 4);
68
69 auto & gepYNode = GetElementPtrOperation::createNode(
70 *allocaNode.output(0),
71 { zero32Node.output(0), one32Node.output(0) },
72 structType);
73 auto & storeGepYNode = StoreNonVolatileOperation::CreateNode(
74 *gepYNode.output(0),
75 *zero64Node.output(0),
76 { storeGepXNode.output(0) },
77 4);
78
79 auto lambdaOutput = lambdaNode->finalize({ storeGepYNode.output(0) });
80 GraphExport::Create(*lambdaOutput, "f");
81
82 // Act
84 AggregateAllocaSplitting aggregateAllocaSplitting;
85 aggregateAllocaSplitting.Run(rvsdgModule, statisticsCollector);
86
87 // Assert
88 EXPECT_EQ(lambdaNode->subregion()->numNodes(), 8u);
89
90 assertAllocaWithType(*StoreOperation::AddressInput(storeGepXNode).origin(), *bit32Type);
91 assertAllocaWithType(*StoreOperation::AddressInput(storeGepYNode).origin(), *bit64Type);
92
93 // Check memstate
94 {
95 auto [memoryMergeNode, memoryMergeOperation] =
96 TryGetSimpleNodeAndOptionalOp<MemoryStateMergeOperation>(
97 *StoreOperation::getMemoryStateInputs(storeGepXNode).begin()->origin());
98 EXPECT_TRUE(memoryMergeNode && memoryMergeOperation);
99
100 EXPECT_EQ(memoryMergeNode->ninputs(), 2u);
101 }
102}
103
104TEST(AggregateAllocaSplittingTests, gammaTest)
105{
106 using namespace jlm::llvm;
107 using namespace jlm::rvsdg;
108 using namespace jlm::util;
109
110 // Arrange
111 auto bit16Type = BitType::Create(16);
112 auto bit32Type = BitType::Create(32);
113 auto bit64Type = BitType::Create(64);
114 const auto controlType = ControlType::Create(2);
115 const auto pointerType = PointerType::Create();
116 const auto memoryStateType = MemoryStateType::Create();
117 const auto structType = StructType::CreateIdentified({ bit16Type, bit32Type, bit64Type }, false);
118 const auto functionType = FunctionType::Create({ controlType }, { memoryStateType });
119
120 LlvmRvsdgModule rvsdgModule(FilePath(""), "", "");
121 auto & rvsdg = rvsdgModule.Rvsdg();
122
123 auto lambdaNode = LambdaNode::Create(
124 rvsdg.GetRootRegion(),
125 LlvmLambdaOperation::Create(functionType, "f", Linkage::externalLinkage));
126 auto controlArgument = lambdaNode->GetFunctionArguments()[0];
127
128 auto & zero = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 0);
129 auto & one = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 1);
130 auto & two = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 2);
131 auto & allocaNode = AllocaOperation::createNode(structType, *one.output(0), 4);
132
133 auto gammaNode = GammaNode::create(controlArgument, 2);
134 auto baseAddressEntryVar = gammaNode->AddEntryVar(&AllocaOperation::getPointerOutput(allocaNode));
135 auto memoryStateEntryVar =
136 gammaNode->AddEntryVar(&AllocaOperation::getMemoryStateOutput(allocaNode));
137
138 Node *storeGep0Node = nullptr, *storeGep1Node = nullptr;
139 // Subregion 0
140 {
141 auto & zero16Node = IntegerConstantOperation::Create(*gammaNode->subregion(0), 16, 0);
142 auto & zero32Node = IntegerConstantOperation::Create(*gammaNode->subregion(0), 32, 0);
143
144 auto & gep0Node = GetElementPtrOperation::createNode(
145 *baseAddressEntryVar.branchArgument[0],
146 { zero32Node.output(0), zero32Node.output(0) },
147 structType);
148 storeGep0Node = &StoreNonVolatileOperation::CreateNode(
149 *gep0Node.output(0),
150 *zero16Node.output(0),
151 { memoryStateEntryVar.branchArgument[0] },
152 4);
153 }
154
155 // Subregion 1
156 {
157 auto & zero32Node = IntegerConstantOperation::Create(*gammaNode->subregion(1), 32, 0);
158 auto & one32Node = IntegerConstantOperation::Create(*gammaNode->subregion(1), 32, 1);
159
160 auto & gep1Node = GetElementPtrOperation::createNode(
161 *baseAddressEntryVar.branchArgument[1],
162 { zero32Node.output(0), one32Node.output(0) },
163 structType);
164 storeGep1Node = &StoreNonVolatileOperation::CreateNode(
165 *gep1Node.output(0),
166 *zero32Node.output(0),
167 { memoryStateEntryVar.branchArgument[1] },
168 4);
169 }
170 auto baseAddressExitVar = gammaNode->AddExitVar(baseAddressEntryVar.branchArgument);
171 auto memoryStateExitVar =
172 gammaNode->AddExitVar({ storeGep0Node->output(0), storeGep1Node->output(0) });
173
174 auto & gep2Node = GetElementPtrOperation::createNode(
175 *baseAddressExitVar.output,
176 { zero.output(0), two.output(0) },
177 structType);
178
179 auto & zero64Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 64, 0);
180 auto & storeGep2Node = StoreNonVolatileOperation::CreateNode(
181 *gep2Node.output(0),
182 *zero64Node.output(0),
183 { memoryStateExitVar.output },
184 4);
185
186 auto lambdaOutput = lambdaNode->finalize({ storeGep2Node.output(0) });
187 GraphExport::Create(*lambdaOutput, "f");
188
189 // Act
191 AggregateAllocaSplitting aggregateAllocaSplitting;
192 aggregateAllocaSplitting.Run(rvsdgModule, statisticsCollector);
193
194 // Assert
195 // Check gep0
196 {
197 auto & gammaInput =
198 gammaNode->mapBranchArgumentToInput(*StoreOperation::AddressInput(*storeGep0Node).origin());
199 assertAllocaWithType(*gammaInput.origin(), *bit16Type);
200 }
201
202 // Check gep1
203 {
204 auto & gammaInput =
205 gammaNode->mapBranchArgumentToInput(*StoreOperation::AddressInput(*storeGep1Node).origin());
206 assertAllocaWithType(*gammaInput.origin(), *bit32Type);
207 }
208
209 // Check gep2
210 {
211 assertAllocaWithType(*StoreOperation::AddressInput(storeGep2Node).origin(), *bit64Type);
212 }
213
214 // Check memState
215 {
216 auto [memoryMergeNode, memoryMergeOperation] =
217 TryGetSimpleNodeAndOptionalOp<MemoryStateMergeOperation>(
218 *memoryStateEntryVar.input->origin());
219 EXPECT_TRUE(memoryMergeNode && memoryMergeOperation);
220
221 EXPECT_EQ(memoryMergeNode->ninputs(), 3u);
222 }
223}
224
225TEST(AggregateAllocaSplittingTests, thetaTest)
226{
227 using namespace jlm::llvm;
228 using namespace jlm::rvsdg;
229 using namespace jlm::util;
230
231 // Arrange
232 auto bit16Type = BitType::Create(16);
233 auto bit32Type = BitType::Create(32);
234 const auto pointerType = PointerType::Create();
235 const auto memoryStateType = MemoryStateType::Create();
236 const auto structType = StructType::CreateIdentified({ bit16Type, bit32Type }, false);
237 const auto functionType = FunctionType::Create({}, { memoryStateType });
238
239 LlvmRvsdgModule rvsdgModule(FilePath(""), "", "");
240 auto & rvsdg = rvsdgModule.Rvsdg();
241
242 auto lambdaNode = LambdaNode::Create(
243 rvsdg.GetRootRegion(),
244 LlvmLambdaOperation::Create(functionType, "f", Linkage::externalLinkage));
245
246 auto & one = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 1);
247 auto & allocaNode = AllocaOperation::createNode(structType, *one.output(0), 4);
248
249 Node * storeGep0Node = nullptr;
250 auto thetaNode = ThetaNode::create(lambdaNode->subregion());
251 auto addressLoopVar = thetaNode->AddLoopVar(&AllocaOperation::getPointerOutput(allocaNode));
252 auto memoryStateLoopVar =
253 thetaNode->AddLoopVar(&AllocaOperation::getMemoryStateOutput(allocaNode));
254 {
255 auto & zero16Node = IntegerConstantOperation::Create(*thetaNode->subregion(), 16, 0);
256 auto & zero32Node = IntegerConstantOperation::Create(*thetaNode->subregion(), 32, 0);
257 auto & gep0Node = GetElementPtrOperation::createNode(
258 *addressLoopVar.pre,
259 { zero32Node.output(0), zero32Node.output(0) },
260 structType);
261
262 storeGep0Node = &StoreNonVolatileOperation::CreateNode(
263 *gep0Node.output(0),
264 *zero16Node.output(0),
265 { memoryStateLoopVar.pre },
266 4);
267
268 memoryStateLoopVar.post->divert_to(storeGep0Node->output(0));
269 }
270
271 auto & zero32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 0);
272 auto & gep1Node = GetElementPtrOperation::createNode(
273 *addressLoopVar.output,
274 { zero32Node.output(0), one.output(0) },
275 structType);
276 auto & storeGep1Node = StoreNonVolatileOperation::CreateNode(
277 *gep1Node.output(0),
278 *zero32Node.output(0),
279 { memoryStateLoopVar.output },
280 4);
281
282 auto lambdaOutput = lambdaNode->finalize({ storeGep1Node.output(0) });
283 GraphExport::Create(*lambdaOutput, "f");
284
285 // Act
287 AggregateAllocaSplitting aggregateAllocaSplitting;
288 aggregateAllocaSplitting.Run(rvsdgModule, statisticsCollector);
289
290 // Assert
291 // Check gep0
292 {
293 const auto & tracedOutput = traceOutput(*StoreOperation::AddressInput(*storeGep0Node).origin());
294 assertAllocaWithType(tracedOutput, *bit16Type);
295 }
296
297 // Check gep1
298 {
299 const auto & tracedOutput = traceOutput(*StoreOperation::AddressInput(storeGep1Node).origin());
300 assertAllocaWithType(tracedOutput, *bit32Type);
301 }
302
303 // Check memstate
304 {
305 auto [memoryMergeNode, memoryMergeOperation] =
306 TryGetSimpleNodeAndOptionalOp<MemoryStateMergeOperation>(
307 *memoryStateLoopVar.input->origin());
308 EXPECT_TRUE(memoryMergeNode && memoryMergeOperation);
309
310 EXPECT_EQ(memoryMergeNode->ninputs(), 2u);
311 }
312}
313
314TEST(AggregateAllocaSplittingTest, nestedStructTest)
315{
316 using namespace jlm::llvm;
317 using namespace jlm::rvsdg;
318 using namespace jlm::util;
319
320 // Arrange
321 const auto memoryStateType = MemoryStateType::Create();
322 auto bit8Type = BitType::Create(8);
323 auto bit12Type = BitType::Create(12);
324 auto bit16Type = BitType::Create(16);
325 auto bit20Type = BitType::Create(20);
326 auto bit32Type = BitType::Create(32);
327 auto bit64Type = BitType::Create(64);
328 auto bit128Type = BitType::Create(128);
329
330 auto structSmall = StructType::CreateIdentified({ bit12Type, bit16Type }, false);
331 auto structBig = StructType::CreateIdentified({ bit32Type, bit64Type }, false);
332 auto structType = StructType::CreateIdentified(
333 { bit8Type, structSmall, bit20Type, structBig, bit128Type },
334 false);
335
336 const auto functionType = FunctionType::Create({}, { memoryStateType });
337
338 LlvmRvsdgModule rvsdgModule(FilePath(""), "", "");
339 auto & rvsdg = rvsdgModule.Rvsdg();
340
341 auto lambdaNode = LambdaNode::Create(
342 rvsdg.GetRootRegion(),
343 LlvmLambdaOperation::Create(functionType, "f", Linkage::externalLinkage));
344
345 auto & zeroNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 0);
346 auto & oneNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 1);
347 auto & twoNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 2);
348 auto & threeNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 3);
349 auto & fourNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 4);
350
351 auto & allocaNode = AllocaOperation::createNode(structType, *oneNode.output(0), 4);
352
353 auto & gepBit8Node = GetElementPtrOperation::createNode(
354 AllocaOperation::getPointerOutput(allocaNode),
355 { zeroNode.output(0), zeroNode.output(0) },
356 structType);
357 auto & bit8ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 8, 8);
358 auto storeGepBit8Node = &StoreNonVolatileOperation::CreateNode(
359 *gepBit8Node.output(0),
360 *bit8ConstantNode.output(0),
361 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
362 4);
363
364 auto & gepBit12Node = GetElementPtrOperation::createNode(
365 AllocaOperation::getPointerOutput(allocaNode),
366 { zeroNode.output(0), oneNode.output(0), zeroNode.output(0) },
367 structType);
368 auto & bit12ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 12, 12);
369 auto storeGepBit12Node = &StoreNonVolatileOperation::CreateNode(
370 *gepBit12Node.output(0),
371 *bit12ConstantNode.output(0),
372 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
373 4);
374
375 auto & gepBit16Node = GetElementPtrOperation::createNode(
376 AllocaOperation::getPointerOutput(allocaNode),
377 { zeroNode.output(0), oneNode.output(0), oneNode.output(0) },
378 structType);
379 auto & bit16ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 16, 16);
380 auto storeGepBit16Node = &StoreNonVolatileOperation::CreateNode(
381 *gepBit16Node.output(0),
382 *bit16ConstantNode.output(0),
383 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
384 4);
385
386 auto & gepBit20Node = GetElementPtrOperation::createNode(
387 AllocaOperation::getPointerOutput(allocaNode),
388 { zeroNode.output(0), twoNode.output(0) },
389 structType);
390 auto & bit20ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 20, 20);
391 auto storeGepBit20Node = &StoreNonVolatileOperation::CreateNode(
392 *gepBit20Node.output(0),
393 *bit20ConstantNode.output(0),
394 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
395 4);
396
397 auto & gepBit32Node = GetElementPtrOperation::createNode(
398 AllocaOperation::getPointerOutput(allocaNode),
399 { zeroNode.output(0), threeNode.output(0), zeroNode.output(0) },
400 structType);
401 auto & bit32ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 32);
402 auto storeGepBit32Node = &StoreNonVolatileOperation::CreateNode(
403 *gepBit32Node.output(0),
404 *bit32ConstantNode.output(0),
405 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
406 4);
407
408 auto & gepBit64Node = GetElementPtrOperation::createNode(
409 AllocaOperation::getPointerOutput(allocaNode),
410 { zeroNode.output(0), threeNode.output(0), oneNode.output(0) },
411 structType);
412 auto & bit64ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 64, 64);
413 auto storeGepBit64Node = &StoreNonVolatileOperation::CreateNode(
414 *gepBit64Node.output(0),
415 *bit64ConstantNode.output(0),
416 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
417 4);
418
419 auto & gepBit128Node = GetElementPtrOperation::createNode(
420 AllocaOperation::getPointerOutput(allocaNode),
421 { zeroNode.output(0), fourNode.output(0) },
422 structType);
423 auto & bit128ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 128, 128);
424 auto storeGepBit128Node = &StoreNonVolatileOperation::CreateNode(
425 *gepBit128Node.output(0),
426 *bit128ConstantNode.output(0),
427 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
428 4);
429
430 auto memoryStateMerge = MemoryStateMergeOperation::Create({ storeGepBit8Node->output(0),
431 storeGepBit12Node->output(0),
432 storeGepBit16Node->output(0),
433 storeGepBit20Node->output(0),
434 storeGepBit32Node->output(0),
435 storeGepBit64Node->output(0),
436 storeGepBit128Node->output(0) });
437
438 auto lambdaOutput = lambdaNode->finalize({ memoryStateMerge });
439 GraphExport::Create(*lambdaOutput, "f");
440
441 // Act
443 AggregateAllocaSplitting aggregateAllocaSplitting;
444 aggregateAllocaSplitting.Run(rvsdgModule, statisticsCollector);
445
446 // Assert
447 // gepBit8
448 {
449 const auto & tracedOutput =
450 traceOutput(*StoreOperation::AddressInput(*storeGepBit8Node).origin());
451 assertAllocaWithType(tracedOutput, *bit8Type);
452 }
453
454 // gepBit12
455 {
456 const auto & tracedOutput =
457 traceOutput(*StoreOperation::AddressInput(*storeGepBit12Node).origin());
458 assertAllocaWithType(tracedOutput, *bit12Type);
459 }
460
461 // gepBit16
462 {
463 const auto & tracedOutput =
464 traceOutput(*StoreOperation::AddressInput(*storeGepBit16Node).origin());
465 assertAllocaWithType(tracedOutput, *bit16Type);
466 }
467
468 // gepBit20
469 {
470 const auto & tracedOutput =
471 traceOutput(*StoreOperation::AddressInput(*storeGepBit20Node).origin());
472 assertAllocaWithType(tracedOutput, *bit20Type);
473 }
474
475 // gepBit32
476 {
477 const auto & tracedOutput =
478 traceOutput(*StoreOperation::AddressInput(*storeGepBit32Node).origin());
479 assertAllocaWithType(tracedOutput, *bit32Type);
480 }
481
482 // gepBit64
483 {
484 const auto & tracedOutput =
485 traceOutput(*StoreOperation::AddressInput(*storeGepBit64Node).origin());
486 assertAllocaWithType(tracedOutput, *bit64Type);
487 }
488
489 // gepBit128
490 {
491 const auto & tracedOutput =
492 traceOutput(*StoreOperation::AddressInput(*storeGepBit128Node).origin());
493 assertAllocaWithType(tracedOutput, *bit128Type);
494 }
495
496 // Check memstate
497 {
498 auto [memoryMergeNode, memoryMergeOperation] =
499 TryGetSimpleNodeAndOptionalOp<MemoryStateMergeOperation>(
500 *lambdaNode->GetFunctionResults()[0]->origin());
501 EXPECT_TRUE(memoryMergeNode && memoryMergeOperation);
502
503 EXPECT_EQ(memoryMergeNode->ninputs(), 7u);
504 }
505}
506
507TEST(AggregateAllocaSplittingTests, allocaWithCountBiggerThanOne)
508{
509 using namespace jlm::llvm;
510 using namespace jlm::rvsdg;
511 using namespace jlm::util;
512
513 // Arrange
514 auto bit32Type = BitType::Create(32);
515 auto bit64Type = BitType::Create(64);
516 const auto pointerType = PointerType::Create();
517 const auto memoryStateType = MemoryStateType::Create();
518 const auto structType = StructType::CreateIdentified({ bit32Type, bit64Type }, false);
519 const auto functionType = FunctionType::Create({}, { memoryStateType });
520
521 LlvmRvsdgModule rvsdgModule(FilePath(""), "", "");
522 auto & rvsdg = rvsdgModule.Rvsdg();
523
524 auto lambdaNode = LambdaNode::Create(
525 rvsdg.GetRootRegion(),
526 LlvmLambdaOperation::Create(functionType, "f", Linkage::externalLinkage));
527
528 auto & zero32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 0);
529 auto & zero64Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 64, 0);
530 auto & one32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 1);
531 auto & two32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 2);
532 auto & allocaNode = AllocaOperation::createNode(structType, *two32Node.output(0), 4);
533
534 auto & gepNode = GetElementPtrOperation::createNode(
535 *allocaNode.output(0),
536 { zero32Node.output(0), one32Node.output(0) },
537 structType);
538 auto & storeGepNode = StoreNonVolatileOperation::CreateNode(
539 *gepNode.output(0),
540 *zero64Node.output(0),
541 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
542 4);
543
544 auto lambdaOutput = lambdaNode->finalize({ storeGepNode.output(0) });
545 GraphExport::Create(*lambdaOutput, "f");
546
547 // Act
549 AggregateAllocaSplitting aggregateAllocaSplitting;
550 aggregateAllocaSplitting.Run(rvsdgModule, statisticsCollector);
551
552 // Assert
553 // We expect that the GetElementPtrOperation node was not replaced as it has a count that is
554 // bigger than one.
555 EXPECT_TRUE(Region::containsOperation<GetElementPtrOperation>(*lambdaNode->subregion(), false));
556}
TEST(AggregateAllocaSplittingTests, getElementPtrTest)
static void assertAllocaWithType(const jlm::rvsdg::Output &output, const jlm::rvsdg::Type &type)
static jlm::util::StatisticsCollector statisticsCollector
Aggregate Alloca Splitting Transformation.
void Run(rvsdg::RvsdgModule &module, util::StatisticsCollector &statisticsCollector) override
Perform RVSDG transformation.
NodeOutput * output(size_t index) const noexcept
Definition node.hpp:650
Global memory state passed between functions.
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
Definition node.hpp:872