(root)/
gcc-13.2.0/
gcc/
gimple-range-op.h
       1  /* Header file for the GIMPLE range-op interface.
       2     Copyright (C) 2022-2023 Free Software Foundation, Inc.
       3     Contributed by Andrew MacLeod <amacleod@redhat.com>
       4     and Aldy Hernandez <aldyh@redhat.com>.
       5  
       6  This file is part of GCC.
       7  
       8  GCC is free software; you can redistribute it and/or modify it under
       9  the terms of the GNU General Public License as published by the Free
      10  Software Foundation; either version 3, or (at your option) any later
      11  version.
      12  
      13  GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      14  WARRANTY; without even the implied warranty of MERCHANTABILITY or
      15  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      16   for more details.
      17  
      18  You should have received a copy of the GNU General Public License
      19  along with GCC; see the file COPYING3.  If not see
      20  <http://www.gnu.org/licenses/>.  */
      21  
      22  #ifndef GCC_GIMPLE_RANGE_OP_H
      23  #define GCC_GIMPLE_RANGE_OP_H
      24  
      25  #include "range-op.h"
      26  
      27  
      28  class gimple_range_op_handler : public range_op_handler
      29  {
      30  public:
      31    static bool supported_p (gimple *s);
      32    gimple_range_op_handler (gimple *s);
      33    inline gimple *stmt () const { return m_stmt; }
      34    inline tree lhs () const { return gimple_get_lhs (m_stmt); }
      35    tree operand1 () const { gcc_checking_assert (m_valid); return m_op1; }
      36    tree operand2 () const { gcc_checking_assert (m_valid); return m_op2; }
      37    bool calc_op1 (vrange &r, const vrange &lhs_range);
      38    bool calc_op1 (vrange &r, const vrange &lhs_range, const vrange &op2_range,
      39  		 relation_trio = TRIO_VARYING);
      40    bool calc_op2 (vrange &r, const vrange &lhs_range, const vrange &op1_range,
      41  		 relation_trio = TRIO_VARYING);
      42  private:
      43    void maybe_builtin_call ();
      44    void maybe_non_standard ();
      45    gimple *m_stmt;
      46    tree m_op1, m_op2;
      47  };
      48  
      49  // Given stmt S, fill VEC, up to VEC_SIZE elements, with relevant ssa-names
      50  // on the statement.  For efficiency, it is an error to not pass in enough
      51  // elements for the vector.  Return the number of ssa-names.
      52  
      53  unsigned gimple_range_ssa_names (tree *vec, unsigned vec_size, gimple *stmt);
      54  
      55  #endif // GCC_GIMPLE_RANGE_OP_H