GCC Middle and Back End API Reference
range-op-mixed.h
Go to the documentation of this file.
1/* Header file for mixed range operator class.
2 Copyright (C) 2017-2025 Free Software Foundation, Inc.
3 Contributed by Andrew MacLeod <amacleod@redhat.com>
4 and Aldy Hernandez <aldyh@redhat.com>.
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
10Software Foundation; either version 3, or (at your option) any later
11version.
12
13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17
18You should have received a copy of the GNU General Public License
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
21
22#ifndef GCC_RANGE_OP_MIXED_H
23#define GCC_RANGE_OP_MIXED_H
24
25void update_known_bitmask (vrange &, tree_code, const vrange &, const vrange &);
27 const irange &, const irange &,
28 relation_kind rel);
29
30
31// Return TRUE if 0 is within [WMIN, WMAX].
32
33inline bool
34wi_includes_zero_p (tree type, const wide_int &wmin, const wide_int &wmax)
35{
36 signop sign = TYPE_SIGN (type);
37 return wi::le_p (wmin, 0, sign) && wi::ge_p (wmax, 0, sign);
38}
39
40// Return TRUE if [WMIN, WMAX] is the singleton 0.
41
42inline bool
43wi_zero_p (tree type, const wide_int &wmin, const wide_int &wmax)
44{
45 unsigned prec = TYPE_PRECISION (type);
46 return wmin == wmax && wi::eq_p (wmin, wi::zero (prec));
47}
48
49
51bool_range_state get_bool_state (vrange &r, const vrange &lhs, tree val_type);
52
53// If the range of either op1 or op2 is undefined, set the result to
54// varying and return TRUE. If the caller truly cares about a result,
55// they should pass in a varying if it has an undefined that it wants
56// treated as a varying.
57
58inline bool
60 const vrange &op1, const vrange & op2)
61{
62 if (op1.undefined_p () || op2.undefined_p ())
63 {
64 r.set_varying (type);
65 return true;
66 }
67 else
68 return false;
69}
70
71// For relation opcodes, first try to see if the supplied relation
72// forces a true or false result, and return that.
73// Then check for undefined operands. If none of this applies,
74// return false.
75
76inline bool
78 const vrange &op2, relation_trio trio,
79 relation_kind my_rel)
80{
81 relation_kind rel = trio.op1_op2 ();
82 // If known relation is a complete subset of this relation, always true.
83 if (relation_union (rel, my_rel) == my_rel)
84 {
85 r = range_true (type);
86 return true;
87 }
88
89 // If known relation has no subset of this relation, always false.
90 if (relation_intersect (rel, my_rel) == VREL_UNDEFINED)
91 {
92 r = range_false (type);
93 return true;
94 }
95
96 // If either operand is undefined, return VARYING.
97 if (empty_range_varying (r, type, op1, op2))
98 return true;
99
100 return false;
101}
102
103// ----------------------------------------------------------------------
104// Mixed Mode Operators.
105// ----------------------------------------------------------------------
106
108{
109public:
115 bool fold_range (irange &r, tree type,
116 const irange &op1, const irange &op2,
117 relation_trio = TRIO_VARYING) const final override;
118 bool fold_range (irange &r, tree type,
119 const prange &op1, const prange &op2,
120 relation_trio = TRIO_VARYING) const final override;
121 bool fold_range (irange &r, tree type,
122 const frange &op1, const frange &op2,
123 relation_trio = TRIO_VARYING) const final override;
124
125 bool op1_range (irange &r, tree type,
126 const irange &lhs, const irange &val,
127 relation_trio = TRIO_VARYING) const final override;
128 bool op1_range (prange &r, tree type,
129 const irange &lhs, const prange &val,
130 relation_trio = TRIO_VARYING) const final override;
131 bool op1_range (frange &r, tree type,
132 const irange &lhs, const frange &op2,
133 relation_trio = TRIO_VARYING) const final override;
134
135 bool op2_range (irange &r, tree type,
136 const irange &lhs, const irange &val,
137 relation_trio = TRIO_VARYING) const final override;
138 bool op2_range (prange &r, tree type,
139 const irange &lhs, const prange &val,
140 relation_trio = TRIO_VARYING) const final override;
141 bool op2_range (frange &r, tree type,
142 const irange &lhs, const frange &op1,
143 relation_trio rel = TRIO_VARYING) const final override;
144
145 relation_kind op1_op2_relation (const irange &lhs, const irange &,
146 const irange &) const final override;
147 relation_kind op1_op2_relation (const irange &lhs, const prange &,
148 const prange &) const final override;
149 relation_kind op1_op2_relation (const irange &lhs, const frange &,
150 const frange &) const final override;
151 void update_bitmask (irange &r, const irange &lh,
152 const irange &rh) const final override;
153 // Check op1 and op2 for compatibility.
154 bool operand_check_p (tree t1, tree t2, tree t3) const final override
155 { return range_compatible_p (t2, t3) && INTEGRAL_TYPE_P (t1); }
156};
157
159{
160public:
166 bool fold_range (irange &r, tree type,
167 const irange &op1, const irange &op2,
168 relation_trio = TRIO_VARYING) const final override;
169 bool fold_range (irange &r, tree type,
170 const prange &op1, const prange &op2,
171 relation_trio rel = TRIO_VARYING) const final override;
172 bool fold_range (irange &r, tree type,
173 const frange &op1, const frange &op2,
174 relation_trio rel = TRIO_VARYING) const final override;
175
176 bool op1_range (irange &r, tree type,
177 const irange &lhs, const irange &op2,
178 relation_trio = TRIO_VARYING) const final override;
179 bool op1_range (prange &r, tree type,
180 const irange &lhs, const prange &op2,
181 relation_trio = TRIO_VARYING) const final override;
182 bool op1_range (frange &r, tree type,
183 const irange &lhs, const frange &op2,
184 relation_trio = TRIO_VARYING) const final override;
185
186 bool op2_range (irange &r, tree type,
187 const irange &lhs, const irange &op1,
188 relation_trio = TRIO_VARYING) const final override;
189 bool op2_range (prange &r, tree type,
190 const irange &lhs, const prange &op1,
191 relation_trio = TRIO_VARYING) const final override;
192 bool op2_range (frange &r, tree type,
193 const irange &lhs, const frange &op1,
194 relation_trio = TRIO_VARYING) const final override;
195
196 relation_kind op1_op2_relation (const irange &lhs, const irange &,
197 const irange &) const final override;
198 relation_kind op1_op2_relation (const irange &lhs, const prange &,
199 const prange &) const final override;
200 relation_kind op1_op2_relation (const irange &lhs, const frange &,
201 const frange &) const final override;
202 void update_bitmask (irange &r, const irange &lh,
203 const irange &rh) const final override;
204 // Check op1 and op2 for compatibility.
205 bool operand_check_p (tree t0, tree t1, tree t2) const final override
206 { return range_compatible_p (t1, t2) && INTEGRAL_TYPE_P (t0); }
207};
208
210{
211public:
217 bool fold_range (irange &r, tree type,
218 const irange &op1, const irange &op2,
219 relation_trio = TRIO_VARYING) const final override;
220 bool fold_range (irange &r, tree type,
221 const prange &op1, const prange &op2,
222 relation_trio = TRIO_VARYING) const final override;
223 bool fold_range (irange &r, tree type,
224 const frange &op1, const frange &op2,
225 relation_trio = TRIO_VARYING) const final override;
226 bool op1_range (irange &r, tree type,
227 const irange &lhs, const irange &op2,
228 relation_trio = TRIO_VARYING) const final override;
229 bool op1_range (prange &r, tree type,
230 const irange &lhs, const prange &op2,
231 relation_trio = TRIO_VARYING) const final override;
232 bool op1_range (frange &r, tree type,
233 const irange &lhs, const frange &op2,
234 relation_trio = TRIO_VARYING) const final override;
235 bool op2_range (irange &r, tree type,
236 const irange &lhs, const irange &op1,
237 relation_trio = TRIO_VARYING) const final override;
238 bool op2_range (prange &r, tree type,
239 const irange &lhs, const prange &op1,
240 relation_trio = TRIO_VARYING) const final override;
241 bool op2_range (frange &r, tree type,
242 const irange &lhs, const frange &op1,
243 relation_trio = TRIO_VARYING) const final override;
244 relation_kind op1_op2_relation (const irange &lhs, const irange &,
245 const irange &) const final override;
246 relation_kind op1_op2_relation (const irange &lhs, const prange &,
247 const prange &) const final override;
248 relation_kind op1_op2_relation (const irange &lhs, const frange &,
249 const frange &) const final override;
250 void update_bitmask (irange &r, const irange &lh,
251 const irange &rh) const final override;
252 // Check op1 and op2 for compatibility.
253 bool operand_check_p (tree t1, tree t2, tree t3) const final override
254 { return range_compatible_p (t2, t3) && INTEGRAL_TYPE_P (t1); }
255};
256
258{
259public:
265 bool fold_range (irange &r, tree type,
266 const irange &op1, const irange &op2,
267 relation_trio = TRIO_VARYING) const final override;
268 bool fold_range (irange &r, tree type,
269 const prange &op1, const prange &op2,
270 relation_trio = TRIO_VARYING) const final override;
271 bool fold_range (irange &r, tree type,
272 const frange &op1, const frange &op2,
273 relation_trio rel = TRIO_VARYING) const final override;
274
275 bool op1_range (irange &r, tree type,
276 const irange &lhs, const irange &op2,
277 relation_trio = TRIO_VARYING) const final override;
278 bool op1_range (prange &r, tree type,
279 const irange &lhs, const prange &op2,
280 relation_trio = TRIO_VARYING) const final override;
281 bool op1_range (frange &r, tree type,
282 const irange &lhs, const frange &op2,
283 relation_trio rel = TRIO_VARYING) const final override;
284
285 bool op2_range (irange &r, tree type,
286 const irange &lhs, const irange &op1,
287 relation_trio = TRIO_VARYING) const final override;
288 bool op2_range (prange &r, tree type,
289 const irange &lhs, const prange &op1,
290 relation_trio = TRIO_VARYING) const final override;
291 bool op2_range (frange &r, tree type,
292 const irange &lhs, const frange &op1,
293 relation_trio rel = TRIO_VARYING) const final override;
294
295 relation_kind op1_op2_relation (const irange &lhs, const irange &,
296 const irange &) const final override;
297 relation_kind op1_op2_relation (const irange &lhs, const prange &,
298 const prange &) const final override;
299 relation_kind op1_op2_relation (const irange &lhs, const frange &,
300 const frange &) const final override;
301 void update_bitmask (irange &r, const irange &lh,
302 const irange &rh) const final override;
303 // Check op1 and op2 for compatibility.
304 bool operand_check_p (tree t1, tree t2, tree t3) const final override
305 { return range_compatible_p (t2, t3) && INTEGRAL_TYPE_P (t1); }
306};
307
309{
310public:
316 bool fold_range (irange &r, tree type,
317 const irange &op1, const irange &op2,
318 relation_trio = TRIO_VARYING) const final override;
319 bool fold_range (irange &r, tree type,
320 const prange &op1, const prange &op2,
321 relation_trio = TRIO_VARYING) const final override;
322 bool fold_range (irange &r, tree type,
323 const frange &op1, const frange &op2,
324 relation_trio = TRIO_VARYING) const final override;
325
326 bool op1_range (irange &r, tree type,
327 const irange &lhs, const irange &op2,
328 relation_trio = TRIO_VARYING) const final override;
329 bool op1_range (prange &r, tree type,
330 const irange &lhs, const prange &op2,
331 relation_trio = TRIO_VARYING) const final override;
332 bool op1_range (frange &r, tree type,
333 const irange &lhs, const frange &op2,
334 relation_trio = TRIO_VARYING) const final override;
335
336 bool op2_range (irange &r, tree type,
337 const irange &lhs, const irange &op1,
338 relation_trio = TRIO_VARYING) const final override;
339 bool op2_range (prange &r, tree type,
340 const irange &lhs, const prange &op1,
341 relation_trio = TRIO_VARYING) const final override;
342 bool op2_range (frange &r, tree type,
343 const irange &lhs, const frange &op1,
344 relation_trio = TRIO_VARYING) const final override;
345 relation_kind op1_op2_relation (const irange &lhs, const irange &,
346 const irange &) const final override;
347 relation_kind op1_op2_relation (const irange &lhs, const prange &,
348 const prange &) const final override;
349 relation_kind op1_op2_relation (const irange &lhs, const frange &,
350 const frange &) const final override;
351 void update_bitmask (irange &r, const irange &lh,
352 const irange &rh) const final override;
353 // Check op1 and op2 for compatibility.
354 bool operand_check_p (tree t1, tree t2, tree t3) const final override
355 { return range_compatible_p (t2, t3) && INTEGRAL_TYPE_P (t1); }
356};
357
359{
360public:
366 bool fold_range (irange &r, tree type,
367 const irange &op1, const irange &op2,
368 relation_trio = TRIO_VARYING) const final override;
369 bool fold_range (irange &r, tree type,
370 const prange &op1, const prange &op2,
371 relation_trio = TRIO_VARYING) const final override;
372 bool fold_range (irange &r, tree type,
373 const frange &op1, const frange &op2,
374 relation_trio = TRIO_VARYING) const final override;
375
376 bool op1_range (irange &r, tree type,
377 const irange &lhs, const irange &op2,
378 relation_trio = TRIO_VARYING) const final override;
379 bool op1_range (prange &r, tree type,
380 const irange &lhs, const prange &op2,
381 relation_trio = TRIO_VARYING) const final override;
382 bool op1_range (frange &r, tree type,
383 const irange &lhs, const frange &op2,
384 relation_trio = TRIO_VARYING) const final override;
385
386 bool op2_range (irange &r, tree type,
387 const irange &lhs, const irange &op1,
388 relation_trio = TRIO_VARYING) const final override;
389 bool op2_range (prange &r, tree type,
390 const irange &lhs, const prange &op1,
391 relation_trio = TRIO_VARYING) const final override;
392 bool op2_range (frange &r, tree type,
393 const irange &lhs, const frange &op1,
394 relation_trio = TRIO_VARYING) const final override;
395
396 relation_kind op1_op2_relation (const irange &lhs, const irange &,
397 const irange &) const final override;
398 relation_kind op1_op2_relation (const irange &lhs, const prange &,
399 const prange &) const final override;
400 relation_kind op1_op2_relation (const irange &lhs, const frange &,
401 const frange &) const final override;
402 void update_bitmask (irange &r, const irange &lh,
403 const irange &rh) const final override;
404 // Check op1 and op2 for compatibility.
405 bool operand_check_p (tree t1, tree t2, tree t3) const final override
406 { return range_compatible_p (t2, t3) && INTEGRAL_TYPE_P (t1); }
407};
408
410{
411public:
415 bool fold_range (irange &r, tree type,
416 const irange &op1, const irange &op2,
417 relation_trio rel = TRIO_VARYING) const final override;
418 bool fold_range (prange &r, tree type,
419 const prange &op1, const prange &op2,
420 relation_trio rel = TRIO_VARYING) const final override;
421 bool fold_range (frange &r, tree type ATTRIBUTE_UNUSED,
422 const frange &op1, const frange &op2 ATTRIBUTE_UNUSED,
423 relation_trio = TRIO_VARYING) const final override;
424 bool op1_range (irange &r, tree type,
425 const irange &lhs, const irange &op2,
426 relation_trio rel = TRIO_VARYING) const final override;
427 bool op1_range (prange &r, tree type,
428 const prange &lhs, const prange &op2,
429 relation_trio rel = TRIO_VARYING) const final override;
430 bool op1_range (frange &r, tree type ATTRIBUTE_UNUSED,
431 const frange &lhs, const frange &op2 ATTRIBUTE_UNUSED,
432 relation_trio = TRIO_VARYING) const final override;
434 const irange &op1, const irange &op2,
435 relation_kind rel) const final override;
437 const prange &op1, const prange &op2,
438 relation_kind rel) const final override;
439};
440
442{
443public:
445 bool fold_range (irange &r, tree type,
446 const irange &op1, const irange &op2,
447 relation_trio rel = TRIO_VARYING) const final override;
448 bool fold_range (prange &r, tree type,
449 const prange &op1, const prange &op2,
450 relation_trio rel = TRIO_VARYING) const final override;
451 bool fold_range (frange &r, tree type,
452 const frange &op1, const frange &op2,
453 relation_trio = TRIO_VARYING) const final override;
454};
455
456
458{
459public:
464 bool fold_range (irange &r, tree type,
465 const irange &op1, const irange &op2,
466 relation_trio rel = TRIO_VARYING) const final override;
467 bool fold_range (prange &r, tree type,
468 const prange &op1, const prange &op2,
469 relation_trio rel = TRIO_VARYING) const final override;
470 bool fold_range (irange &r, tree type,
471 const prange &op1, const irange &op2,
472 relation_trio rel = TRIO_VARYING) const final override;
473 bool fold_range (prange &r, tree type,
474 const irange &op1, const prange &op2,
475 relation_trio rel = TRIO_VARYING) const final override;
476 bool fold_range (frange &r, tree type,
477 const frange &op1, const frange &op2,
478 relation_trio = TRIO_VARYING) const final override;
479 bool fold_range (irange &r, tree type,
480 const frange &op1, const irange &op2,
481 relation_trio = TRIO_VARYING) const final override;
482 bool fold_range (frange &r, tree type,
483 const irange &op1, const frange &op2,
484 relation_trio = TRIO_VARYING) const final override;
485
486 bool op1_range (irange &r, tree type,
487 const irange &lhs, const irange &op2,
488 relation_trio rel = TRIO_VARYING) const final override;
489 bool op1_range (prange &r, tree type,
490 const prange &lhs, const prange &op2,
491 relation_trio rel = TRIO_VARYING) const final override;
492 bool op1_range (irange &r, tree type,
493 const prange &lhs, const irange &op2,
494 relation_trio rel = TRIO_VARYING) const final override;
495 bool op1_range (prange &r, tree type,
496 const irange &lhs, const prange &op2,
497 relation_trio rel = TRIO_VARYING) const final override;
498 bool op1_range (frange &r, tree type,
499 const frange &lhs, const frange &op2,
500 relation_trio = TRIO_VARYING) const final override;
501 bool op1_range (frange &r, tree type,
502 const irange &lhs, const frange &op2,
503 relation_trio = TRIO_VARYING) const final override;
504 bool op1_range (irange &r, tree type,
505 const frange &lhs, const irange &op2,
506 relation_trio = TRIO_VARYING) const final override;
507
509 const irange &op1, const irange &op2,
510 relation_kind) const final override;
512 const prange &op1, const prange &op2,
513 relation_kind) const final override;
515 const irange &op1, const irange &op2,
516 relation_kind) const final override;
518 const prange &op1, const prange &op2,
519 relation_kind) const final override;
520 void update_bitmask (irange &r, const irange &lh,
521 const irange &rh) const final override;
522private:
523 bool truncating_cast_p (const irange &inner, const irange &outer) const;
524 bool inside_domain_p (const wide_int &min, const wide_int &max,
525 const irange &outer) const;
526 void fold_pair (irange &r, unsigned index, const irange &inner,
527 const irange &outer) const;
528};
529
530
532{
533public:
537 bool fold_range (irange &r, tree type,
538 const irange &op1, const irange &op2,
539 relation_trio rel = TRIO_VARYING) const override;
540 bool fold_range (prange &r, tree type,
541 const prange &op1, const prange &op2,
542 relation_trio rel = TRIO_VARYING) const final override;
543 bool fold_range (irange &r, tree type,
544 const prange &op1, const irange &op2,
545 relation_trio rel = TRIO_VARYING) const final override;
546 bool fold_range (prange &r, tree type,
547 const irange &op1, const prange &op2,
548 relation_trio rel = TRIO_VARYING) const final override;
549
550 bool op1_range (irange &r, tree type,
551 const irange &lhs, const irange &op2,
552 relation_trio rel = TRIO_VARYING) const override;
553 bool op1_range (prange &r, tree type,
554 const prange &lhs, const prange &op2,
555 relation_trio rel = TRIO_VARYING) const final override;
556 bool op1_range (irange &r, tree type,
557 const prange &lhs, const irange &op2,
558 relation_trio rel = TRIO_VARYING) const final override;
559 bool op1_range (prange &r, tree type,
560 const irange &lhs, const prange &op2,
561 relation_trio rel = TRIO_VARYING) const final override;
562
563 void update_bitmask (irange &r, const irange &lh,
564 const irange &) const final override;
565private:
566// VIEW_CONVERT_EXPR works much like a cast between integral values, so use
567// the cast operator. Non-integrals are not handled as yet.
569};
570
572{
573public:
579 bool op1_range (irange &r, tree type,
580 const irange &lhs, const irange &op2,
581 relation_trio) const final override;
582 bool op1_range (frange &r, tree type,
583 const frange &lhs, const frange &op2,
584 relation_trio = TRIO_VARYING) const final override;
585
586 bool op2_range (irange &r, tree type,
587 const irange &lhs, const irange &op1,
588 relation_trio) const final override;
589 bool op2_range (frange &r, tree type,
590 const frange &lhs, const frange &op1,
591 relation_trio = TRIO_VARYING) const final override;
592
593 relation_kind lhs_op1_relation (const irange &lhs, const irange &op1,
594 const irange &op2,
595 relation_kind rel) const final override;
596 relation_kind lhs_op2_relation (const irange &lhs, const irange &op1,
597 const irange &op2,
598 relation_kind rel) const final override;
599 void update_bitmask (irange &r, const irange &lh,
600 const irange &rh) const final override;
601
602 bool overflow_free_p (const irange &lh, const irange &rh,
603 relation_trio = TRIO_VARYING) const final override;
604 // Check compatibility of all operands.
605 bool operand_check_p (tree t1, tree t2, tree t3) const final override
606 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
607private:
608 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
609 const wide_int &lh_ub, const wide_int &rh_lb,
610 const wide_int &rh_ub) const final override;
611 void rv_fold (frange &r, tree type,
612 const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub,
613 const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub,
614 relation_kind) const final override;
615};
616
618{
619 public:
623 bool fold_range (frange &r, tree type,
624 const frange &op1, const frange &,
625 relation_trio = TRIO_VARYING) const final override;
626
627 bool op1_range (irange &r, tree type, const irange &lhs,
628 const irange &op2, relation_trio) const final override;
629 bool op1_range (frange &r, tree type,
630 const frange &lhs, const frange &op2,
631 relation_trio rel = TRIO_VARYING) const final override;
632 void update_bitmask (irange &r, const irange &lh,
633 const irange &rh) const final override;
634 // Check compatibility of LHS and op1.
635 bool operand_check_p (tree t1, tree t2, tree) const final override
636 { return range_compatible_p (t1, t2); }
637private:
638 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
639 const wide_int &lh_ub, const wide_int &rh_lb,
640 const wide_int &rh_ub) const final override;
641
642};
643
645{
646public:
653 bool op1_range (irange &r, tree type,
654 const irange &lhs, const irange &op2,
655 relation_trio) const final override;
656 bool op1_range (frange &r, tree type,
657 const frange &lhs, const frange &op2,
658 relation_trio = TRIO_VARYING) const final override;
659
660 bool op2_range (irange &r, tree type,
661 const irange &lhs, const irange &op1,
662 relation_trio) const final override;
663 bool op2_range (frange &r, tree type,
664 const frange &lhs,
665 const frange &op1,
666 relation_trio = TRIO_VARYING) const final override;
667
669 const irange &op1, const irange &op2,
670 relation_kind rel) const final override;
671 bool op1_op2_relation_effect (irange &lhs_range, tree type,
672 const irange &op1_range,
673 const irange &op2_range,
674 relation_kind rel) const final override;
675 void update_bitmask (irange &r, const irange &lh,
676 const irange &rh) const final override;
677
678 bool overflow_free_p (const irange &lh, const irange &rh,
679 relation_trio = TRIO_VARYING) const final override;
680 // Check compatibility of all operands.
681 bool operand_check_p (tree t1, tree t2, tree t3) const final override
682 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
683private:
684 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
685 const wide_int &lh_ub, const wide_int &rh_lb,
686 const wide_int &rh_ub) const final override;
687 void rv_fold (frange &r, tree type,
688 const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub,
689 const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub,
690 relation_kind) const final override;
691};
692
694{
695 public:
698 bool fold_range (irange &r, tree type,
699 const irange &op1, const irange &op2,
700 relation_trio rel = TRIO_VARYING) const final override;
701 bool fold_range (frange &r, tree type,
702 const frange &op1, const frange &op2,
703 relation_trio = TRIO_VARYING) const final override;
704
705 bool op1_range (irange &r, tree type,
706 const irange &lhs, const irange &op2,
707 relation_trio rel = TRIO_VARYING) const final override;
708 bool op1_range (frange &r, tree type,
709 const frange &lhs, const frange &op2,
710 relation_trio rel = TRIO_VARYING) const final override;
711 // Check compatibility of LHS and op1.
712 bool operand_check_p (tree t1, tree t2, tree) const final override
713 { return range_compatible_p (t1, t2); }
714};
715
716
718{
719public:
720 virtual bool wi_op_overflows (wide_int &r,
721 tree type,
722 const wide_int &,
723 const wide_int &) const = 0;
725 const wide_int &lh_lb,
726 const wide_int &lh_ub,
727 const wide_int &rh_lb,
728 const wide_int &rh_ub) const;
729};
730
732{
733public:
737 bool op1_range (irange &r, tree type,
738 const irange &lhs, const irange &op2,
739 relation_trio) const final override;
740 bool op1_range (frange &r, tree type,
741 const frange &lhs, const frange &op2,
742 relation_trio = TRIO_VARYING) const final override;
743
744 bool op2_range (irange &r, tree type,
745 const irange &lhs, const irange &op1,
746 relation_trio) const final override;
747 bool op2_range (frange &r, tree type,
748 const frange &lhs, const frange &op1,
749 relation_trio = TRIO_VARYING) const final override;
750
751 void update_bitmask (irange &r, const irange &lh,
752 const irange &rh) const final override;
753
754 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
755 const wide_int &lh_ub, const wide_int &rh_lb,
756 const wide_int &rh_ub) const final override;
757 bool wi_op_overflows (wide_int &res, tree type, const wide_int &w0,
758 const wide_int &w1) const final override;
759
760 void rv_fold (frange &r, tree type,
761 const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub,
762 const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub,
763 relation_kind kind) const final override;
764 bool overflow_free_p (const irange &lh, const irange &rh,
765 relation_trio = TRIO_VARYING) const final override;
766 // Check compatibility of all operands.
767 bool operand_check_p (tree t1, tree t2, tree t3) const final override
768 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
769};
770
772{
773public:
776 bool fold_range (irange &r, tree type,
777 const irange &op1, const irange &op2,
778 relation_trio rel = TRIO_VARYING) const final override;
779 bool op1_range (irange &r, tree type,
780 const irange &lhs, const irange &op2,
781 relation_trio rel = TRIO_VARYING) const final override;
782 bool op1_range (prange &r, tree type,
783 const prange &lhs, const prange &op2,
784 relation_trio rel = TRIO_VARYING) const final override;
785};
786
788{
789public:
793 bool fold_range (irange &r, tree type,
794 const irange &lh, const irange &rh,
795 relation_trio rel = TRIO_VARYING) const final override;
796 bool op1_range (irange &r, tree type,
797 const irange &lhs, const irange &op2,
798 relation_trio rel = TRIO_VARYING) const final override;
799 void update_bitmask (irange &r, const irange &lh,
800 const irange &rh) const final override;
801 // Check compatibility of all operands.
802 bool operand_check_p (tree t1, tree t2, tree t3) const final override
803 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
804};
805
807{
808public:
813 bool op1_range (irange &r, tree type,
814 const irange &lhs, const irange &op2,
815 relation_trio rel = TRIO_VARYING) const final override;
816 bool op2_range (irange &r, tree type,
817 const irange &lhs, const irange &op1,
818 relation_trio rel = TRIO_VARYING) const final override;
819 bool op1_op2_relation_effect (irange &lhs_range,
820 tree type,
821 const irange &op1_range,
822 const irange &op2_range,
823 relation_kind rel) const final override;
824 void update_bitmask (irange &r, const irange &lh,
825 const irange &rh) const final override;
826 // Check compatibility of all operands.
827 bool operand_check_p (tree t1, tree t2, tree t3) const final override
828 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
829private:
830 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
831 const wide_int &lh_ub, const wide_int &rh_lb,
832 const wide_int &rh_ub) const final override;
833};
834
836{
837public:
843 bool fold_range (prange &r, tree type,
844 const prange &op1,
845 const prange &op2,
846 relation_trio) const final override;
847 bool op1_range (irange &r, tree type,
848 const irange &lhs, const irange &op2,
849 relation_trio rel = TRIO_VARYING) const override;
850 bool op2_range (irange &r, tree type,
851 const irange &lhs, const irange &op1,
852 relation_trio rel = TRIO_VARYING) const override;
854 const irange &op1, const irange &op2,
855 relation_kind) const override;
856 void update_bitmask (irange &r, const irange &lh,
857 const irange &rh) const override;
858 // Check compatibility of all operands.
859 bool operand_check_p (tree t1, tree t2, tree t3) const final override
860 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
861protected:
862 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
863 const wide_int &lh_ub, const wide_int &rh_lb,
864 const wide_int &rh_ub) const override;
866 const irange &lhs,
867 const irange &op2) const;
868};
869
871{
872public:
877
878 bool fold_range (prange &r, tree type,
879 const prange &op1,
880 const prange &op2,
881 relation_trio) const final override;
882 bool op1_range (irange &r, tree type,
883 const irange &lhs, const irange &op2,
884 relation_trio rel = TRIO_VARYING) const override;
885 bool op2_range (irange &r, tree type,
886 const irange &lhs, const irange &op1,
887 relation_trio rel = TRIO_VARYING) const override;
888 void update_bitmask (irange &r, const irange &lh,
889 const irange &rh) const override;
890 // Check compatibility of all operands.
891 bool operand_check_p (tree t1, tree t2, tree t3) const final override
892 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
893protected:
894 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
895 const wide_int &lh_ub, const wide_int &rh_lb,
896 const wide_int &rh_ub) const override;
897};
898
900{
901public:
904 bool fold_range (prange &r, tree type,
905 const prange &op1,
906 const prange &op2,
907 relation_trio) const final override;
908 void update_bitmask (irange &r, const irange &lh,
909 const irange &rh) const override;
910 // Check compatibility of all operands.
911 bool operand_check_p (tree t1, tree t2, tree t3) const final override
912 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
913protected:
914 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
915 const wide_int &lh_ub, const wide_int &rh_lb,
916 const wide_int &rh_ub) const override;
917};
918
920{
921public:
924 bool fold_range (prange &r, tree type,
925 const prange &op1,
926 const prange &op2,
927 relation_trio) const final override;
928 void update_bitmask (irange &r, const irange &lh,
929 const irange &rh) const override;
930 // Check compatibility of all operands.
931 bool operand_check_p (tree t1, tree t2, tree t3) const final override
932 { return range_compatible_p (t1, t2) && range_compatible_p (t1, t3); }
933protected:
934 void wi_fold (irange &r, tree type, const wide_int &lh_lb,
935 const wide_int &lh_ub, const wide_int &rh_lb,
936 const wide_int &rh_ub) const override;
937};
938#endif // GCC_RANGE_OP_MIXED_H
Definition range-op-mixed.h:718
void wi_cross_product(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const
Definition range-op.cc:2196
virtual bool wi_op_overflows(wide_int &r, tree type, const wide_int &, const wide_int &) const =0
Definition value-range.h:533
Definition value-range.h:276
Definition range-op-mixed.h:618
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:4588
bool fold_range(frange &r, tree type, const frange &op1, const frange &, relation_trio=TRIO_VARYING) const final override
Definition range-op-float.cc:1525
bool operand_check_p(tree t1, tree t2, tree) const final override
Definition range-op-mixed.h:635
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio) const final override
Definition range-op.cc:4556
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const final override
Definition range-op.cc:4482
Definition range-op-mixed.h:772
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4676
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4695
Definition range-op-mixed.h:836
void update_bitmask(irange &r, const irange &lh, const irange &rh) const override
Definition range-op.cc:3410
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio rel=TRIO_VARYING) const override
Definition range-op.cc:3858
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const override
Definition range-op.cc:3795
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:859
bool fold_range(prange &r, tree type, const prange &op1, const prange &op2, relation_trio) const final override
Definition range-op-ptr.cc:850
relation_kind lhs_op1_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind) const override
Definition range-op.cc:3442
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const override
Definition range-op.cc:3595
void simple_op1_range_solver(irange &r, tree type, const irange &lhs, const irange &op2) const
Definition range-op.cc:3716
Definition range-op-mixed.h:788
bool fold_range(irange &r, tree type, const irange &lh, const irange &rh, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4374
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:802
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4392
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:4407
Definition range-op-mixed.h:871
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio rel=TRIO_VARYING) const override
Definition range-op.cc:4034
bool fold_range(prange &r, tree type, const prange &op1, const prange &op2, relation_trio) const final override
Definition range-op-ptr.cc:442
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const override
Definition range-op.cc:4000
void update_bitmask(irange &r, const irange &lh, const irange &rh) const override
Definition range-op.cc:3937
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:891
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const override
Definition range-op.cc:3944
Definition range-op-mixed.h:807
bool op1_op2_relation_effect(irange &lhs_range, tree type, const irange &op1_range, const irange &op2_range, relation_kind rel) const final override
Definition range-op.cc:4096
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:4043
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4124
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:827
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const final override
Definition range-op.cc:4050
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4162
Definition range-op-mixed.h:458
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:3125
bool inside_domain_p(const wide_int &min, const wide_int &max, const irange &outer) const
Definition range-op.cc:3033
void fold_pair(irange &r, unsigned index, const irange &inner, const irange &outer) const
Definition range-op.cc:3050
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:3088
bool truncating_cast_p(const irange &inner, const irange &outer) const
Definition range-op.cc:3024
relation_kind lhs_op1_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind) const final override
Definition range-op.cc:2995
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:3118
Definition range-op-mixed.h:442
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4415
Definition range-op-mixed.h:108
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:154
bool op2_range(irange &r, tree type, const irange &lhs, const irange &val, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1140
relation_kind op1_op2_relation(const irange &lhs, const irange &, const irange &) const final override
Definition range-op.cc:1052
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1043
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1069
bool op1_range(irange &r, tree type, const irange &lhs, const irange &val, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1108
Definition range-op-mixed.h:359
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1660
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:405
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1639
relation_kind op1_op2_relation(const irange &lhs, const irange &, const irange &) const final override
Definition range-op.cc:1622
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1685
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1613
Definition range-op-mixed.h:309
relation_kind op1_op2_relation(const irange &lhs, const irange &, const irange &) const final override
Definition range-op.cc:1526
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1517
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1543
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:354
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1587
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1563
Definition range-op-mixed.h:410
relation_kind lhs_op1_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind rel) const final override
Definition range-op.cc:4428
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4440
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4450
Definition range-op-mixed.h:258
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1491
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1419
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1445
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1466
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:304
relation_kind op1_op2_relation(const irange &lhs, const irange &, const irange &) const final override
Definition range-op.cc:1428
Definition range-op-mixed.h:210
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:253
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1368
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1393
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1318
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1344
relation_kind op1_op2_relation(const irange &lhs, const irange &, const irange &) const final override
Definition range-op.cc:1327
Definition range-op-mixed.h:920
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:931
void update_bitmask(irange &r, const irange &lh, const irange &rh) const override
Definition range-op.cc:2164
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const override
Definition range-op.cc:2171
bool fold_range(prange &r, tree type, const prange &op1, const prange &op2, relation_trio) const final override
Definition range-op-ptr.cc:807
Definition range-op-mixed.h:900
bool fold_range(prange &r, tree type, const prange &op1, const prange &op2, relation_trio) const final override
Definition range-op-ptr.cc:785
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:911
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const override
Definition range-op.cc:2152
void update_bitmask(irange &r, const irange &lh, const irange &rh) const override
Definition range-op.cc:2145
Definition range-op-mixed.h:645
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:681
relation_kind lhs_op1_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind rel) const final override
Definition range-op.cc:2018
bool op1_op2_relation_effect(irange &lhs_range, tree type, const irange &op1_range, const irange &op2_range, relation_kind rel) const final override
Definition range-op.cc:2104
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const final override
Definition range-op.cc:2002
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio) const final override
Definition range-op.cc:2114
void rv_fold(frange &r, tree type, const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub, const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub, relation_kind) const final override
Definition range-op-float.cc:2510
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1995
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio) const final override
Definition range-op.cc:2134
bool overflow_free_p(const irange &lh, const irange &rh, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:4771
Definition range-op-mixed.h:732
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio) const final override
Definition range-op.cc:2272
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:2238
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:767
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const final override
Definition range-op.cc:2300
bool overflow_free_p(const irange &lh, const irange &rh, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:4802
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio) const final override
Definition range-op.cc:2245
void rv_fold(frange &r, tree type, const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub, const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub, relation_kind kind) const final override
Definition range-op-float.cc:2618
bool wi_op_overflows(wide_int &res, tree type, const wide_int &w0, const wide_int &w1) const final override
Definition range-op.cc:2280
Definition range-op-mixed.h:694
bool operand_check_p(tree t1, tree t2, tree) const final override
Definition range-op-mixed.h:712
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4650
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const final override
Definition range-op.cc:4665
Definition range-op-mixed.h:159
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1216
bool operand_check_p(tree t0, tree t1, tree t2) const final override
Definition range-op-mixed.h:205
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1151
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1249
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:1177
relation_kind op1_op2_relation(const irange &lhs, const irange &, const irange &) const final override
Definition range-op.cc:1160
Definition range-op-mixed.h:572
bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio) const final override
Definition range-op.cc:1920
bool operand_check_p(tree t1, tree t2, tree t3) const final override
Definition range-op-mixed.h:605
void rv_fold(frange &r, tree type, const REAL_VALUE_TYPE &lh_lb, const REAL_VALUE_TYPE &lh_ub, const REAL_VALUE_TYPE &rh_lb, const REAL_VALUE_TYPE &rh_ub, relation_kind) const final override
Definition range-op-float.cc:2447
bool overflow_free_p(const irange &lh, const irange &rh, relation_trio=TRIO_VARYING) const final override
Definition range-op.cc:4740
relation_kind lhs_op1_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind rel) const final override
Definition range-op.cc:1721
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio) const final override
Definition range-op.cc:1900
void wi_fold(irange &r, tree type, const wide_int &lh_lb, const wide_int &lh_ub, const wide_int &rh_lb, const wide_int &rh_ub) const final override
Definition range-op.cc:1795
relation_kind lhs_op2_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind rel) const final override
Definition range-op.cc:1788
void update_bitmask(irange &r, const irange &lh, const irange &rh) const final override
Definition range-op.cc:1711
Definition range-op-mixed.h:532
bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel=TRIO_VARYING) const override
Definition range-op.cc:3288
void update_bitmask(irange &r, const irange &lh, const irange &) const final override
Definition range-op.cc:3320
bool fold_range(irange &r, tree type, const irange &op1, const irange &op2, relation_trio rel=TRIO_VARYING) const override
Definition range-op.cc:3257
operator_cast m_cast
Definition range-op-mixed.h:568
Definition value-range.h:390
Definition range-op.h:65
virtual bool op1_range(irange &r, tree type, const irange &lhs, const irange &op2, relation_trio=TRIO_VARYING) const
Definition range-op.cc:798
virtual bool op2_range(irange &r, tree type, const irange &lhs, const irange &op1, relation_trio=TRIO_VARYING) const
Definition range-op.cc:810
virtual bool fold_range(irange &r, tree type, const irange &lh, const irange &rh, relation_trio=TRIO_VARYING) const
Definition range-op.cc:708
virtual void update_bitmask(irange &, const irange &, const irange &) const
Definition range-op.cc:872
virtual relation_kind lhs_op2_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind=VREL_VARYING) const
Definition range-op.cc:831
virtual relation_kind lhs_op1_relation(const irange &lhs, const irange &op1, const irange &op2, relation_kind=VREL_VARYING) const
Definition range-op.cc:822
virtual relation_kind op1_op2_relation(const irange &lhs, const irange &op1, const irange &op2) const
Definition range-op.cc:840
virtual bool op1_op2_relation_effect(irange &lhs_range, tree type, const irange &op1_range, const irange &op2_range, relation_kind rel) const
Definition range-op.cc:850
Definition value-relation.h:336
relation_kind op1_op2()
Definition value-relation.h:410
Definition value-range.h:78
bool undefined_p() const
Definition value-range.h:1022
union tree_node * tree
Definition coretypes.h:97
tree_code
Definition genmatch.cc:1002
BINARY_PREDICATE le_p(const T1 &, const T2 &, signop)
hwi_with_prec zero(unsigned int)
Definition wide-int.h:2018
BINARY_PREDICATE ge_p(const T1 &, const T2 &, signop)
BINARY_PREDICATE eq_p(const T1 &, const T2 &)
poly_int< N, C > r
Definition poly-int.h:774
bool wi_includes_zero_p(tree type, const wide_int &wmin, const wide_int &wmax)
Definition range-op-mixed.h:34
bool empty_range_varying(vrange &r, tree type, const vrange &op1, const vrange &op2)
Definition range-op-mixed.h:59
bool wi_zero_p(tree type, const wide_int &wmin, const wide_int &wmax)
Definition range-op-mixed.h:43
bool_range_state get_bool_state(vrange &r, const vrange &lhs, tree val_type)
Definition range-op.cc:1017
void update_known_bitmask(vrange &, tree_code, const vrange &, const vrange &)
Definition range-op.cc:516
bool relop_early_resolve(irange &r, tree type, const vrange &op1, const vrange &op2, relation_trio trio, relation_kind my_rel)
Definition range-op-mixed.h:77
bool minus_op1_op2_relation_effect(irange &lhs_range, tree type, const irange &, const irange &, relation_kind rel)
Definition range-op.cc:2038
bool_range_state
Definition range-op-mixed.h:50
@ BRS_FALSE
Definition range-op-mixed.h:50
@ BRS_EMPTY
Definition range-op-mixed.h:50
@ BRS_FULL
Definition range-op-mixed.h:50
@ BRS_TRUE
Definition range-op-mixed.h:50
int_range< 1 > range_false(tree type=boolean_type_node)
Definition range.h:39
int_range< 1 > range_true(tree type=boolean_type_node)
Definition range.h:30
#define REAL_VALUE_TYPE
Definition real.h:68
signop
Definition signop.h:28
Definition gengtype.h:252
#define TYPE_PRECISION(NODE)
Definition tree.h:2360
#define TYPE_SIGN(NODE)
Definition tree.h:966
#define INTEGRAL_TYPE_P(TYPE)
Definition tree.h:614
bool range_compatible_p(tree type1, tree type2)
Definition value-range.h:1797
relation_kind relation_intersect(relation_kind r1, relation_kind r2)
Definition value-relation.cc:105
relation_kind relation_union(relation_kind r1, relation_kind r2)
Definition value-relation.cc:142
enum relation_kind_t relation_kind
@ VREL_UNDEFINED
Definition value-relation.h:66
#define TRIO_VARYING
Definition value-relation.h:355
generic_wide_int< wide_int_storage > wide_int
Definition wide-int.h:343