Jlm
Loading...
Searching...
No Matches
IntegerOperations.hpp
Go to the documentation of this file.
1/*
2 * Copyright 2025 Nico Reißmann <nico.reissmann@gmail.com>
3 * See COPYING for terms of redistribution.
4 */
5
6#ifndef JLM_LLVM_IR_OPERATORS_INTEGEROPERATIONS_HPP
7#define JLM_LLVM_IR_OPERATORS_INTEGEROPERATIONS_HPP
8
12#include <jlm/rvsdg/nullary.hpp>
13
14namespace jlm::llvm
15{
16
17// FIXME: Implement our own value representation instead of re-using the bitstring value
18// representation
20
25{
26public:
28
30 : NullaryOperation(rvsdg::BitType::Create(representation.nbits())),
31 Representation_(std::move(representation))
32 {}
33
34 std::unique_ptr<Operation>
35 copy() const override;
36
37 std::string
38 debug_string() const override;
39
40 bool
41 operator==(const Operation & other) const noexcept override;
42
43 [[nodiscard]] const IntegerValueRepresentation &
44 Representation() const noexcept
45 {
46 return Representation_;
47 }
48
49 static rvsdg::Node &
51 {
52 return rvsdg::CreateOpNode<IntegerConstantOperation>(region, std::move(representation));
53 }
54
55 static rvsdg::Node &
56 Create(rvsdg::Region & region, std::size_t numBits, std::int64_t value)
57 {
58 return Create(region, { numBits, value });
59 }
60
61private:
63};
64
69{
70public:
71 ~IntegerBinaryOperation() noexcept override;
72
74 const std::size_t numArgumentBits,
75 const std::size_t numResultBits) noexcept
77 { rvsdg::BitType::Create(numArgumentBits), rvsdg::BitType::Create(numArgumentBits) },
78 rvsdg::BitType::Create(numResultBits))
79 {}
80
81 [[nodiscard]] const rvsdg::BitType &
82 Type() const noexcept
83 {
84 return *util::assertedCast<const rvsdg::BitType>(argument(0).get());
85 }
86};
87
94{
95public:
96 ~IntegerAddOperation() noexcept override;
97
98 explicit IntegerAddOperation(const std::size_t numBits)
99 : IntegerBinaryOperation(numBits, numBits)
100 {}
101
102 bool
103 operator==(const Operation & other) const noexcept override;
104
105 std::string
106 debug_string() const override;
107
108 [[nodiscard]] std::unique_ptr<Operation>
109 copy() const override;
110
112 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
113 const noexcept override;
114
117 const override;
118
119 enum flags
120 flags() const noexcept override;
121
122 static rvsdg::Node &
123 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
124 {
125 return rvsdg::CreateOpNode<IntegerAddOperation>({ &operand1, &operand2 }, numBits);
126 }
127
138 static std::optional<std::vector<rvsdg::Output *>>
140 const IntegerAddOperation & operation,
141 const std::vector<rvsdg::Output *> & operands);
142};
143
150{
151public:
152 ~IntegerSubOperation() noexcept override;
153
154 explicit IntegerSubOperation(const std::size_t numBits)
155 : IntegerBinaryOperation(numBits, numBits)
156 {}
157
158 bool
159 operator==(const Operation & other) const noexcept override;
160
161 std::string
162 debug_string() const override;
163
164 [[nodiscard]] std::unique_ptr<Operation>
165 copy() const override;
166
168 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
169 const noexcept override;
170
173 const override;
174
175 enum flags
176 flags() const noexcept override;
177
178 static rvsdg::Node &
179 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
180 {
181 return rvsdg::CreateOpNode<IntegerSubOperation>({ &operand1, &operand2 }, numBits);
182 }
183
196 static std::optional<std::vector<rvsdg::Output *>>
198 const IntegerSubOperation & operation,
199 const std::vector<rvsdg::Output *> & operands);
200
211 static std::optional<std::vector<rvsdg::Output *>>
213 const IntegerSubOperation & operation,
214 const std::vector<rvsdg::Output *> & operands);
215};
216
223{
224public:
225 ~IntegerMulOperation() noexcept override;
226
227 explicit IntegerMulOperation(const std::size_t numBits)
228 : IntegerBinaryOperation(numBits, numBits)
229 {}
230
231 bool
232 operator==(const Operation & other) const noexcept override;
233
234 std::string
235 debug_string() const override;
236
237 [[nodiscard]] std::unique_ptr<Operation>
238 copy() const override;
239
241 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
242 const noexcept override;
243
246 const override;
247
248 enum flags
249 flags() const noexcept override;
250
251 static rvsdg::Node &
252 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
253 {
254 return rvsdg::CreateOpNode<IntegerMulOperation>({ &operand1, &operand2 }, numBits);
255 }
256
267 static std::optional<std::vector<rvsdg::Output *>>
269 const IntegerMulOperation & operation,
270 const std::vector<rvsdg::Output *> & operands);
271};
272
279{
280public:
281 ~IntegerSDivOperation() noexcept override;
282
283 explicit IntegerSDivOperation(const std::size_t numBits)
284 : IntegerBinaryOperation(numBits, numBits)
285 {}
286
287 bool
288 operator==(const Operation & other) const noexcept override;
289
290 std::string
291 debug_string() const override;
292
293 [[nodiscard]] std::unique_ptr<Operation>
294 copy() const override;
295
297 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
298 const noexcept override;
299
302 const override;
303
304 enum flags
305 flags() const noexcept override;
306
307 static rvsdg::Node &
308 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
309 {
310 return rvsdg::CreateOpNode<IntegerSDivOperation>({ &operand1, &operand2 }, numBits);
311 }
312
323 static std::optional<std::vector<rvsdg::Output *>>
325 const IntegerSDivOperation & operation,
326 const std::vector<rvsdg::Output *> & operands);
327};
328
335{
336public:
337 ~IntegerUDivOperation() noexcept override;
338
339 explicit IntegerUDivOperation(const std::size_t numBits)
340 : IntegerBinaryOperation(numBits, numBits)
341 {}
342
343 bool
344 operator==(const Operation & other) const noexcept override;
345
346 std::string
347 debug_string() const override;
348
349 [[nodiscard]] std::unique_ptr<Operation>
350 copy() const override;
351
353 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
354 const noexcept override;
355
358 const override;
359
360 enum flags
361 flags() const noexcept override;
362
363 static rvsdg::Node &
364 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
365 {
366 return rvsdg::CreateOpNode<IntegerUDivOperation>({ &operand1, &operand2 }, numBits);
367 }
368
379 static std::optional<std::vector<rvsdg::Output *>>
381 const IntegerUDivOperation & operation,
382 const std::vector<rvsdg::Output *> & operands);
383};
384
391{
392public:
393 ~IntegerSRemOperation() noexcept override;
394
395 explicit IntegerSRemOperation(const std::size_t numBits)
396 : IntegerBinaryOperation(numBits, numBits)
397 {}
398
399 bool
400 operator==(const Operation & other) const noexcept override;
401
402 std::string
403 debug_string() const override;
404
405 [[nodiscard]] std::unique_ptr<Operation>
406 copy() const override;
407
409 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
410 const noexcept override;
411
414 const override;
415
416 enum flags
417 flags() const noexcept override;
418
419 static rvsdg::Node &
420 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
421 {
422 return rvsdg::CreateOpNode<IntegerSRemOperation>({ &operand1, &operand2 }, numBits);
423 }
424
435 static std::optional<std::vector<rvsdg::Output *>>
437 const IntegerSRemOperation & operation,
438 const std::vector<rvsdg::Output *> & operands);
439};
440
447{
448public:
449 ~IntegerURemOperation() noexcept override;
450
451 explicit IntegerURemOperation(const std::size_t numBits)
452 : IntegerBinaryOperation(numBits, numBits)
453 {}
454
455 bool
456 operator==(const Operation & other) const noexcept override;
457
458 std::string
459 debug_string() const override;
460
461 [[nodiscard]] std::unique_ptr<Operation>
462 copy() const override;
463
465 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
466 const noexcept override;
467
470 const override;
471
472 enum flags
473 flags() const noexcept override;
474
475 static rvsdg::Node &
476 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
477 {
478 return rvsdg::CreateOpNode<IntegerURemOperation>({ &operand1, &operand2 }, numBits);
479 }
480
491 static std::optional<std::vector<rvsdg::Output *>>
493 const IntegerURemOperation & operation,
494 const std::vector<rvsdg::Output *> & operands);
495};
496
503{
504public:
505 ~IntegerAShrOperation() noexcept override;
506
507 explicit IntegerAShrOperation(const std::size_t numBits)
508 : IntegerBinaryOperation(numBits, numBits)
509 {}
510
511 bool
512 operator==(const Operation & other) const noexcept override;
513
514 std::string
515 debug_string() const override;
516
517 [[nodiscard]] std::unique_ptr<Operation>
518 copy() const override;
519
521 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
522 const noexcept override;
523
526 const override;
527
528 enum flags
529 flags() const noexcept override;
530
531 static rvsdg::Node &
532 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
533 {
534 return rvsdg::CreateOpNode<IntegerAShrOperation>({ &operand1, &operand2 }, numBits);
535 }
536
547 static std::optional<std::vector<rvsdg::Output *>>
549 const IntegerAShrOperation & operation,
550 const std::vector<rvsdg::Output *> & operands);
551};
552
559{
560public:
561 ~IntegerShlOperation() noexcept override;
562
563 explicit IntegerShlOperation(const std::size_t numBits)
564 : IntegerBinaryOperation(numBits, numBits)
565 {}
566
567 bool
568 operator==(const Operation & other) const noexcept override;
569
570 std::string
571 debug_string() const override;
572
573 [[nodiscard]] std::unique_ptr<Operation>
574 copy() const override;
575
577 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
578 const noexcept override;
579
582 const override;
583
584 enum flags
585 flags() const noexcept override;
586
587 static rvsdg::Node &
588 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
589 {
590 return rvsdg::CreateOpNode<IntegerShlOperation>({ &operand1, &operand2 }, numBits);
591 }
592
603 static std::optional<std::vector<rvsdg::Output *>>
605 const IntegerShlOperation & operation,
606 const std::vector<rvsdg::Output *> & operands);
607};
608
615{
616public:
617 ~IntegerLShrOperation() noexcept override;
618
619 explicit IntegerLShrOperation(const std::size_t numBits)
620 : IntegerBinaryOperation(numBits, numBits)
621 {}
622
623 bool
624 operator==(const Operation & other) const noexcept override;
625
626 std::string
627 debug_string() const override;
628
629 [[nodiscard]] std::unique_ptr<Operation>
630 copy() const override;
631
633 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
634 const noexcept override;
635
638 const override;
639
640 enum flags
641 flags() const noexcept override;
642
643 static rvsdg::Node &
644 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
645 {
646 return rvsdg::CreateOpNode<IntegerLShrOperation>({ &operand1, &operand2 }, numBits);
647 }
648
659 static std::optional<std::vector<rvsdg::Output *>>
661 const IntegerLShrOperation & operation,
662 const std::vector<rvsdg::Output *> & operands);
663};
664
671{
672public:
673 ~IntegerAndOperation() noexcept override;
674
675 explicit IntegerAndOperation(const std::size_t numBits)
676 : IntegerBinaryOperation(numBits, numBits)
677 {}
678
679 bool
680 operator==(const Operation & other) const noexcept override;
681
682 std::string
683 debug_string() const override;
684
685 [[nodiscard]] std::unique_ptr<Operation>
686 copy() const override;
687
689 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
690 const noexcept override;
691
694 const override;
695
696 enum flags
697 flags() const noexcept override;
698
699 static rvsdg::Node &
700 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
701 {
702 return rvsdg::CreateOpNode<IntegerAndOperation>({ &operand1, &operand2 }, numBits);
703 }
704
715 static std::optional<std::vector<rvsdg::Output *>>
717 const IntegerAndOperation & operation,
718 const std::vector<rvsdg::Output *> & operands);
719};
720
727{
728public:
729 ~IntegerOrOperation() noexcept override;
730
731 explicit IntegerOrOperation(const std::size_t numBits)
732 : IntegerBinaryOperation(numBits, numBits)
733 {}
734
735 bool
736 operator==(const Operation & other) const noexcept override;
737
738 std::string
739 debug_string() const override;
740
741 [[nodiscard]] std::unique_ptr<Operation>
742 copy() const override;
743
745 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
746 const noexcept override;
747
750 const override;
751
752 enum flags
753 flags() const noexcept override;
754
755 static rvsdg::Node &
756 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
757 {
758 return rvsdg::CreateOpNode<IntegerOrOperation>({ &operand1, &operand2 }, numBits);
759 }
760
771 static std::optional<std::vector<rvsdg::Output *>>
773 const IntegerOrOperation & operation,
774 const std::vector<rvsdg::Output *> & operands);
775
789 static std::optional<std::vector<rvsdg::Output *>>
791 const IntegerOrOperation & operation,
792 const std::vector<rvsdg::Output *> & operands);
793};
794
801{
802public:
803 ~IntegerXorOperation() noexcept override;
804
805 explicit IntegerXorOperation(const std::size_t numBits)
806 : IntegerBinaryOperation(numBits, numBits)
807 {}
808
809 bool
810 operator==(const Operation & other) const noexcept override;
811
812 std::string
813 debug_string() const override;
814
815 [[nodiscard]] std::unique_ptr<Operation>
816 copy() const override;
817
819 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
820 const noexcept override;
821
824 const override;
825
826 enum flags
827 flags() const noexcept override;
828
829 static rvsdg::Node &
830 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
831 {
832 return rvsdg::CreateOpNode<IntegerXorOperation>({ &operand1, &operand2 }, numBits);
833 }
834
845 static std::optional<std::vector<rvsdg::Output *>>
847 const IntegerXorOperation & operation,
848 const std::vector<rvsdg::Output *> & operands);
849};
850
857{
858public:
859 ~IntegerEqOperation() noexcept override;
860
861 explicit IntegerEqOperation(const std::size_t numBits)
862 : IntegerBinaryOperation(numBits, 1)
863 {}
864
865 bool
866 operator==(const Operation & other) const noexcept override;
867
868 std::string
869 debug_string() const override;
870
871 [[nodiscard]] std::unique_ptr<Operation>
872 copy() const override;
873
875 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
876 const noexcept override;
877
880 const override;
881
882 enum flags
883 flags() const noexcept override;
884
885 static rvsdg::Node &
886 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
887 {
888 return rvsdg::CreateOpNode<IntegerEqOperation>({ &operand1, &operand2 }, numBits);
889 }
890
901 static std::optional<std::vector<rvsdg::Output *>>
903 const IntegerEqOperation & operation,
904 const std::vector<rvsdg::Output *> & operands);
905
918 static std::optional<std::vector<rvsdg::Output *>>
920 const IntegerEqOperation & operation,
921 const std::vector<rvsdg::Output *> & operands);
922};
923
930{
931public:
932 ~IntegerNeOperation() noexcept override;
933
934 explicit IntegerNeOperation(const std::size_t numBits)
935 : IntegerBinaryOperation(numBits, 1)
936 {}
937
938 bool
939 operator==(const Operation & other) const noexcept override;
940
941 std::string
942 debug_string() const override;
943
944 [[nodiscard]] std::unique_ptr<Operation>
945 copy() const override;
946
948 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
949 const noexcept override;
950
953 const override;
954
955 enum flags
956 flags() const noexcept override;
957
958 static rvsdg::Node &
959 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
960 {
961 return rvsdg::CreateOpNode<IntegerNeOperation>({ &operand1, &operand2 }, numBits);
962 }
963
974 static std::optional<std::vector<rvsdg::Output *>>
976 const IntegerNeOperation & operation,
977 const std::vector<rvsdg::Output *> & operands);
978
991 static std::optional<std::vector<rvsdg::Output *>>
993 const IntegerNeOperation & operation,
994 const std::vector<rvsdg::Output *> & operands);
995};
996
1003{
1004public:
1005 ~IntegerSgeOperation() noexcept override;
1006
1007 explicit IntegerSgeOperation(const std::size_t numBits)
1008 : IntegerBinaryOperation(numBits, 1)
1009 {}
1010
1011 bool
1012 operator==(const Operation & other) const noexcept override;
1013
1014 std::string
1015 debug_string() const override;
1016
1017 [[nodiscard]] std::unique_ptr<Operation>
1018 copy() const override;
1019
1021 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1022 const noexcept override;
1023
1026 const override;
1027
1028 enum flags
1029 flags() const noexcept override;
1030
1031 static rvsdg::Node &
1032 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1033 {
1034 return rvsdg::CreateOpNode<IntegerSgeOperation>({ &operand1, &operand2 }, numBits);
1035 }
1036
1047 static std::optional<std::vector<rvsdg::Output *>>
1049 const IntegerSgeOperation & operation,
1050 const std::vector<rvsdg::Output *> & operands);
1051
1064 static std::optional<std::vector<rvsdg::Output *>>
1066 const IntegerSgeOperation & operation,
1067 const std::vector<rvsdg::Output *> & operands);
1068};
1069
1076{
1077public:
1078 ~IntegerSgtOperation() noexcept override;
1079
1080 explicit IntegerSgtOperation(const std::size_t numBits)
1081 : IntegerBinaryOperation(numBits, 1)
1082 {}
1083
1084 bool
1085 operator==(const Operation & other) const noexcept override;
1086
1087 std::string
1088 debug_string() const override;
1089
1090 [[nodiscard]] std::unique_ptr<Operation>
1091 copy() const override;
1092
1094 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1095 const noexcept override;
1096
1099 const override;
1100
1101 enum flags
1102 flags() const noexcept override;
1103
1104 static rvsdg::Node &
1105 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1106 {
1107 return rvsdg::CreateOpNode<IntegerSgtOperation>({ &operand1, &operand2 }, numBits);
1108 }
1109
1120 static std::optional<std::vector<rvsdg::Output *>>
1122 const IntegerSgtOperation & operation,
1123 const std::vector<rvsdg::Output *> & operands);
1124
1137 static std::optional<std::vector<rvsdg::Output *>>
1139 const IntegerSgtOperation & operation,
1140 const std::vector<rvsdg::Output *> & operands);
1141};
1142
1149{
1150public:
1151 ~IntegerSleOperation() noexcept override;
1152
1153 explicit IntegerSleOperation(const std::size_t numBits)
1154 : IntegerBinaryOperation(numBits, 1)
1155 {}
1156
1157 bool
1158 operator==(const Operation & other) const noexcept override;
1159
1160 std::string
1161 debug_string() const override;
1162
1163 [[nodiscard]] std::unique_ptr<Operation>
1164 copy() const override;
1165
1167 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1168 const noexcept override;
1169
1172 const override;
1173
1174 enum flags
1175 flags() const noexcept override;
1176
1177 static rvsdg::Node &
1178 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1179 {
1180 return rvsdg::CreateOpNode<IntegerSleOperation>({ &operand1, &operand2 }, numBits);
1181 }
1182
1193 static std::optional<std::vector<rvsdg::Output *>>
1195 const IntegerSleOperation & operation,
1196 const std::vector<rvsdg::Output *> & operands);
1197
1210 static std::optional<std::vector<rvsdg::Output *>>
1212 const IntegerSleOperation & operation,
1213 const std::vector<rvsdg::Output *> & operands);
1214};
1215
1222{
1223public:
1224 ~IntegerSltOperation() noexcept override;
1225
1226 explicit IntegerSltOperation(const std::size_t numBits)
1227 : IntegerBinaryOperation(numBits, 1)
1228 {}
1229
1230 bool
1231 operator==(const Operation & other) const noexcept override;
1232
1233 std::string
1234 debug_string() const override;
1235
1236 [[nodiscard]] std::unique_ptr<Operation>
1237 copy() const override;
1238
1240 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1241 const noexcept override;
1242
1245 const override;
1246
1247 enum flags
1248 flags() const noexcept override;
1249
1250 static rvsdg::Node &
1251 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1252 {
1253 return rvsdg::CreateOpNode<IntegerSltOperation>({ &operand1, &operand2 }, numBits);
1254 }
1255
1266 static std::optional<std::vector<rvsdg::Output *>>
1268 const IntegerSltOperation & operation,
1269 const std::vector<rvsdg::Output *> & operands);
1270
1283 static std::optional<std::vector<rvsdg::Output *>>
1285 const IntegerSltOperation & operation,
1286 const std::vector<rvsdg::Output *> & operands);
1287};
1288
1295{
1296public:
1297 ~IntegerUgeOperation() noexcept override;
1298
1299 explicit IntegerUgeOperation(const std::size_t numBits)
1300 : IntegerBinaryOperation(numBits, 1)
1301 {}
1302
1303 bool
1304 operator==(const Operation & other) const noexcept override;
1305
1306 std::string
1307 debug_string() const override;
1308
1309 [[nodiscard]] std::unique_ptr<Operation>
1310 copy() const override;
1311
1313 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1314 const noexcept override;
1315
1318 const override;
1319
1320 enum flags
1321 flags() const noexcept override;
1322
1323 static rvsdg::Node &
1324 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1325 {
1326 return rvsdg::CreateOpNode<IntegerUgeOperation>({ &operand1, &operand2 }, numBits);
1327 }
1328
1339 static std::optional<std::vector<rvsdg::Output *>>
1341 const IntegerUgeOperation & operation,
1342 const std::vector<rvsdg::Output *> & operands);
1343
1356 static std::optional<std::vector<rvsdg::Output *>>
1358 const IntegerUgeOperation & operation,
1359 const std::vector<rvsdg::Output *> & operands);
1360};
1361
1368{
1369public:
1370 ~IntegerUgtOperation() noexcept override;
1371
1372 explicit IntegerUgtOperation(const std::size_t numBits)
1373 : IntegerBinaryOperation(numBits, 1)
1374 {}
1375
1376 bool
1377 operator==(const Operation & other) const noexcept override;
1378
1379 std::string
1380 debug_string() const override;
1381
1382 [[nodiscard]] std::unique_ptr<Operation>
1383 copy() const override;
1384
1386 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1387 const noexcept override;
1388
1391 const override;
1392
1393 enum flags
1394 flags() const noexcept override;
1395
1396 static rvsdg::Node &
1397 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1398 {
1399 return rvsdg::CreateOpNode<IntegerUgtOperation>({ &operand1, &operand2 }, numBits);
1400 }
1401
1412 static std::optional<std::vector<rvsdg::Output *>>
1414 const IntegerUgtOperation & operation,
1415 const std::vector<rvsdg::Output *> & operands);
1416
1429 static std::optional<std::vector<rvsdg::Output *>>
1431 const IntegerUgtOperation & operation,
1432 const std::vector<rvsdg::Output *> & operands);
1433};
1434
1441{
1442public:
1443 ~IntegerUleOperation() noexcept override;
1444
1445 explicit IntegerUleOperation(const std::size_t numBits)
1446 : IntegerBinaryOperation(numBits, 1)
1447 {}
1448
1449 bool
1450 operator==(const Operation & other) const noexcept override;
1451
1452 std::string
1453 debug_string() const override;
1454
1455 [[nodiscard]] std::unique_ptr<Operation>
1456 copy() const override;
1457
1459 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1460 const noexcept override;
1461
1464 const override;
1465
1466 enum flags
1467 flags() const noexcept override;
1468
1469 static rvsdg::Node &
1470 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1471 {
1472 return rvsdg::CreateOpNode<IntegerUleOperation>({ &operand1, &operand2 }, numBits);
1473 }
1474
1485 static std::optional<std::vector<rvsdg::Output *>>
1487 const IntegerUleOperation & operation,
1488 const std::vector<rvsdg::Output *> & operands);
1489
1502 static std::optional<std::vector<rvsdg::Output *>>
1504 const IntegerUleOperation & operation,
1505 const std::vector<rvsdg::Output *> & operands);
1506};
1507
1514{
1515public:
1516 ~IntegerUltOperation() noexcept override;
1517
1518 explicit IntegerUltOperation(const std::size_t numBits)
1519 : IntegerBinaryOperation(numBits, 1)
1520 {}
1521
1522 bool
1523 operator==(const Operation & other) const noexcept override;
1524
1525 std::string
1526 debug_string() const override;
1527
1528 [[nodiscard]] std::unique_ptr<Operation>
1529 copy() const override;
1530
1532 can_reduce_operand_pair(const rvsdg::Output * op1, const rvsdg::Output * op2)
1533 const noexcept override;
1534
1537 const override;
1538
1539 enum flags
1540 flags() const noexcept override;
1541
1542 static rvsdg::Node &
1543 createNode(const size_t numBits, rvsdg::Output & operand1, rvsdg::Output & operand2)
1544 {
1545 return rvsdg::CreateOpNode<IntegerUltOperation>({ &operand1, &operand2 }, numBits);
1546 }
1547
1558 static std::optional<std::vector<rvsdg::Output *>>
1560 const IntegerUltOperation & operation,
1561 const std::vector<rvsdg::Output *> & operands);
1562
1575 static std::optional<std::vector<rvsdg::Output *>>
1577 const IntegerUltOperation & operation,
1578 const std::vector<rvsdg::Output *> & operands);
1579};
1580
1581}
1582
1583#endif // JLM_LLVM_IR_OPERATORS_INTEGEROPERATIONS_HPP
std::unique_ptr< Operation > copy() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerAShrOperation &operation, const std::vector< rvsdg::Output * > &operands)
bool operator==(const Operation &other) const noexcept override
std::string debug_string() const override
enum flags flags() const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
~IntegerAShrOperation() noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
bool operator==(const Operation &other) const noexcept override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
enum flags flags() const noexcept override
~IntegerAddOperation() noexcept override
std::string debug_string() const override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerAddOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
std::unique_ptr< Operation > copy() const override
enum flags flags() const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerAndOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
bool operator==(const Operation &other) const noexcept override
~IntegerAndOperation() noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
~IntegerBinaryOperation() noexcept override
const rvsdg::BitType & Type() const noexcept
static rvsdg::Node & Create(rvsdg::Region &region, IntegerValueRepresentation representation)
bool operator==(const Operation &other) const noexcept override
IntegerValueRepresentation Representation_
static rvsdg::Node & Create(rvsdg::Region &region, std::size_t numBits, std::int64_t value)
IntegerConstantOperation(IntegerValueRepresentation representation)
const IntegerValueRepresentation & Representation() const noexcept
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
enum flags flags() const noexcept override
std::string debug_string() const override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerEqOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerEqOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
~IntegerEqOperation() noexcept override
bool operator==(const Operation &other) const noexcept override
~IntegerLShrOperation() noexcept override
bool operator==(const Operation &other) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerLShrOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
enum flags flags() const noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
bool operator==(const Operation &other) const noexcept override
~IntegerMulOperation() noexcept override
std::string debug_string() const override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerMulOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
enum flags flags() const noexcept override
bool operator==(const Operation &other) const noexcept override
std::string debug_string() const override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerNeOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
enum flags flags() const noexcept override
~IntegerNeOperation() noexcept override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerNeOperation &operation, const std::vector< rvsdg::Output * > &operands)
bool operator==(const Operation &other) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerOrOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
~IntegerOrOperation() noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
enum flags flags() const noexcept override
std::string debug_string() const override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdempotent(const IntegerOrOperation &operation, const std::vector< rvsdg::Output * > &operands)
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerSDivOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
~IntegerSDivOperation() noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
std::unique_ptr< Operation > copy() const override
bool operator==(const Operation &other) const noexcept override
enum flags flags() const noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerSRemOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
bool operator==(const Operation &other) const noexcept override
~IntegerSRemOperation() noexcept override
std::unique_ptr< Operation > copy() const override
enum flags flags() const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerSgeOperation &operation, const std::vector< rvsdg::Output * > &operands)
enum flags flags() const noexcept override
bool operator==(const Operation &other) const noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~IntegerSgeOperation() noexcept override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerSgeOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerSgtOperation &operation, const std::vector< rvsdg::Output * > &operands)
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
bool operator==(const Operation &other) const noexcept override
std::string debug_string() const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
std::unique_ptr< Operation > copy() const override
enum flags flags() const noexcept override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerSgtOperation &operation, const std::vector< rvsdg::Output * > &operands)
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
~IntegerSgtOperation() noexcept override
std::unique_ptr< Operation > copy() const override
~IntegerShlOperation() noexcept override
enum flags flags() const noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
std::string debug_string() const override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerShlOperation &operation, const std::vector< rvsdg::Output * > &operands)
bool operator==(const Operation &other) const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
std::string debug_string() const override
enum flags flags() const noexcept override
~IntegerSleOperation() noexcept override
std::unique_ptr< Operation > copy() const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerSleOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerSleOperation &operation, const std::vector< rvsdg::Output * > &operands)
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
bool operator==(const Operation &other) const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
bool operator==(const Operation &other) const noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
std::unique_ptr< Operation > copy() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
std::string debug_string() const override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerSltOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerSltOperation &operation, const std::vector< rvsdg::Output * > &operands)
enum flags flags() const noexcept override
~IntegerSltOperation() noexcept override
~IntegerSubOperation() noexcept override
bool operator==(const Operation &other) const noexcept override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
std::string debug_string() const override
enum flags flags() const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerSubOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::optional< std::vector< rvsdg::Output * > > normalizeAdditiveInverse(const IntegerSubOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
bool operator==(const Operation &other) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerUDivOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
~IntegerUDivOperation() noexcept override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
enum flags flags() const noexcept override
std::unique_ptr< Operation > copy() const override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
bool operator==(const Operation &other) const noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
enum flags flags() const noexcept override
~IntegerURemOperation() noexcept override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerURemOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerUgeOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerUgeOperation &operation, const std::vector< rvsdg::Output * > &operands)
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
std::unique_ptr< Operation > copy() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
~IntegerUgeOperation() noexcept override
bool operator==(const Operation &other) const noexcept override
enum flags flags() const noexcept override
bool operator==(const Operation &other) const noexcept override
enum flags flags() const noexcept override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerUgtOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
~IntegerUgtOperation() noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerUgtOperation &operation, const std::vector< rvsdg::Output * > &operands)
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
enum flags flags() const noexcept override
std::string debug_string() const override
bool operator==(const Operation &other) const noexcept override
~IntegerUleOperation() noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerUleOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerUleOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
enum flags flags() const noexcept override
std::string debug_string() const override
~IntegerUltOperation() noexcept override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
bool operator==(const Operation &other) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > normalizeIdenticalOperands(const IntegerUltOperation &operation, const std::vector< rvsdg::Output * > &operands)
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerUltOperation &operation, const std::vector< rvsdg::Output * > &operands)
static rvsdg::Node & createNode(const size_t numBits, rvsdg::Output &operand1, rvsdg::Output &operand2)
std::string debug_string() const override
rvsdg::Output * reduce_operand_pair(rvsdg::binop_reduction_path_t path, rvsdg::Output *op1, rvsdg::Output *op2) const override
~IntegerXorOperation() noexcept override
enum flags flags() const noexcept override
bool operator==(const Operation &other) const noexcept override
static std::optional< std::vector< rvsdg::Output * > > foldConstants(const IntegerXorOperation &operation, const std::vector< rvsdg::Output * > &operands)
std::unique_ptr< Operation > copy() const override
rvsdg::binop_reduction_path_t can_reduce_operand_pair(const rvsdg::Output *op1, const rvsdg::Output *op2) const noexcept override
static std::shared_ptr< const BitType > Create(std::size_t nbits)
Creates bit type of specified width.
Definition type.cpp:45
Nullary operator (operator taking no formal arguments)
Definition nullary.hpp:22
NullaryOperation(std::shared_ptr< const Type > resultType)
Definition nullary.hpp:26
Represent acyclic RVSDG subgraphs.
Definition region.hpp:213
const std::shared_ptr< const rvsdg::Type > & argument(size_t index) const noexcept
Definition operation.cpp:23
Global memory state passed between functions.
size_t binop_reduction_path_t
Definition binary.hpp:19
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
Definition node.hpp:872