GCC Middle and Back End API Reference
rtx_iv Struct Reference

#include <cfgloop.h>

Collaboration diagram for rtx_iv:

Data Fields

rtx base
rtx step
enum iv_extend_code extend
rtx delta
rtx mult
enum machine_mode extend_mode
enum machine_mode mode
unsigned first_special: 1

Detailed Description

   Induction variable analysis.  
   The description of induction variable.  The things are a bit complicated
   due to need to handle subregs and extends.  The value of the object described
   by it can be obtained as follows (all computations are done in extend_mode):

   Value in i-th iteration is
     delta + mult * extend_{extend_mode} (subreg_{mode} (base + i * step)).

   If first_special is true, the value in the first iteration is
     delta + mult * base

   If extend = UNKNOWN, first_special must be false, delta 0, mult 1 and value is
     subreg_{mode} (base + i * step)

   The get_iv_value function can be used to obtain these expressions.

   ??? Add a third mode field that would specify the mode in that inner
   computation is done, which would enable it to be different from the
   outer one?  

Field Documentation

rtx rtx_iv::base
     Its base and step (mode of base and step is supposed to be extend_mode,
     see the description above).  

Referenced by iv_extend(), and record_biv().

rtx rtx_iv::delta
     Operations applied in the extended mode.  

Referenced by iv_extend(), and iv_mult().

enum iv_extend_code rtx_iv::extend
     The type of extend applied to it (IV_SIGN_EXTEND, IV_ZERO_EXTEND,

Referenced by iv_extend().

enum machine_mode rtx_iv::extend_mode
     The mode it is extended to.  

Referenced by analyze_insn_to_expand_var(), and iv_extend().

unsigned rtx_iv::first_special
     Whether the first iteration needs to be handled specially.  
enum machine_mode rtx_iv::mode
     The mode the variable iterates in.  

Referenced by analyze_insn_to_expand_var().

rtx rtx_iv::mult

Referenced by iv_extend(), and iv_mult().

rtx rtx_iv::step

The documentation for this struct was generated from the following file: