Common compiler instruction idioms.
More...
#include <idioms_common.h>
Common compiler instruction idioms.
◆ exchangeBitShiftMul()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeBitShiftMul |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
Exchange shift left by with a multiplication
- Parameters
-
- Returns
- replaced Instruction, otherwise nullptr
◆ exchangeBitShiftSDiv1()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeBitShiftSDiv1 |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
Exchange shift right with a division. ((X >> 31) & mask) | (X >> shift)
- Parameters
-
- Returns
- replaced Instruction, otherwise nullptr
◆ exchangeBitShiftUDiv()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeBitShiftUDiv |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
Exchange shift left with a division
- Parameters
-
- Returns
- replaced Instruction, otherwise nullptr
◆ exchangeDivByMinusTwo()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeDivByMinusTwo |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
Exchange -(((lshr(x, 31) + x) >> 1)) with -(x / 2)
- Parameters
-
- Returns
- replaced Instruction, otherwise nullptr
◆ exchangeGreaterEqualZero()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeGreaterEqualZero |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
Exchange: ((X u>> 31) ^ 1) --> X >= 0 ((X ^ -1) u>> 31) --> X >= 0
- Parameters
-
- Returns
- replaced Instruction, otherwise nullptr
◆ exchangeLessThanZero()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeLessThanZero |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
Exchange x u>> 31 with x < 0
- Parameters
-
- Returns
- replaced Instruction, otherwise nullptr
◆ exchangeSignedModulo2n()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeSignedModulo2n |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
◆ exchangeUnsignedModulo2n()
Instruction * retdec::bin2llvmir::IdiomsCommon::exchangeUnsignedModulo2n |
( |
llvm::BasicBlock::iterator |
iter | ) |
const |
|
protected |
Exchange x & (k - 1) with x % k
- Parameters
-
- Returns
- replaced Instruction, otherwise nullptr
◆ IdiomsAnalysis
The documentation for this class was generated from the following files:
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/include/retdec/bin2llvmir/optimizations/idioms/idioms_common.h
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/src/bin2llvmir/optimizations/idioms/idioms_common.cpp