Instruction idiom analysis abstract class.
More...
#include <idioms_abstract.h>
Instruction idiom analysis abstract class.
◆ IdiomsAbstract()
retdec::bin2llvmir::IdiomsAbstract::IdiomsAbstract |
( |
| ) |
|
|
protected |
◆ ~IdiomsAbstract()
virtual retdec::bin2llvmir::IdiomsAbstract::~IdiomsAbstract |
( |
| ) |
|
|
protectedvirtualdefault |
◆ doAnalysis()
virtual bool retdec::bin2llvmir::IdiomsAbstract::doAnalysis |
( |
llvm::Function & |
, |
|
|
llvm::Pass * |
|
|
) |
| |
|
protectedpure virtual |
◆ eraseInstFromBasicBlock()
void retdec::bin2llvmir::IdiomsAbstract::eraseInstFromBasicBlock |
( |
llvm::Value * |
val, |
|
|
llvm::BasicBlock * |
bb |
|
) |
| |
|
staticprotected |
Look for instruction by value and erase it from module.
- Parameters
-
val | instruction value to look for |
bb | BasicBlock to erase instruction from |
- Returns
- void
◆ findBranchDependingOn()
bool retdec::bin2llvmir::IdiomsAbstract::findBranchDependingOn |
( |
llvm::BranchInst ** |
br, |
|
|
llvm::BasicBlock & |
bb, |
|
|
const llvm::Value * |
val |
|
) |
| const |
|
protected |
Find a branch instruction in a BasicBlock
- Parameters
-
br | found branch instruction |
bb | basic block to look for br |
val | Value or Instruction with branch use |
◆ getArch()
CC_arch retdec::bin2llvmir::IdiomsAbstract::getArch |
( |
| ) |
const |
|
inlineprotected |
◆ getCompiler()
CC_compiler retdec::bin2llvmir::IdiomsAbstract::getCompiler |
( |
| ) |
const |
|
inlineprotected |
◆ getModule()
llvm::Module* retdec::bin2llvmir::IdiomsAbstract::getModule |
( |
| ) |
const |
|
inlineprotected |
◆ init()
void retdec::bin2llvmir::IdiomsAbstract::init |
( |
llvm::Module * |
M, |
|
|
CC_compiler |
cc, |
|
|
CC_arch |
arch |
|
) |
| |
|
protected |
◆ isPowerOfTwo()
bool retdec::bin2llvmir::IdiomsAbstract::isPowerOfTwo |
( |
unsigned |
x | ) |
|
|
staticprotected |
Is value a power of two?
- Parameters
-
- Returns
- true if value is power of two or zero
◆ isPowerOfTwoRepresentable()
bool retdec::bin2llvmir::IdiomsAbstract::isPowerOfTwoRepresentable |
( |
const llvm::ConstantInt * |
cnst | ) |
|
|
staticprotected |
Is 2^cnst
representable on the bit width of cnst?
If you want to compute pow(2, cnst)
, always ensure that isPowerOfTwoRepresentable(cnst)
returns true
.
◆ m_arch
CC_arch retdec::bin2llvmir::IdiomsAbstract::m_arch |
|
private |
◆ m_compiler
CC_compiler retdec::bin2llvmir::IdiomsAbstract::m_compiler |
|
private |
◆ m_module
llvm::Module* retdec::bin2llvmir::IdiomsAbstract::m_module |
|
private |
The documentation for this class was generated from the following files:
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/include/retdec/bin2llvmir/optimizations/idioms/idioms_abstract.h
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/src/bin2llvmir/optimizations/idioms/idioms_abstract.cpp