Jlm
Loading...
Searching...
No Matches
operators.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2014 2015 Nico Reißmann <nico.reissmann@gmail.com>
3 * See COPYING for terms of redistribution.
4 */
5
10#include <jlm/rvsdg/delta.hpp>
11#include <jlm/rvsdg/lambda.hpp>
12#include <jlm/rvsdg/Trace.hpp>
14
15#include <llvm/ADT/SmallVector.h>
16#include <llvm/IR/InstrTypes.h>
17#include <stdexcept>
18
19namespace jlm::llvm
20{
21
22SsaPhiOperation::~SsaPhiOperation() noexcept = default;
23
24bool
25SsaPhiOperation::operator==(const Operation & other) const noexcept
26{
27 const auto op = dynamic_cast<const SsaPhiOperation *>(&other);
28 return op && op->IncomingNodes_ == IncomingNodes_ && op->result(0) == result(0);
29}
30
31std::string
33{
34 std::string str("[");
35 for (size_t n = 0; n < narguments(); n++)
36 {
38 if (n != narguments() - 1)
39 str += ", ";
40 }
41 str += "]";
42
43 return "PHI" + str;
44}
45
46std::unique_ptr<rvsdg::Operation>
48{
49 return std::make_unique<SsaPhiOperation>(*this);
50}
51
53
54bool
55AssignmentOperation::operator==(const Operation & other) const noexcept
56{
57 const auto op = dynamic_cast<const AssignmentOperation *>(&other);
58 return op && op->argument(0) == argument(0);
59}
60
61std::string
63{
64 return "ASSIGN";
65}
66
67std::unique_ptr<rvsdg::Operation>
69{
70 return std::make_unique<AssignmentOperation>(*this);
71}
72
73SelectOperation::~SelectOperation() noexcept = default;
74
75bool
76SelectOperation::operator==(const Operation & other) const noexcept
77{
78 const auto op = dynamic_cast<const SelectOperation *>(&other);
79 return op && op->result(0) == result(0);
80}
81
82std::string
84{
85 return "Select";
86}
87
88std::unique_ptr<rvsdg::Operation>
90{
91 return std::make_unique<SelectOperation>(*this);
92}
93
95
96bool
97VectorSelectOperation::operator==(const Operation & other) const noexcept
98{
99 const auto op = dynamic_cast<const VectorSelectOperation *>(&other);
100 return op && op->type() == type();
101}
102
103std::string
105{
106 return "VectorSelect";
107}
108
109std::unique_ptr<rvsdg::Operation>
111{
112 return std::make_unique<VectorSelectOperation>(*this);
113}
114
115BranchOperation::~BranchOperation() noexcept = default;
116
117bool
118BranchOperation::operator==(const Operation & other) const noexcept
119{
120 const auto op = dynamic_cast<const BranchOperation *>(&other);
121 return op && op->argument(0) == argument(0);
122}
123
124std::string
126{
127 return "Branch";
128}
129
130std::unique_ptr<rvsdg::Operation>
132{
133 return std::make_unique<BranchOperation>(*this);
134}
135
137
138bool
139ConstantPointerNullOperation::operator==(const Operation & other) const noexcept
140{
141 return dynamic_cast<const ConstantPointerNullOperation *>(&other);
142}
143
144std::string
146{
147 return "ConstantPointerNull";
148}
149
150std::unique_ptr<rvsdg::Operation>
152{
153 return std::make_unique<ConstantPointerNullOperation>(*this);
154}
155
157
158bool
159ConstantDataArrayOperation::operator==(const Operation & other) const noexcept
160{
161 const auto op = dynamic_cast<const ConstantDataArrayOperation *>(&other);
162 return op && op->result(0) == result(0);
163}
164
165std::string
167{
168 return "ConstantDataArray";
169}
170
171std::unique_ptr<rvsdg::Operation>
173{
174 return std::make_unique<ConstantDataArrayOperation>(*this);
175}
176
179{
181 { ::llvm::CmpInst::ICMP_EQ, ICmpPredicate::Eq },
182 { ::llvm::CmpInst::ICMP_NE, ICmpPredicate::Ne },
183 { ::llvm::CmpInst::ICMP_UGT, ICmpPredicate::Ugt },
184 { ::llvm::CmpInst::ICMP_UGE, ICmpPredicate::Uge },
185 { ::llvm::CmpInst::ICMP_ULT, ICmpPredicate::Ult },
186 { ::llvm::CmpInst::ICMP_ULE, ICmpPredicate::Ule },
187 { ::llvm::CmpInst::ICMP_SGT, ICmpPredicate::Sgt },
188 { ::llvm::CmpInst::ICMP_SGE, ICmpPredicate::Sge },
189 { ::llvm::CmpInst::ICMP_SLT, ICmpPredicate::Slt },
190 { ::llvm::CmpInst::ICMP_SLE, ICmpPredicate::Sle },
191 };
192 return map;
193}
194
196convertICmpPredicateToJlm(::llvm::CmpInst::Predicate predicate)
197{
198 const auto & map = getICmpPredicateMap();
199 return map.LookupKey(predicate);
200}
201
202[[nodiscard]] ::llvm::CmpInst::Predicate
204{
205 const auto & map = getICmpPredicateMap();
206 return map.LookupValue(predicate);
207}
208
209[[nodiscard]] std::string_view
211{
212 switch (predicate)
213 {
215 return "eq";
217 return "ne";
219 return "ugt";
221 return "uge";
223 return "ult";
225 return "ule";
227 return "sgt";
229 return "sge";
231 return "slt";
233 return "sle";
234 default:
235 throw std::runtime_error("Unknown ICmpPredicate");
236 }
237}
238
239PtrCmpOperation::~PtrCmpOperation() noexcept = default;
240
241bool
242PtrCmpOperation::operator==(const Operation & other) const noexcept
243{
244 auto op = dynamic_cast<const PtrCmpOperation *>(&other);
245 return op && op->argument(0) == argument(0) && op->predicate_ == predicate_;
246}
247
248std::string
250{
251 return util::strfmt("PtrCmp[", iCmpPredicateToString(predicate_), "]");
252}
253
254std::unique_ptr<rvsdg::Operation>
256{
257 return std::make_unique<PtrCmpOperation>(*this);
258}
259
266
275
276template<typename TOperation>
277static bool
279{
280 auto [node, operation] = rvsdg::TryGetSimpleNodeAndOptionalOp<TOperation>(operand);
281 return operation != nullptr;
282}
283
284static bool
286{
287 if (isOutputOf<AllocaOperation>(output))
288 {
289 return true;
290 }
291
293 {
294 return true;
295 }
296
297 if (dynamic_cast<const LlvmGraphImport *>(&output))
298 {
299 return true;
300 }
301
302 auto [fnToPtrNode, fnToPtrOperation] =
304 if (fnToPtrOperation != nullptr)
305 {
306 const auto & tracedOutput =
307 rvsdg::traceOutputIntraProcedurally(*fnToPtrNode->input(0)->origin());
309 {
310 return true;
311 }
312 }
313
314 return false;
315}
316
317std::optional<std::vector<rvsdg::Output *>>
319 const PtrCmpOperation & ptrCmpOperation,
320 const std::vector<rvsdg::Output *> & operands)
321{
322 if (ptrCmpOperation.predicate() != ICmpPredicate::Eq
323 && ptrCmpOperation.predicate() != ICmpPredicate::Ne)
324 return std::nullopt;
325
326 JLM_ASSERT(operands.size() == 2);
327 auto & tracedOperand1 = rvsdg::traceOutputIntraProcedurally(*operands[0]);
328 auto & tracedOperand2 = rvsdg::traceOutputIntraProcedurally(*operands[1]);
329
330 const bool hasRequiredOperands =
331 (isOutputOf<ConstantPointerNullOperation>(tracedOperand1) && isAllocationSide(tracedOperand2))
332 || (isOutputOf<ConstantPointerNullOperation>(tracedOperand2)
333 && isAllocationSide(tracedOperand1));
334 if (hasRequiredOperands)
335 {
336 auto & region = *operands[0]->region();
337 switch (ptrCmpOperation.predicate())
338 {
342 return std::vector<rvsdg::Output *>{
344 };
345 default:
346 throw std::logic_error("Unhandled predicate!");
347 }
348 }
349
350 return std::nullopt;
351}
352
353ConstantFP::~ConstantFP() noexcept = default;
354
355bool
356ConstantFP::operator==(const Operation & other) const noexcept
357{
358 auto op = dynamic_cast<const ConstantFP *>(&other);
359 return op && size() == op->size() && constant().bitwiseIsEqual(op->constant());
360}
361
362std::string
364{
365 ::llvm::SmallVector<char, 32> v;
366 constant().toString(v, 32, 0);
367
368 std::string s("FP(");
369 for (const auto & c : v)
370 s += c;
371 s += ")";
372
373 return s;
374}
375
376std::unique_ptr<rvsdg::Operation>
378{
379 return std::make_unique<ConstantFP>(*this);
380}
381
382FCmpOperation::~FCmpOperation() noexcept = default;
383
384bool
385FCmpOperation::operator==(const Operation & other) const noexcept
386{
387 auto op = dynamic_cast<const FCmpOperation *>(&other);
388 return op && op->argument(0) == argument(0) && op->cmp_ == cmp_;
389}
390
391std::string
393{
394 static std::unordered_map<fpcmp, std::string> map({ { fpcmp::oeq, "oeq" },
395 { fpcmp::ogt, "ogt" },
396 { fpcmp::oge, "oge" },
397 { fpcmp::olt, "olt" },
398 { fpcmp::ole, "ole" },
399 { fpcmp::one, "one" },
400 { fpcmp::ord, "ord" },
401 { fpcmp::ueq, "ueq" },
402 { fpcmp::ugt, "ugt" },
403 { fpcmp::uge, "uge" },
404 { fpcmp::ult, "ult" },
405 { fpcmp::ule, "ule" },
406 { fpcmp::une, "une" },
407 { fpcmp::uno, "uno" } });
408
409 JLM_ASSERT(map.find(cmp()) != map.end());
410 return "FCmp " + map[cmp()];
411}
412
413std::unique_ptr<rvsdg::Operation>
415{
416 return std::make_unique<FCmpOperation>(*this);
417}
418
424
431
433
434bool
435UndefValueOperation::operator==(const Operation & other) const noexcept
436{
437 auto op = dynamic_cast<const UndefValueOperation *>(&other);
438 return op && op->GetType() == GetType();
439}
440
441std::string
443{
444 return "undef";
445}
446
447std::unique_ptr<rvsdg::Operation>
449{
450 return std::make_unique<UndefValueOperation>(*this);
451}
452
454
455bool
456PoisonValueOperation::operator==(const Operation & other) const noexcept
457{
458 auto operation = dynamic_cast<const PoisonValueOperation *>(&other);
459 return operation && operation->GetType() == GetType();
460}
461
462std::string
464{
465 return "poison";
466}
467
468std::unique_ptr<rvsdg::Operation>
470{
471 return std::make_unique<PoisonValueOperation>(*this);
472}
473
474FreezeOperation::~FreezeOperation() noexcept = default;
475
476bool
477FreezeOperation::operator==(const Operation & other) const noexcept
478{
479 auto operation = dynamic_cast<const FreezeOperation *>(&other);
480 return operation && operation->getType() == getType();
481}
482
483std::string
485{
486 return "freeze";
487}
488
489std::unique_ptr<rvsdg::Operation>
491{
492 return std::make_unique<FreezeOperation>(*this);
493}
494
495FBinaryOperation::~FBinaryOperation() noexcept = default;
496
497bool
498FBinaryOperation::operator==(const Operation & other) const noexcept
499{
500 auto op = dynamic_cast<const FBinaryOperation *>(&other);
501 return op && op->fpop() == fpop() && op->size() == size();
502}
503
504std::string
506{
507 static std::unordered_map<llvm::fpop, std::string> map({ { fpop::add, "add" },
508 { fpop::sub, "sub" },
509 { fpop::mul, "mul" },
510 { fpop::div, "div" },
511 { fpop::mod, "mod" } });
512
513 JLM_ASSERT(map.find(fpop()) != map.end());
514 return "FPOP " + map[fpop()];
515}
516
517std::unique_ptr<rvsdg::Operation>
519{
520 return std::make_unique<FBinaryOperation>(*this);
521}
522
529
538
539FNegOperation::~FNegOperation() noexcept = default;
540
541bool
542FNegOperation::operator==(const Operation & other) const noexcept
543{
544 const auto op = dynamic_cast<const FNegOperation *>(&other);
545 return op && op->size() == size();
546}
547
548std::string
550{
551 return "FNeg";
552}
553
554std::unique_ptr<rvsdg::Operation>
556{
557 return std::make_unique<FNegOperation>(*this);
558}
559
561
562bool
563VariadicArgumentListOperation::operator==(const Operation & other) const noexcept
564{
565 auto op = dynamic_cast<const VariadicArgumentListOperation *>(&other);
566 if (!op || op->narguments() != narguments())
567 return false;
568
569 for (size_t n = 0; n < narguments(); n++)
570 {
571 if (op->argument(n) != argument(n))
572 return false;
573 }
574
575 return true;
576}
577
578std::string
580{
581 return "VariadicArguments";
582}
583
584std::unique_ptr<rvsdg::Operation>
586{
587 return std::make_unique<VariadicArgumentListOperation>(*this);
588}
589
591
592bool
593ConstantStructOperation::operator==(const Operation & other) const noexcept
594{
595 auto op = dynamic_cast<const ConstantStructOperation *>(&other);
596 return op && op->result(0) == result(0);
597}
598
599std::string
601{
602 const auto name = type().IsLiteral() ? "" : type().GetName();
603 return util::strfmt("ConstantStruct[", name, "]");
604}
605
606std::unique_ptr<rvsdg::Operation>
608{
609 return std::make_unique<ConstantStructOperation>(*this);
610}
611
613
614bool
615ConstantArrayOperation::operator==(const Operation & other) const noexcept
616{
617 const auto op = dynamic_cast<const ConstantArrayOperation *>(&other);
618 return op && op->result(0) == result(0);
619}
620
621std::string
623{
624 return "ConstantArray";
625}
626
627std::unique_ptr<rvsdg::Operation>
629{
630 return std::make_unique<ConstantArrayOperation>(*this);
631}
632
634
635bool
636ConstantAggregateZeroOperation::operator==(const Operation & other) const noexcept
637{
638 const auto op = dynamic_cast<const ConstantAggregateZeroOperation *>(&other);
639 return op && op->result(0) == result(0);
640}
641
642std::string
644{
645 return "ConstantAggregateZero";
646}
647
648std::unique_ptr<rvsdg::Operation>
650{
651 return std::make_unique<ConstantAggregateZeroOperation>(*this);
652}
653
655
656bool
657ExtractElementOperation::operator==(const Operation & other) const noexcept
658{
659 auto op = dynamic_cast<const ExtractElementOperation *>(&other);
660 return op && op->argument(0) == argument(0) && op->argument(1) == argument(1);
661}
662
663std::string
665{
666 return "ExtractElement";
667}
668
669std::unique_ptr<rvsdg::Operation>
671{
672 return std::make_unique<ExtractElementOperation>(*this);
673}
674
676
677bool
678ShuffleVectorOperation::operator==(const Operation & other) const noexcept
679{
680 auto op = dynamic_cast<const ShuffleVectorOperation *>(&other);
681 return op && op->argument(0) == argument(0) && op->Mask() == Mask();
682}
683
684std::string
686{
687 return "ShuffleVector";
688}
689
690std::unique_ptr<rvsdg::Operation>
692{
693 return std::make_unique<ShuffleVectorOperation>(*this);
694}
695
697
698bool
699ConstantVectorOperation::operator==(const Operation & other) const noexcept
700{
701 auto op = dynamic_cast<const ConstantVectorOperation *>(&other);
702 return op && op->result(0) == result(0);
703}
704
705std::string
707{
708 return "ConstantVector";
709}
710
711std::unique_ptr<rvsdg::Operation>
713{
714 return std::make_unique<ConstantVectorOperation>(*this);
715}
716
718
719bool
720InsertElementOperation::operator==(const Operation & other) const noexcept
721{
722 auto op = dynamic_cast<const InsertElementOperation *>(&other);
723 return op && op->argument(0) == argument(0) && op->argument(1) == argument(1)
724 && op->argument(2) == argument(2);
725}
726
727std::string
729{
730 return "InsertElement";
731}
732
733std::unique_ptr<rvsdg::Operation>
735{
736 return std::make_unique<InsertElementOperation>(*this);
737}
738
740
741bool
742VectorUnaryOperation::operator==(const Operation & other) const noexcept
743{
744 auto op = dynamic_cast<const VectorUnaryOperation *>(&other);
745 return op && op->operation() == operation();
746}
747
748std::string
750{
751 return util::strfmt("Vector", operation().debug_string());
752}
753
754std::unique_ptr<rvsdg::Operation>
756{
757 return std::make_unique<VectorUnaryOperation>(*this);
758}
759
761
762bool
763VectorBinaryOperation::operator==(const Operation & other) const noexcept
764{
765 auto op = dynamic_cast<const VectorBinaryOperation *>(&other);
766 return op && op->operation() == operation();
767}
768
769std::string
771{
772 return util::strfmt("Vector", operation().debug_string());
773}
774
775std::unique_ptr<rvsdg::Operation>
777{
778 return std::make_unique<VectorBinaryOperation>(*this);
779}
780
782
783bool
784ConstantDataVectorOperation::operator==(const Operation & other) const noexcept
785{
786 auto op = dynamic_cast<const ConstantDataVectorOperation *>(&other);
787 return op && op->result(0) == result(0);
788}
789
790std::string
792{
793 return "ConstantDataVector";
794}
795
796std::unique_ptr<rvsdg::Operation>
798{
799 return std::make_unique<ConstantDataVectorOperation>(*this);
800}
801
802MallocOperation::~MallocOperation() noexcept = default;
803
804bool
805MallocOperation::operator==(const Operation & other) const noexcept
806{
807 // Avoid CNE for malloc operator
808 return this == &other;
809}
810
811std::string
813{
814 return "Malloc";
815}
816
817std::unique_ptr<rvsdg::Operation>
819{
820 return std::make_unique<MallocOperation>(*this);
821}
822
823/* free operator */
824
825FreeOperation::~FreeOperation() noexcept = default;
826
827bool
828FreeOperation::operator==(const Operation & other) const noexcept
829{
830 // Avoid CNE for free operator
831 return this == &other;
832}
833
834std::string
836{
837 return "FREE";
838}
839
840std::unique_ptr<rvsdg::Operation>
842{
843 return std::make_unique<FreeOperation>(*this);
844}
845}
std::unique_ptr< Operation > copy() const override
Definition operators.cpp:68
~AssignmentOperation() noexcept override
std::string debug_string() const override
Definition operators.cpp:62
std::string debug_string() const override
~BranchOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::unique_ptr< Operation > copy() const override
~ConstantAggregateZeroOperation() noexcept override
std::string debug_string() const override
~ConstantArrayOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~ConstantDataArrayOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~ConstantDataVectorOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~ConstantFP() noexcept override
const fpsize & size() const noexcept
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
const ::llvm::APFloat & constant() const noexcept
ConstantPointerNullOperation class.
std::string debug_string() const override
~ConstantPointerNullOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::unique_ptr< Operation > copy() const override
~ConstantStructOperation() noexcept override
std::string debug_string() const override
const StructType & type() const noexcept
std::unique_ptr< Operation > copy() const override
~ConstantVectorOperation() noexcept override
std::string debug_string() const override
std::string debug_string() const override
~ExtractElementOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
jlm::rvsdg::binop_reduction_path_t can_reduce_operand_pair(const jlm::rvsdg::Output *op1, const jlm::rvsdg::Output *op2) const noexcept override
const llvm::fpop & fpop() const noexcept
std::unique_ptr< Operation > copy() const override
jlm::rvsdg::Output * reduce_operand_pair(jlm::rvsdg::binop_reduction_path_t path, jlm::rvsdg::Output *op1, jlm::rvsdg::Output *op2) const override
~FBinaryOperation() noexcept override
const fpcmp & cmp() const noexcept
jlm::rvsdg::binop_reduction_path_t can_reduce_operand_pair(const jlm::rvsdg::Output *op1, const jlm::rvsdg::Output *op2) const noexcept override
~FCmpOperation() noexcept override
std::string debug_string() const override
jlm::rvsdg::Output * reduce_operand_pair(jlm::rvsdg::binop_reduction_path_t path, jlm::rvsdg::Output *op1, jlm::rvsdg::Output *op2) const override
std::unique_ptr< Operation > copy() const override
std::unique_ptr< Operation > copy() const override
~FNegOperation() noexcept override
std::string debug_string() const override
const fpsize & size() const noexcept
std::unique_ptr< Operation > copy() const override
~FreeOperation() noexcept override
std::string debug_string() const override
FreezeOperation class.
std::string debug_string() const override
~FreezeOperation() noexcept override
std::unique_ptr< Operation > copy() const override
const jlm::rvsdg::Type & getType() const noexcept
std::string debug_string() const override
~InsertElementOperation() noexcept override
std::unique_ptr< Operation > copy() const override
static rvsdg::Node & Create(rvsdg::Region &region, IntegerValueRepresentation representation)
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~MallocOperation() noexcept override
PoisonValueOperation class.
~PoisonValueOperation() noexcept override
const jlm::rvsdg::Type & GetType() const noexcept
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
~PtrCmpOperation() noexcept override
ICmpPredicate predicate() const noexcept
jlm::rvsdg::binop_reduction_path_t can_reduce_operand_pair(const jlm::rvsdg::Output *op1, const jlm::rvsdg::Output *op2) const noexcept override
std::string debug_string() const override
jlm::rvsdg::Output * reduce_operand_pair(jlm::rvsdg::binop_reduction_path_t path, jlm::rvsdg::Output *op1, jlm::rvsdg::Output *op2) const override
std::unique_ptr< Operation > copy() const override
static std::optional< std::vector< rvsdg::Output * > > normalizeNullPointerComparison(const PtrCmpOperation &ptrCmpOperation, const std::vector< rvsdg::Output * > &operands)
std::string debug_string() const override
Definition operators.cpp:83
std::unique_ptr< Operation > copy() const override
Definition operators.cpp:89
~SelectOperation() noexcept override
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
~ShuffleVectorOperation() noexcept override
ControlFlowGraphNode * GetIncomingNode(size_t n) const noexcept
Definition operators.hpp:70
std::string debug_string() const override
Definition operators.cpp:32
std::unique_ptr< Operation > copy() const override
Definition operators.cpp:47
~SsaPhiOperation() noexcept override
std::vector< ControlFlowGraphNode * > IncomingNodes_
Definition operators.hpp:94
bool IsLiteral() const noexcept
Definition types.hpp:284
const std::string & GetName() const noexcept
Definition types.hpp:266
UndefValueOperation class.
~UndefValueOperation() noexcept override
std::string debug_string() const override
const rvsdg::Type & GetType() const noexcept
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~VariadicArgumentListOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
std::unique_ptr< Operation > copy() const override
const rvsdg::BinaryOperation & operation() const noexcept
~VectorBinaryOperation() noexcept override
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
const rvsdg::Type & type() const noexcept
~VectorSelectOperation() noexcept override
~VectorUnaryOperation() noexcept override
std::string debug_string() const override
const rvsdg::UnaryOperation & operation() const noexcept
std::unique_ptr< Operation > copy() const override
NodeOutput * output(size_t index) const noexcept
Definition node.hpp:650
const std::shared_ptr< const rvsdg::Type > & argument(size_t index) const noexcept
Definition operation.cpp:23
const std::shared_ptr< const rvsdg::Type > & result(size_t index) const noexcept
Definition operation.cpp:36
size_t narguments() const noexcept
Definition operation.cpp:17
#define JLM_ASSERT(x)
Definition common.hpp:16
#define JLM_UNREACHABLE(msg)
Definition common.hpp:43
Global memory state passed between functions.
ICmpPredicate convertICmpPredicateToJlm(::llvm::CmpInst::Predicate predicate)
std::string_view iCmpPredicateToString(ICmpPredicate predicate)
static bool isOutputOf(rvsdg::Output &operand)
static const util::BijectiveMap<::llvm::CmpInst::Predicate, ICmpPredicate > & getICmpPredicateMap()
static bool isAllocationSide(rvsdg::Output &output)
::llvm::CmpInst::Predicate convertICmpPredicateToLlvm(ICmpPredicate predicate)
static std::vector< jlm::rvsdg::Output * > outputs(const Node *node)
Definition node.hpp:1058
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
Output & traceOutputIntraProcedurally(Output &output)
Definition Trace.cpp:283
static const binop_reduction_path_t binop_reduction_none
Definition binary.hpp:203
static std::string strfmt(Args... args)
Definition strfmt.hpp:35