retdec
|
Implementation of the IR utilities. More...
#include "retdec/llvmir2hll/analysis/used_vars_visitor.h"
#include "retdec/llvmir2hll/ir/address_op_expr.h"
#include "retdec/llvmir2hll/ir/assign_stmt.h"
#include "retdec/llvmir2hll/ir/call_expr.h"
#include "retdec/llvmir2hll/ir/call_stmt.h"
#include "retdec/llvmir2hll/ir/cast_expr.h"
#include "retdec/llvmir2hll/ir/const_bool.h"
#include "retdec/llvmir2hll/ir/deref_op_expr.h"
#include "retdec/llvmir2hll/ir/empty_stmt.h"
#include "retdec/llvmir2hll/ir/for_loop_stmt.h"
#include "retdec/llvmir2hll/ir/function.h"
#include "retdec/llvmir2hll/ir/module.h"
#include "retdec/llvmir2hll/ir/not_op_expr.h"
#include "retdec/llvmir2hll/ir/return_stmt.h"
#include "retdec/llvmir2hll/ir/statement.h"
#include "retdec/llvmir2hll/ir/switch_stmt.h"
#include "retdec/llvmir2hll/ir/ufor_loop_stmt.h"
#include "retdec/llvmir2hll/ir/unreachable_stmt.h"
#include "retdec/llvmir2hll/ir/var_def_stmt.h"
#include "retdec/llvmir2hll/ir/variable.h"
#include "retdec/llvmir2hll/ir/while_loop_stmt.h"
#include "retdec/llvmir2hll/obtainer/calls_obtainer.h"
#include "retdec/llvmir2hll/support/debug.h"
#include "retdec/llvmir2hll/support/variable_replacer.h"
#include "retdec/llvmir2hll/utils/ir.h"
#include "retdec/utils/container.h"
#include "retdec/utils/string.h"
Namespaces | |
retdec | |
retdec::llvmir2hll | |
Functions | |
Operations Over Backend IR | |
void | retdec::llvmir2hll::sortByName (VarVector &vec) |
Sorts the given vector by the name of its elements (case-insensitively). More... | |
void | retdec::llvmir2hll::sortByName (VarInitPairVector &vec) |
Sorts the given vector by the name of its elements (case-insensitively). More... | |
ShPtr< Statement > | retdec::llvmir2hll::skipEmptyStmts (ShPtr< Statement > stmts) |
Skips empty statements in stmt. More... | |
ShPtr< Expression > | retdec::llvmir2hll::skipCasts (ShPtr< Expression > expr) |
Skips casts in the given expression and returns the first non-cast expression. More... | |
ShPtr< Expression > | retdec::llvmir2hll::skipDerefs (ShPtr< Expression > expr) |
Skips dereferences in the given expression and returns the first non-dereference expression. More... | |
ShPtr< Expression > | retdec::llvmir2hll::skipAddresses (ShPtr< Expression > expr) |
Skips addresses in the given expression and returns the first non-address expression. More... | |
bool | retdec::llvmir2hll::endsWithRetOrUnreach (ShPtr< Statement > stmts) |
Returns true if the sequence of statements stmts ends with a return or unreachable statement, false otherwise. More... | |
ShPtr< Expression > | retdec::llvmir2hll::getLhs (ShPtr< Statement > stmt) |
Returns the left-hand side of the given variable definition/assign statement. More... | |
ShPtr< Expression > | retdec::llvmir2hll::getRhs (ShPtr< Statement > stmt) |
Returns the right-hand side of the given variable definition/assign statement. More... | |
StmtVector | retdec::llvmir2hll::removeVarDefOrAssignStatement (ShPtr< Statement > stmt, ShPtr< Function > func) |
Removes the given variable definition/assignment statement. More... | |
void | retdec::llvmir2hll::replaceVarWithExprInStmt (ShPtr< Variable > var, ShPtr< Expression > expr, ShPtr< Statement > stmt) |
Replaces var with expr in stmt. More... | |
bool | retdec::llvmir2hll::isVarDefOrAssignStmt (ShPtr< Statement > stmt) |
Returns true if stmt is a VarDefStmt or AssignStmt, false otherwise. More... | |
bool | retdec::llvmir2hll::isLoop (ShPtr< Statement > stmt) |
Returns true if stmt is a loop, false otherwise. More... | |
bool | retdec::llvmir2hll::isInfiniteEmptyLoop (ShPtr< WhileLoopStmt > stmt) |
Returns true if the given loop is both empty and infinite, false otherwise. More... | |
bool | retdec::llvmir2hll::isWhileTrueLoop (ShPtr< WhileLoopStmt > stmt) |
Returns true if stmt is a while True loop, false otherwise. More... | |
ShPtr< Function > | retdec::llvmir2hll::getCalledFunc (ShPtr< CallExpr > callExpr, ShPtr< Module > module) |
Returns the function called in call. More... | |
std::string | retdec::llvmir2hll::getNameOfCalledFunc (ShPtr< CallExpr > callExpr, ShPtr< Module > module) |
Returns the name of the function called in call. More... | |
bool | retdec::llvmir2hll::isCallByPointer (ShPtr< Expression > callExpr, ShPtr< Module > module) |
Returns true if the given call expression callExpr in the given module is indirect (by a pointer), false otherwise. More... | |
ShPtr< Statement > | retdec::llvmir2hll::getInnermostLoop (ShPtr< Statement > stmt) |
Returns the innermost loop inside which stmt is. More... | |
ShPtr< Statement > | retdec::llvmir2hll::getInnermostLoopOrSwitch (ShPtr< Statement > stmt) |
Returns the innermost loop or switch inside which stmt is. More... | |
bool | retdec::llvmir2hll::isDefOfVar (ShPtr< Statement > stmt, ShPtr< Variable > var) |
Returns true if stmt defines var, false otherwise. More... | |
void | retdec::llvmir2hll::addLocalVarToFunc (ShPtr< Variable > var, ShPtr< Function > func, ShPtr< Expression > init) |
Adds var as a new local variable of func, possibly with an initializer init. More... | |
void | retdec::llvmir2hll::convertGlobalVarToLocalVarInFunc (ShPtr< Variable > var, ShPtr< Function > func, ShPtr< Expression > init) |
Converts the given global variable var into a local variable of func, possibly with the given initializer init. More... | |
Implementation of the IR utilities.