GCC Middle and Back End API Reference
gimple-range-op.h
Go to the documentation of this file.
1/* Header file for the GIMPLE range-op interface.
2 Copyright (C) 2022-2024 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_GIMPLE_RANGE_OP_H
23#define GCC_GIMPLE_RANGE_OP_H
24
25#include "range-op.h"
26
27
29{
30public:
31 static bool supported_p (gimple *s);
33 inline gimple *stmt () const { return m_stmt; }
34 inline tree lhs () const { return gimple_get_lhs (m_stmt); }
37 bool calc_op1 (vrange &r, const vrange &lhs_range);
38 bool calc_op1 (vrange &r, const vrange &lhs_range, const vrange &op2_range,
40 bool calc_op2 (vrange &r, const vrange &lhs_range, const vrange &op1_range,
42private:
43 void maybe_builtin_call ();
44 void maybe_non_standard ();
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
53unsigned gimple_range_ssa_names (tree *vec, unsigned vec_size, gimple *stmt);
54
55#endif // GCC_GIMPLE_RANGE_OP_H
Definition gimple-range-op.h:29
tree operand1() const
Definition gimple-range-op.h:35
void maybe_builtin_call()
Definition gimple-range-op.cc:1218
gimple_range_op_handler(gimple *s)
Definition gimple-range-op.cc:122
static bool supported_p(gimple *s)
Definition gimple-range-op.cc:110
tree m_op2
Definition gimple-range-op.h:46
gimple * stmt() const
Definition gimple-range-op.h:33
gimple * m_stmt
Definition gimple-range-op.h:45
tree operand2() const
Definition gimple-range-op.h:36
bool calc_op2(vrange &r, const vrange &lhs_range, const vrange &op1_range, relation_trio=TRIO_VARYING)
Definition gimple-range-op.cc:234
tree m_op1
Definition gimple-range-op.h:46
bool calc_op1(vrange &r, const vrange &lhs_range)
Definition gimple-range-op.cc:179
tree lhs() const
Definition gimple-range-op.h:34
void maybe_non_standard()
Definition gimple-range-op.cc:1172
Definition range-op.h:291
bool op2_range(vrange &r, tree type, const vrange &lhs, const vrange &op1, relation_trio=TRIO_VARYING) const
Definition range-op.cc:327
range_operator * m_operator
Definition range-op.h:330
Definition value-relation.h:331
Definition value-range.h:78
union tree_node * tree
Definition coretypes.h:97
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
unsigned gimple_range_ssa_names(tree *vec, unsigned vec_size, gimple *stmt)
Definition gimple-range-op.cc:54
tree gimple_get_lhs(const gimple *stmt)
Definition gimple.cc:1938
poly_int< N, C > r
Definition poly-int.h:770
Definition gimple.h:225
Definition vec.h:450
#define gcc_checking_assert(EXPR)
Definition system.h:828
#define TRIO_VARYING
Definition value-relation.h:350