retdec
|
Information about the induction variable of a "while true" loop. More...
#include <loop_optimizer.h>
Public Member Functions | |
IndVarInfo (ShPtr< Statement > initStmt, ShPtr< Variable > indVar, ShPtr< Expression > exitCond, ShPtr< Statement > updateStmt, bool updateBeforeExit) | |
Public Attributes | |
ShPtr< Statement > | initStmt |
ShPtr< Variable > | indVar |
Induction variable – corresponds to (1) in the class description. More... | |
ShPtr< Expression > | exitCond |
Exit condition – corresponds to (2) in the class description. More... | |
ShPtr< Statement > | updateStmt |
bool | updateBeforeExit |
Is an update statement before exit condition? More... | |
Information about the induction variable of a "while true" loop.
Consider a "while true" loop that can be optimized into a for loop:
|
inline |
ShPtr<Expression> retdec::llvmir2hll::IndVarInfo::exitCond |
Exit condition – corresponds to (2) in the class description.
Induction variable – corresponds to (1) in the class description.
Initialization of the induction variable (either a definition or an assignment) – corresponds to (1) in the class description.
bool retdec::llvmir2hll::IndVarInfo::updateBeforeExit |
Is an update statement before exit condition?
Update of the induction variable – corresponds to (3) in the class description.