GCC Middle and Back End API Reference
sparseset.c File Reference

Functions

sparseset sparseset_alloc ()
static void sparseset_swap ()
void sparseset_clear_bit ()
void sparseset_copy ()
void sparseset_and ()
void sparseset_and_compl ()
void sparseset_ior ()
bool sparseset_equal_p ()

Function Documentation

sparseset sparseset_alloc ( )
@verbatim 

SparseSet implementation. Copyright (C) 2007-2013 Free Software Foundation, Inc. Contributed by Peter Bergner bergn.nosp@m.er@v.nosp@m.net.i.nosp@m.bm.c.nosp@m.om

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.  
     Mark the sparseset as defined to silence some valgrind uninitialized
     read errors when accessing set->sparse[n] when "n" is not, and never has
     been, in the set.  These uninitialized reads are expected, by design and
     harmless.  

Referenced by finish_live_range_start_chains(), ira_print_live_range_list(), and update_lives().

void sparseset_and ( )
   Operation: D = A & B.
   Restrictions: none.  
void sparseset_and_compl ( )
   Operation: D = A & ~B.
   Restrictions: D != B, unless D == A == B.  
void sparseset_clear_bit ( )
   Operation: S = S - {e}
   Delete e from the set S if it is a member of S.  
         If we are iterating over this set and we want to delete a
         member we've already visited, then we swap the element we
         want to delete with the element at the current iteration
         index so that it plays well together with the code below
         that actually removes the element.  
         Replace the element we want to delete with the last element
         in the dense array and then decrement s->members, effectively
         removing the element we want to delete.  

References sparseset_def::iter, sparseset_def::iter_inc, and sparseset_swap().

void sparseset_copy ( )
   Operation: D = S
   Restrictions: none.  

Referenced by sparseset_ior().

bool sparseset_equal_p ( )
   Operation: A == B
   Restrictions: none.  
void sparseset_ior ( )
   Operation: D = A | B.
   Restrictions: none.  

References sparseset_copy(), and sparseset_set_bit().

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

Referenced by sparseset_clear_bit().