GCC Middle and Back End API Reference
lists.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "gt-lists.h"
Include dependency graph for lists.cc:

Functions

static void free_list (rtx *, rtx *)
 
static rtxfind_list_elem (rtx elem, rtx *listp)
 
static void remove_list_node (rtx *listp)
 
rtx remove_list_elem (rtx elem, rtx *listp)
 
rtx_insn_listalloc_INSN_LIST (rtx val, rtx next)
 
rtx_expr_listalloc_EXPR_LIST (int kind, rtx val, rtx next)
 
void free_EXPR_LIST_list (rtx_expr_list **listp)
 
void free_INSN_LIST_list (rtx_insn_list **listp)
 
rtx_insn_listcopy_INSN_LIST (rtx_insn_list *link)
 
rtx_insn_listconcat_INSN_LIST (rtx_insn_list *copy, rtx_insn_list *old)
 
void free_EXPR_LIST_node (rtx ptr)
 
void free_INSN_LIST_node (rtx ptr)
 
void remove_free_INSN_LIST_elem (rtx_insn *elem, rtx_insn_list **listp)
 
rtx_insnremove_free_INSN_LIST_node (rtx_insn_list **listp)
 
rtx remove_free_EXPR_LIST_node (rtx_expr_list **listp)
 

Variables

static rtx unused_insn_list
 
static rtx unused_expr_list
 

Function Documentation

◆ alloc_EXPR_LIST()

rtx_expr_list * alloc_EXPR_LIST ( int kind,
rtx val,
rtx next )
This call is used in place of a gen_rtx_EXPR_LIST. If there is a cached
node available, we'll use it, otherwise a call to gen_rtx_EXPR_LIST
is made.   

References as_a(), gen_rtx_EXPR_LIST(), PUT_REG_NOTE_KIND, r, unused_expr_list, and XEXP.

Referenced by alloc_reg_note(), decl_piece_node(), emit_group_load_into_temps(), emit_group_move_into_temps(), iv_number_of_iterations(), push_reg_equiv_alt_mem(), shorten_into_mode(), and simplify_using_initial_values().

◆ alloc_INSN_LIST()

rtx_insn_list * alloc_INSN_LIST ( rtx val,
rtx next )
This call is used in place of a gen_rtx_INSN_LIST. If there is a cached
node available, we'll use it, otherwise a call to gen_rtx_INSN_LIST
is made.   

References as_a(), gcc_assert, gen_rtx_INSN_LIST(), GET_CODE, PUT_REG_NOTE_KIND, r, unused_insn_list, and XEXP.

Referenced by alloc_reg_note(), concat_INSN_LIST(), and copy_INSN_LIST().

◆ concat_INSN_LIST()

rtx_insn_list * concat_INSN_LIST ( rtx_insn_list * copy,
rtx_insn_list * old )
Duplicate the INSN_LIST elements of COPY and prepend them to OLD.   

References alloc_INSN_LIST(), PUT_REG_NOTE_KIND, and REG_NOTE_KIND.

◆ copy_INSN_LIST()

rtx_insn_list * copy_INSN_LIST ( rtx_insn_list * link)
Make a copy of the INSN_LIST list LINK and return it.   

References alloc_INSN_LIST(), link::next, NULL, and XEXP.

◆ find_list_elem()

static rtx * find_list_elem ( rtx elem,
rtx * listp )
static
Find corresponding to ELEM node in the list pointed to by LISTP.
This node must exist in the list.  Returns pointer to that node.   

References XEXP.

Referenced by remove_list_elem().

◆ free_EXPR_LIST_list()

void free_EXPR_LIST_list ( rtx_expr_list ** listp)
This function will free up an entire list of EXPR_LIST nodes.   

References free_list(), and unused_expr_list.

Referenced by free_reg_equiv(), and simplify_using_initial_values().

◆ free_EXPR_LIST_node()

◆ free_INSN_LIST_list()

void free_INSN_LIST_list ( rtx_insn_list ** listp)
This function will free up an entire list of INSN_LIST nodes.   

References free_list(), and unused_insn_list.

◆ free_INSN_LIST_node()

void free_INSN_LIST_node ( rtx ptr)
This function will free up an individual INSN_LIST node.   

References gcc_assert, GET_CODE, unused_insn_list, and XEXP.

Referenced by remove_free_INSN_LIST_elem(), and remove_free_INSN_LIST_node().

◆ free_list()

static void free_list ( rtx * listp,
rtx * unused_listp )
static
List management for the GCC expander.
   Copyright (C) 1987-2024 Free Software Foundation, Inc.

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/>.   
This function will free an entire list of either EXPR_LIST, INSN_LIST
or DEPS_LIST nodes.  This is to be used only on lists that consist
exclusively of nodes of one type only.  This is only called by
free_EXPR_LIST_list, free_INSN_LIST_list and free_DEPS_LIST_list.   

References gcc_assert, GET_CODE, unused_insn_list, and XEXP.

Referenced by free_EXPR_LIST_list(), and free_INSN_LIST_list().

◆ remove_free_EXPR_LIST_node()

rtx remove_free_EXPR_LIST_node ( rtx_expr_list ** listp)
Remove and free the first node in the EXPR_LIST pointed to by LISTP.   

References free_EXPR_LIST_node(), remove_list_node(), and XEXP.

◆ remove_free_INSN_LIST_elem()

void remove_free_INSN_LIST_elem ( rtx_insn * elem,
rtx_insn_list ** listp )
Remove and free corresponding to ELEM node in the INSN_LIST pointed to
by LISTP.   

References free_INSN_LIST_node(), and remove_list_elem().

◆ remove_free_INSN_LIST_node()

rtx_insn * remove_free_INSN_LIST_node ( rtx_insn_list ** listp)
Remove and free the first node in the INSN_LIST pointed to by LISTP.   

References free_INSN_LIST_node(), rtx_insn_list::insn(), and remove_list_node().

◆ remove_list_elem()

rtx remove_list_elem ( rtx elem,
rtx * listp )
Removes corresponding to ELEM node from the list pointed to by LISTP.
Returns that node.   

References find_list_elem(), and remove_list_node().

Referenced by remove_free_INSN_LIST_elem().

◆ remove_list_node()

static void remove_list_node ( rtx * listp)
static
Remove the node pointed to by LISTP from the list.   

References XEXP.

Referenced by remove_free_EXPR_LIST_node(), remove_free_INSN_LIST_node(), and remove_list_elem().

Variable Documentation

◆ unused_expr_list

rtx unused_expr_list
static
An EXPR_LIST containing all EXPR_LISTs allocated but currently unused.   

Referenced by alloc_EXPR_LIST(), free_EXPR_LIST_list(), and free_EXPR_LIST_node().

◆ unused_insn_list

rtx unused_insn_list
static
Functions for maintaining cache-able lists of EXPR_LIST and INSN_LISTs.   
An INSN_LIST containing all INSN_LISTs allocated but currently unused.   

Referenced by alloc_INSN_LIST(), free_INSN_LIST_list(), free_INSN_LIST_node(), and free_list().