const wide_int &rh_ub) const final override;
};
+class operator_max : public range_operator
+{
+public:
+ void update_bitmask (irange &r, const irange &lh,
+ const irange &rh) const final override;
+private:
+ 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;
+};
#endif // GCC_RANGE_OP_MIXED_H
#include "tree-ssa-ccp.h"
#include "range-op-mixed.h"
-integral_table integral_tree_table;
pointer_table pointer_tree_table;
// Instantiate a range_op_table for unified operations.
operator_bitwise_and op_bitwise_and;
operator_bitwise_or op_bitwise_or;
operator_min op_min;
+operator_max op_max;
// Invoke the initialization routines for each class of range.
set (BIT_AND_EXPR, op_bitwise_and);
set (BIT_IOR_EXPR, op_bitwise_or);
set (MIN_EXPR, op_min);
+ set (MAX_EXPR, op_max);
}
// The tables are hidden and accessed via a simple extern function.
if (POINTER_TYPE_P (type) && pointer_tree_table[code])
return pointer_tree_table[code];
- if (unified_tree_table[code])
- {
- // Should not be in any other table if it is in the unified table.
- gcc_checking_assert (!integral_tree_table[code]);
- return unified_tree_table[code];
- }
-
- if (INTEGRAL_TYPE_P (type))
- return integral_tree_table[code];
- return NULL;
+ return unified_tree_table[code];
}
range_op_handler::range_op_handler ()
}
-class operator_max : public range_operator
+void
+operator_max::update_bitmask (irange &r, const irange &lh,
+ const irange &rh) const
{
-public:
- virtual 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;
- void update_bitmask (irange &r, const irange &lh, const irange &rh) const
- { update_known_bitmask (r, MAX_EXPR, lh, rh); }
-} op_max;
+ update_known_bitmask (r, MAX_EXPR, lh, rh);
+}
void
operator_max::wi_fold (irange &r, tree type,
r.set_varying (type);
}
\f
-integral_table::integral_table ()
-{
- set (MAX_EXPR, op_max);
-}
-
// Initialize any integral operators to the primary table
void