GCC Middle and Back End API Reference
sparseset.cc File Reference
#include "config.h"
#include "system.h"
#include "sparseset.h"
Include dependency graph for sparseset.cc:

Functions

sparseset sparseset_alloc (SPARSESET_ELT_TYPE n_elms)
static void sparseset_swap (sparseset s, SPARSESET_ELT_TYPE idx1, SPARSESET_ELT_TYPE idx2)
void sparseset_clear_bit (sparseset s, SPARSESET_ELT_TYPE e)
void sparseset_copy (sparseset d, sparseset s)
void sparseset_and (sparseset d, sparseset a, sparseset b)
void sparseset_and_compl (sparseset d, sparseset a, sparseset b)
void sparseset_ior (sparseset d, sparseset a, sparseset b)
bool sparseset_equal_p (sparseset a, sparseset b)

Function Documentation

◆ sparseset_alloc()

sparseset sparseset_alloc ( SPARSESET_ELT_TYPE n_elms)
SparseSet implementation. Copyright (C) 2007-2025 Free Software Foundation, Inc. Contributed by Peter Bergner <bergner@vnet.ibm.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Allocate and clear a n_elms SparseSet.

References sparseset_clear(), SPARSESET_ELT_TYPE, and VALGRIND_DISCARD.

Referenced by build_conflict_bit_table(), init_live_reload_and_inheritance_pseudos(), init_lives(), ira_create_allocno_live_ranges(), ira_flattening(), and lra_create_live_ranges_1().

◆ sparseset_and()

◆ sparseset_and_compl()

void sparseset_and_compl ( sparseset d,
sparseset a,
sparseset b )
Operation: D = A & ~B. Restrictions: D != B, unless D == A == B.

References a, b, EXECUTE_IF_SET_IN_SPARSESET, gcc_assert, sparseset_bit_p(), sparseset_cardinality(), sparseset_clear(), sparseset_clear_bit(), SPARSESET_ELT_TYPE, and sparseset_set_bit().

Referenced by process_bb_lives().

◆ sparseset_clear_bit()

◆ sparseset_copy()

void sparseset_copy ( sparseset d,
sparseset s )
Operation: D = S Restrictions: none.

References i, sparseset_def::members, sparseset_clear(), SPARSESET_ELT_TYPE, and sparseset_insert_bit().

Referenced by process_bb_lives(), sparseset_and(), and sparseset_ior().

◆ sparseset_equal_p()

bool sparseset_equal_p ( sparseset a,
sparseset b )
Operation: A == B Restrictions: none.

References a, b, EXECUTE_IF_SET_IN_SPARSESET, sparseset_bit_p(), sparseset_cardinality(), and SPARSESET_ELT_TYPE.

◆ sparseset_ior()

void sparseset_ior ( sparseset d,
sparseset a,
sparseset b )
Operation: D = A | B. Restrictions: none.

References a, b, EXECUTE_IF_SET_IN_SPARSESET, sparseset_copy(), SPARSESET_ELT_TYPE, and sparseset_set_bit().

Referenced by process_bb_lives().

◆ sparseset_swap()

void sparseset_swap ( sparseset s,
SPARSESET_ELT_TYPE idx1,
SPARSESET_ELT_TYPE idx2 )
inlinestatic
Low level routine not meant for use outside of sparseset.[ch]. Assumes idx1 < s->members and idx2 < s->members.

References SPARSESET_ELT_TYPE, and sparseset_insert_bit().

Referenced by sparseset_clear_bit().