GCC Middle and Back End API Reference
rtx_iv Struct Reference

#include <cfgloop.h>

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


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