GCC Middle and Back End API Reference
cselib.h File Reference

Go to the source code of this file.

Data Structures

struct  cselib_val_struct
struct  elt_loc_list
struct  cselib_set

Typedefs

typedef struct cselib_val_struct cselib_val
typedef rtx(* cselib_expand_callback )(rtx, bitmap, int, void *)

Enumerations

enum  cselib_record_what { CSELIB_RECORD_MEMORY = 1, CSELIB_PRESERVE_CONSTANTS = 2 }

Functions

cselib_valcselib_lookup (rtx, enum machine_mode, int, enum machine_mode)
cselib_valcselib_lookup_from_insn (rtx, enum machine_mode, int, enum machine_mode, rtx)
void cselib_init (int)
void cselib_clear_table (void)
void cselib_finish (void)
void cselib_process_insn (rtx)
bool fp_setter_insn (rtx)
enum machine_mode cselib_reg_set_mode (const_rtx)
int rtx_equal_for_cselib_p (rtx, rtx)
int references_value_p (const_rtx, int)
rtx cselib_expand_value_rtx (rtx, bitmap, int)
rtx cselib_expand_value_rtx_cb (rtx, bitmap, int, cselib_expand_callback, void *)
bool cselib_dummy_expand_value_rtx_cb (rtx, bitmap, int, cselib_expand_callback, void *)
rtx cselib_subst_to_values (rtx, enum machine_mode)
rtx cselib_subst_to_values_from_insn (rtx, enum machine_mode, rtx)
void cselib_invalidate_rtx (rtx)
void cselib_reset_table (unsigned int)
unsigned int cselib_get_next_uid (void)
void cselib_preserve_value (cselib_val *)
bool cselib_preserved_value_p (cselib_val *)
void cselib_preserve_only_values (void)
void cselib_preserve_cfa_base_value (cselib_val *, unsigned int)
void cselib_add_permanent_equiv (cselib_val *, rtx, rtx)
bool cselib_have_permanent_equivalences (void)
void cselib_set_value_sp_based (cselib_val *)
bool cselib_sp_based_value_p (cselib_val *)
void dump_cselib_table (FILE *)
static cselib_valcanonical_cselib_val ()

Variables

void(* cselib_discard_hook )(cselib_val *)
void(* cselib_record_sets_hook )(rtx insn, struct cselib_set *sets, int n_sets)

Typedef Documentation

typedef rtx(* cselib_expand_callback)(rtx, bitmap, int, void *)
typedef struct cselib_val_struct cselib_val
@verbatim Common subexpression elimination for GNU compiler.

Copyright (C) 1987-2013 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/.

Describe a value.   

Enumeration Type Documentation

Enumerator:
CSELIB_RECORD_MEMORY 
CSELIB_PRESERVE_CONSTANTS 

Function Documentation

static cselib_val* canonical_cselib_val ( )
inlinestatic
void cselib_add_permanent_equiv ( cselib_val ,
rtx  ,
rtx   
)
void cselib_clear_table ( void  )
Remove all entries from the hash table.  Also used during
   initialization.   

References cselib_reset_table().

Referenced by cselib_finish(), dse_step1(), and local_cprop_pass().

bool cselib_dummy_expand_value_rtx_cb ( rtx  orig,
bitmap  regs_active,
int  max_depth,
cselib_expand_callback  cb,
void *  data 
)
Similar to cselib_expand_value_rtx_cb, but no rtxs are actually copied
   or simplified.  Useful to find out whether cselib_expand_value_rtx_cb
   would return NULL or non-NULL, without allocating new rtx.   

References expand_value_data::callback, expand_value_data::callback_arg, cselib_expand_value_rtx_1(), expand_value_data::dummy, and expand_value_data::regs_active.

rtx cselib_expand_value_rtx ( rtx  ,
bitmap  ,
int   
)
rtx cselib_expand_value_rtx_cb ( rtx  orig,
bitmap  regs_active,
int  max_depth,
cselib_expand_callback  cb,
void *  data 
)
Same as cselib_expand_value_rtx, but using a callback to try to
   resolve some expressions.  The CB function should return ORIG if it
   can't or does not want to deal with a certain RTX.  Any other
   return value, including NULL, will be used as the expansion for
   VALUE, without any further changes.   

References expand_value_data::callback, expand_value_data::callback_arg, cselib_expand_value_rtx_1(), expand_value_data::dummy, and expand_value_data::regs_active.

Referenced by vt_expand_loc(), vt_expand_loc_callback(), and vt_expand_var_loc_chain().

unsigned int cselib_get_next_uid ( void  )
Return the number of the next value that will be generated.   

References next_uid.

Referenced by vt_emit_notes(), and vt_initialize().

bool cselib_have_permanent_equivalences ( void  )
Return TRUE if any permanent equivalences have been recorded since
   the table was last initialized.   

References cselib_any_perm_equivs.

Referenced by get_addr().

void cselib_init ( int  )
void cselib_invalidate_rtx ( rtx  )
cselib_val* cselib_lookup_from_insn ( rtx  x,
enum machine_mode  mode,
int  create,
enum machine_mode  memmode,
rtx  insn 
)
Wrapper for cselib_lookup, that indicates X is in INSN.   

References cselib_current_insn, and cselib_lookup().

Referenced by sched_analyze_1(), sched_analyze_2(), vt_add_function_parameter(), vt_init_cfa_base(), and vt_initialize().

void cselib_preserve_cfa_base_value ( cselib_val ,
unsigned  int 
)
void cselib_preserve_only_values ( void  )
Clean all non-constant expressions in the hash table, but retain
   their values.   

References cselib_invalidate_mem(), cselib_invalidate_regno(), first_containing_mem, and remove_useless_values().

Referenced by cselib_process_insn(), and vt_initialize().

void cselib_preserve_value ( cselib_val )
bool cselib_preserved_value_p ( cselib_val )
void cselib_process_insn ( rtx  )
enum machine_mode cselib_reg_set_mode ( const_rtx  )
void cselib_reset_table ( unsigned  int)
void cselib_set_value_sp_based ( cselib_val )
bool cselib_sp_based_value_p ( cselib_val )
rtx cselib_subst_to_values ( rtx  ,
enum  machine_mode 
)
rtx cselib_subst_to_values_from_insn ( rtx  ,
enum  machine_mode,
rtx   
)
void dump_cselib_table ( FILE *  )
bool fp_setter_insn ( rtx  )
int references_value_p ( const_rtx  ,
int   
)
int rtx_equal_for_cselib_p ( rtx  ,
rtx   
)

Variable Documentation

void(* cselib_discard_hook)(cselib_val *)
If nonnull, cselib will call this function before freeing useless
   VALUEs.  A VALUE is deemed useless if its "locs" field is null.   

Referenced by cselib_finish(), discard_useless_values(), and dse_step1().

void(* cselib_record_sets_hook)(rtx insn, struct cselib_set *sets, int n_sets)
If nonnull, cselib will call this function before recording sets or
   even clobbering outputs of INSN.  All the recorded sets will be
   represented in the array sets[n_sets].  new_val_min can be used to
   tell whether values present in sets are introduced by this
   instruction.   

Referenced by cselib_record_sets(), and vt_initialize().