GCC Middle and Back End API Reference
rtx_iv Class Reference

#include <cfgloop.h>

Collaboration diagram for rtx_iv:

Data Fields

rtx base
 
rtx step
 
enum iv_extend_code extend
 
rtx delta
 
rtx mult
 
scalar_int_mode extend_mode
 
scalar_int_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

◆ base

◆ delta

◆ extend

enum iv_extend_code rtx_iv::extend

Referenced by canonicalize_iv_subregs(), and iv_add().

◆ extend_mode

◆ first_special

unsigned rtx_iv::first_special

Referenced by canonicalize_iv_subregs().

◆ mode

◆ mult

rtx rtx_iv::mult

Referenced by canonicalize_iv_subregs().

◆ step


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