Jlm
comparison.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 2024 Helge Bahmann <hcb@chaoticmind.net>
3  * Copyright 2011 2012 2013 2014 Nico Reißmann <nico.reissmann@gmail.com>
4  * See COPYING for terms of redistribution.
5  */
6 
9 
10 namespace jlm::rvsdg
11 {
12 
13 struct reduce_eq
14 {
15  char
16  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
17  {
18  return arg1.eq(arg2);
19  }
20 };
21 
22 const char BitEqLabel[] = "BitEq";
23 template class MakeBitComparisonOperation<
24  reduce_eq,
25  BitEqLabel,
27 
28 struct reduce_ne
29 {
30  char
31  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
32  {
33  return arg1.ne(arg2);
34  }
35 };
36 
37 const char BitNeLabel[] = "BitNe";
38 template class MakeBitComparisonOperation<
39  reduce_ne,
40  BitNeLabel,
42 
43 struct reduce_sge
44 {
45  char
46  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
47  {
48  return arg1.sge(arg2);
49  }
50 };
51 
52 const char BitSgeLabel[] = "BitSge";
54 
55 struct reduce_sgt
56 {
57  char
58  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
59  {
60  return arg1.sgt(arg2);
61  }
62 };
63 
64 const char BitSgtLabel[] = "BitSgt";
66 
67 struct reduce_sle
68 {
69  char
70  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
71  {
72  return arg1.sle(arg2);
73  }
74 };
75 
76 const char BitSleLabel[] = "BitSle";
78 
79 struct reduce_slt
80 {
81  char
82  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
83  {
84  return arg1.slt(arg2);
85  }
86 };
87 
88 const char BitSltLabel[] = "BitSlt";
90 
91 struct reduce_uge
92 {
93  char
94  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
95  {
96  return arg1.uge(arg2);
97  }
98 };
99 
100 const char BitUgeLabel[] = "BitUge";
102 
104 {
105  char
106  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
107  {
108  return arg1.ugt(arg2);
109  }
110 };
111 
112 const char BitUgtLabel[] = "BitUgt";
114 
116 {
117  char
118  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
119  {
120  return arg1.ule(arg2);
121  }
122 };
123 
124 const char BitUleLabel[] = "BitUle";
126 
128 {
129  char
130  operator()(const BitValueRepresentation & arg1, const BitValueRepresentation & arg2) const
131  {
132  return arg1.ult(arg2);
133  }
134 };
135 
136 const char BitUltLabel[] = "BitUlt";
138 
139 }
char sgt(const BitValueRepresentation &other) const
char sge(const BitValueRepresentation &other) const
char ne(const BitValueRepresentation &other) const
char ule(const BitValueRepresentation &other) const
char ult(const BitValueRepresentation &other) const
char ugt(const BitValueRepresentation &other) const
char eq(const BitValueRepresentation &other) const
char slt(const BitValueRepresentation &other) const
char sle(const BitValueRepresentation &other) const
char uge(const BitValueRepresentation &other) const
const char BitNeLabel[]
Definition: comparison.cpp:37
const char BitUleLabel[]
Definition: comparison.cpp:124
const char BitSleLabel[]
Definition: comparison.cpp:76
const char BitEqLabel[]
Definition: comparison.cpp:22
const char BitUgeLabel[]
Definition: comparison.cpp:100
const char BitSltLabel[]
Definition: comparison.cpp:88
const char BitUgtLabel[]
Definition: comparison.cpp:112
const char BitSgtLabel[]
Definition: comparison.cpp:64
const char BitSgeLabel[]
Definition: comparison.cpp:52
const char BitUltLabel[]
Definition: comparison.cpp:136
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:16
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:31
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:46
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:58
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:70
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:82
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:94
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:106
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:118
char operator()(const BitValueRepresentation &arg1, const BitValueRepresentation &arg2) const
Definition: comparison.cpp:130