1 // Instruction-related utilities for RTL SSA -*- C++ -*-
2 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
4 // This file is part of GCC.
6 // GCC is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU General Public License as published by the Free
8 // Software Foundation; either version 3, or (at your option) any later
11 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 // You should have received a copy of the GNU General Public License
17 // along with GCC; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
22 // Return whichever of INSN1 and INSN2 occurs earlier in the function's
25 earlier_insn (insn_info
*insn1
, insn_info
*insn2
)
27 return *insn1
< *insn2
? insn1
: insn2
;
30 // Return whichever of INSN1 and INSN2 occurs later in the function's
33 later_insn (insn_info
*insn1
, insn_info
*insn2
)
35 return *insn1
< *insn2
? insn2
: insn1
;
38 // Return a closure of operator== for INSN. See insn_is_changing for
39 // the rationale for defining the function this way.
40 inline insn_is_closure
41 insn_is (const insn_info
*insn
)
43 return insn_is_closure (insn
);