Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Analysis and Representation of Loops   [Contents][Index]


15.6 IV analysis on RTL

The induction variable on RTL is simple and only allows analysis ofaffine induction variables, and only in one loop at once. The interfaceis declared incfgloop.h. Before analyzing induction variablesin a loop L,iv_analysis_loop_init function must be called on L.After the analysis (possibly callingiv_analysis_loop_init forseveral loops) is finished,iv_analysis_done should be called.The following functions can be used to access the results of theanalysis:

The description of the induction variable is provided instructrtx_iv. In order to handle subregs, the representation is a bitcomplicated; if the value of theextend field is notUNKNOWN, the value of the induction variable in the i-thiteration is

delta + mult * extend_{extend_mode} (subreg_{mode} (base + i * step)),

with the following exception: iffirst_special is true, then thevalue in the first iteration (wheni is zero) isdelta +mult * base. However, ifextend is equal toUNKNOWN,thenfirst_special must be false,delta 0,mult 1and the value in the i-th iteration is

subreg_{mode} (base + i * step)

The functionget_iv_value can be used to perform thesecalculations.


Next:Number of iterations analysis, Previous:Scalar evolutions, Up:Analysis and Representation of Loops   [Contents][Index]


[8]ページ先頭

©2009-2026 Movatter.jp