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 =
294 traceOutput(*StoreOperation::AddressInput(*storeGep0Node).origin(), false);
295 assertAllocaWithType(tracedOutput, *bit16Type);
296 }
297
298 // Check gep1
299 {
300 const auto & tracedOutput =
301 traceOutput(*StoreOperation::AddressInput(storeGep1Node).origin(), false);
302 assertAllocaWithType(tracedOutput, *bit32Type);
303 }
304
305 // Check memstate
306 {
307 auto [memoryMergeNode, memoryMergeOperation] =
308 TryGetSimpleNodeAndOptionalOp<MemoryStateMergeOperation>(
309 *memoryStateLoopVar.input->origin());
310 EXPECT_TRUE(memoryMergeNode && memoryMergeOperation);
311
312 EXPECT_EQ(memoryMergeNode->ninputs(), 2u);
313 }
314}
315
316TEST(AggregateAllocaSplittingTest, nestedStructTest)
317{
318 using namespace jlm::llvm;
319 using namespace jlm::rvsdg;
320 using namespace jlm::util;
321
322 // Arrange
323 const auto memoryStateType = MemoryStateType::Create();
324 auto bit8Type = BitType::Create(8);
325 auto bit12Type = BitType::Create(12);
326 auto bit16Type = BitType::Create(16);
327 auto bit20Type = BitType::Create(20);
328 auto bit32Type = BitType::Create(32);
329 auto bit64Type = BitType::Create(64);
330 auto bit128Type = BitType::Create(128);
331
332 auto structSmall = StructType::CreateIdentified({ bit12Type, bit16Type }, false);
333 auto structBig = StructType::CreateIdentified({ bit32Type, bit64Type }, false);
334 auto structType = StructType::CreateIdentified(
335 { bit8Type, structSmall, bit20Type, structBig, bit128Type },
336 false);
337
338 const auto functionType = FunctionType::Create({}, { memoryStateType });
339
340 LlvmRvsdgModule rvsdgModule(FilePath(""), "", "");
341 auto & rvsdg = rvsdgModule.Rvsdg();
342
343 auto lambdaNode = LambdaNode::Create(
344 rvsdg.GetRootRegion(),
345 LlvmLambdaOperation::Create(functionType, "f", Linkage::externalLinkage));
346
347 auto & zeroNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 0);
348 auto & oneNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 1);
349 auto & twoNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 2);
350 auto & threeNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 3);
351 auto & fourNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 4);
352
353 auto & allocaNode = AllocaOperation::createNode(structType, *oneNode.output(0), 4);
354
355 auto & gepBit8Node = GetElementPtrOperation::createNode(
356 AllocaOperation::getPointerOutput(allocaNode),
357 { zeroNode.output(0), zeroNode.output(0) },
358 structType);
359 auto & bit8ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 8, 8);
360 auto storeGepBit8Node = &StoreNonVolatileOperation::CreateNode(
361 *gepBit8Node.output(0),
362 *bit8ConstantNode.output(0),
363 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
364 4);
365
366 auto & gepBit12Node = GetElementPtrOperation::createNode(
367 AllocaOperation::getPointerOutput(allocaNode),
368 { zeroNode.output(0), oneNode.output(0), zeroNode.output(0) },
369 structType);
370 auto & bit12ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 12, 12);
371 auto storeGepBit12Node = &StoreNonVolatileOperation::CreateNode(
372 *gepBit12Node.output(0),
373 *bit12ConstantNode.output(0),
374 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
375 4);
376
377 auto & gepBit16Node = GetElementPtrOperation::createNode(
378 AllocaOperation::getPointerOutput(allocaNode),
379 { zeroNode.output(0), oneNode.output(0), oneNode.output(0) },
380 structType);
381 auto & bit16ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 16, 16);
382 auto storeGepBit16Node = &StoreNonVolatileOperation::CreateNode(
383 *gepBit16Node.output(0),
384 *bit16ConstantNode.output(0),
385 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
386 4);
387
388 auto & gepBit20Node = GetElementPtrOperation::createNode(
389 AllocaOperation::getPointerOutput(allocaNode),
390 { zeroNode.output(0), twoNode.output(0) },
391 structType);
392 auto & bit20ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 20, 20);
393 auto storeGepBit20Node = &StoreNonVolatileOperation::CreateNode(
394 *gepBit20Node.output(0),
395 *bit20ConstantNode.output(0),
396 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
397 4);
398
399 auto & gepBit32Node = GetElementPtrOperation::createNode(
400 AllocaOperation::getPointerOutput(allocaNode),
401 { zeroNode.output(0), threeNode.output(0), zeroNode.output(0) },
402 structType);
403 auto & bit32ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 32);
404 auto storeGepBit32Node = &StoreNonVolatileOperation::CreateNode(
405 *gepBit32Node.output(0),
406 *bit32ConstantNode.output(0),
407 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
408 4);
409
410 auto & gepBit64Node = GetElementPtrOperation::createNode(
411 AllocaOperation::getPointerOutput(allocaNode),
412 { zeroNode.output(0), threeNode.output(0), oneNode.output(0) },
413 structType);
414 auto & bit64ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 64, 64);
415 auto storeGepBit64Node = &StoreNonVolatileOperation::CreateNode(
416 *gepBit64Node.output(0),
417 *bit64ConstantNode.output(0),
418 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
419 4);
420
421 auto & gepBit128Node = GetElementPtrOperation::createNode(
422 AllocaOperation::getPointerOutput(allocaNode),
423 { zeroNode.output(0), fourNode.output(0) },
424 structType);
425 auto & bit128ConstantNode = IntegerConstantOperation::Create(*lambdaNode->subregion(), 128, 128);
426 auto storeGepBit128Node = &StoreNonVolatileOperation::CreateNode(
427 *gepBit128Node.output(0),
428 *bit128ConstantNode.output(0),
429 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
430 4);
431
432 auto memoryStateMerge = MemoryStateMergeOperation::Create({ storeGepBit8Node->output(0),
433 storeGepBit12Node->output(0),
434 storeGepBit16Node->output(0),
435 storeGepBit20Node->output(0),
436 storeGepBit32Node->output(0),
437 storeGepBit64Node->output(0),
438 storeGepBit128Node->output(0) });
439
440 auto lambdaOutput = lambdaNode->finalize({ memoryStateMerge });
441 GraphExport::Create(*lambdaOutput, "f");
442
443 // Act
445 AggregateAllocaSplitting aggregateAllocaSplitting;
446 aggregateAllocaSplitting.Run(rvsdgModule, statisticsCollector);
447
448 // Assert
449 // gepBit8
450 {
451 const auto & tracedOutput =
452 traceOutput(*StoreOperation::AddressInput(*storeGepBit8Node).origin(), false);
453 assertAllocaWithType(tracedOutput, *bit8Type);
454 }
455
456 // gepBit12
457 {
458 const auto & tracedOutput =
459 traceOutput(*StoreOperation::AddressInput(*storeGepBit12Node).origin(), false);
460 assertAllocaWithType(tracedOutput, *bit12Type);
461 }
462
463 // gepBit16
464 {
465 const auto & tracedOutput =
466 traceOutput(*StoreOperation::AddressInput(*storeGepBit16Node).origin(), false);
467 assertAllocaWithType(tracedOutput, *bit16Type);
468 }
469
470 // gepBit20
471 {
472 const auto & tracedOutput =
473 traceOutput(*StoreOperation::AddressInput(*storeGepBit20Node).origin(), false);
474 assertAllocaWithType(tracedOutput, *bit20Type);
475 }
476
477 // gepBit32
478 {
479 const auto & tracedOutput =
480 traceOutput(*StoreOperation::AddressInput(*storeGepBit32Node).origin(), false);
481 assertAllocaWithType(tracedOutput, *bit32Type);
482 }
483
484 // gepBit64
485 {
486 const auto & tracedOutput =
487 traceOutput(*StoreOperation::AddressInput(*storeGepBit64Node).origin(), false);
488 assertAllocaWithType(tracedOutput, *bit64Type);
489 }
490
491 // gepBit128
492 {
493 const auto & tracedOutput =
494 traceOutput(*StoreOperation::AddressInput(*storeGepBit128Node).origin(), false);
495 assertAllocaWithType(tracedOutput, *bit128Type);
496 }
497
498 // Check memstate
499 {
500 auto [memoryMergeNode, memoryMergeOperation] =
501 TryGetSimpleNodeAndOptionalOp<MemoryStateMergeOperation>(
502 *lambdaNode->GetFunctionResults()[0]->origin());
503 EXPECT_TRUE(memoryMergeNode && memoryMergeOperation);
504
505 EXPECT_EQ(memoryMergeNode->ninputs(), 7u);
506 }
507}
508
509TEST(AggregateAllocaSplittingTests, allocaWithCountBiggerThanOne)
510{
511 using namespace jlm::llvm;
512 using namespace jlm::rvsdg;
513 using namespace jlm::util;
514
515 // Arrange
516 auto bit32Type = BitType::Create(32);
517 auto bit64Type = BitType::Create(64);
518 const auto pointerType = PointerType::Create();
519 const auto memoryStateType = MemoryStateType::Create();
520 const auto structType = StructType::CreateIdentified({ bit32Type, bit64Type }, false);
521 const auto functionType = FunctionType::Create({}, { memoryStateType });
522
523 LlvmRvsdgModule rvsdgModule(FilePath(""), "", "");
524 auto & rvsdg = rvsdgModule.Rvsdg();
525
526 auto lambdaNode = LambdaNode::Create(
527 rvsdg.GetRootRegion(),
528 LlvmLambdaOperation::Create(functionType, "f", Linkage::externalLinkage));
529
530 auto & zero32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 0);
531 auto & zero64Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 64, 0);
532 auto & one32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 1);
533 auto & two32Node = IntegerConstantOperation::Create(*lambdaNode->subregion(), 32, 2);
534 auto & allocaNode = AllocaOperation::createNode(structType, *two32Node.output(0), 4);
535
536 auto & gepNode = GetElementPtrOperation::createNode(
537 *allocaNode.output(0),
538 { zero32Node.output(0), one32Node.output(0) },
539 structType);
540 auto & storeGepNode = StoreNonVolatileOperation::CreateNode(
541 *gepNode.output(0),
542 *zero64Node.output(0),
543 { &AllocaOperation::getMemoryStateOutput(allocaNode) },
544 4);
545
546 auto lambdaOutput = lambdaNode->finalize({ storeGepNode.output(0) });
547 GraphExport::Create(*lambdaOutput, "f");
548
549 // Act
551 AggregateAllocaSplitting aggregateAllocaSplitting;
552 aggregateAllocaSplitting.Run(rvsdgModule, statisticsCollector);
553
554 // Assert
555 // We expect that the GetElementPtrOperation node was not replaced as it has a count that is
556 // bigger than one.
557 EXPECT_TRUE(Region::containsOperation<GetElementPtrOperation>(*lambdaNode->subregion(), false));
558}
TEST(AggregateAllocaSplittingTests, getElementPtrTest)
static void assertAllocaWithType(const jlm::rvsdg::Output &output, const jlm::rvsdg::Type &type)
static jlm::util::StatisticsCollector statisticsCollector
Definition PullTests.cpp:17
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