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
   Return the canonical value for VAL, following the equivalence chain
   towards the earliest (== lowest uid) equivalent value.  

Referenced by cselib_invalidate_regno(), discard_useless_locs(), drop_overlapping_mem_locs(), and refs_newer_value_cb().

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.  

Referenced by fp_setter_insn().

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, 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.  

Referenced by loc_exp_insert_dep().

void cselib_finish ( void  )
   Called when the current user is done with cselib.  

Referenced by chain_to_prev_insn_p().

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

Referenced by emit_notes_for_changes().

bool cselib_have_permanent_equivalences ( void  )
   Return TRUE if any permanent equivalences have been recorded since
   the table was last initialized.  
void cselib_init ( int  )
void cselib_invalidate_rtx ( rtx  )
cselib_val* cselib_lookup ( rtx  x,
enum machine_mode  mode,
int  create,
enum machine_mode  memmode 
)
   Wrapper for cselib_lookup_1, that logs the lookup result and
   maintains invariants related with debug insns.  
     ??? Should we return NULL if we're not to create an entry, the
     found loc is a debug loc and cselib_current_insn is not DEBUG?
     If so, we should also avoid converting val to non-DEBUG; probably
     easiest setting cselib_current_insn to NULL before the call
     above.  

Referenced by add_stores(), cselib_invalidate_regno(), cselib_reg_set_mode(), dataflow_set_destroy(), debug_ilist(), and vt_stack_adjustments().

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.  

Referenced by sched_analyze_2().

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.  
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 fp_setter_insn().

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.