retdec
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
retdec::bin2llvmir Namespace Reference

Namespaces

 capstone_utils
 
 inst_opt
 
 inst_opt_rda
 
 llvm_utils
 
 names
 
 st_match
 
 x86_addr_spaces
 

Classes

class  CtorDtor
 
class  IndirectlyCalledFuncsAnalysis
 Analysis for finding out which functions can be indirectly called. More...
 
class  ReachableFuncsAnalysis
 Analysis for finding out which defined functions are directly and indirectly reachable from some function. More...
 
class  Definition
 
class  Use
 
class  BasicBlockEntry
 
class  ReachingDefinitionsAnalysis
 
class  SymbolicTree
 
class  AsmInstructionRemover
 
class  Class
 
class  ClassHierarchy
 
class  ClassHierarchyAnalysis
 
class  CondBranchOpt
 
class  ConstantsAnalysis
 
class  Decoder
 
class  RangesToDecode
 
class  JumpTarget
 
class  JumpTargets
 
class  DumpModule
 
class  Idioms
 Instruction idiom analysis. More...
 
class  IdiomsAbstract
 Instruction idiom analysis abstract class. More...
 
class  IdiomsAnalysis
 
class  IdiomsBorland
 Borland C/C++ instruction idioms. More...
 
class  IdiomsCommon
 Common compiler instruction idioms. More...
 
class  IdiomsGCC
 GNU/GCC instruction idioms. More...
 
class  IdiomsIntel
 Intel compiler instruction idioms. More...
 
class  IdiomsLLVM
 clang/LLVM instruction idioms More...
 
class  IdiomsMagicDivMod
 Division and modulo using magic number. More...
 
class  IdiomsOWatcom
 Open Watcom instruction idioms. More...
 
class  IdiomsVStudio
 Visual Studio instruction idioms. More...
 
class  IdiomsLibgcc
 
class  InstructionOptimizer
 
class  InstructionRdaOptimizer
 
class  MainDetection
 
class  Collector
 
class  CollectorProvider
 
class  CollectorPic32
 
class  ReturnEntry
 
class  CallableEntry
 
class  FunctionEntry
 
class  CallEntry
 
class  DataFlowEntry
 
class  FilterableLayout
 
class  Filter
 
class  FilterProvider
 
class  MSX64Filter
 
class  ParamReturn
 
class  PhiRemover
 
class  ProviderInitialization
 
class  RegisterLocalization
 
class  SelectFunctions
 
class  ValueEntry
 
struct  ValueEntryHash
 
class  TypeEntry
 
struct  TypeEntryHash
 
class  EquationEntry
 
struct  EquationEntryHash
 
class  EqSet
 
class  EqSetContainer
 
class  SimpleTypesAnalysis
 
class  StackAnalysis
 
class  StackPointerOpsRemove
 
class  SyscallFixer
 
class  TypesPropagator
 
class  UnreachableFuncs
 Removes unreachable functions from main. More...
 
class  ValueProtect
 
class  BitcodeWriter
 
class  ConfigWriter
 
class  DsmWriter
 
class  LlvmIrWriter
 
class  X86AddressSpacesPass
 
class  X87FpuAnalysis
 
class  Abi
 
class  AbiProvider
 
class  AbiArm
 
class  AbiArm64
 
class  AbiMips
 
class  AbiMips64
 
class  AbiMS_X64
 
class  AbiPic32
 
class  AbiPowerpc
 
class  AbiPowerpc64
 
class  AbiX64
 
class  AbiX86
 
class  AsmInstruction
 
class  ArmCallingConvention
 
class  Arm64CallingConvention
 
class  CallingConvention
 
class  CallingConventionProvider
 
class  MipsCallingConvention
 
class  MipsPSPCallingConvention
 
class  Mips64CallingConvention
 
class  Pic32CallingConvention
 
class  PowerPCCallingConvention
 
class  PowerPC64CallingConvention
 
class  X64CallingConvention
 
class  MicrosoftX64CallingConvention
 
class  SystemVX64CallingConvention
 
class  CdeclCallingConvention
 
class  X86CallingConvention
 
class  FastcallCallingConvention
 
class  PascalFastcallCallingConvention
 
class  PascalCallingConvention
 
class  ThiscallCallingConvention
 
class  WatcomCallingConvention
 
class  Config
 
class  ConfigProvider
 
class  DebugFormat
 
class  DebugFormatProvider
 
class  Demangler
 
class  DemanglerFactory
 Class for creating demanglers. More...
 
class  DemanglerProvider
 
class  FileImage
 
class  FileImageProvider
 
class  Lti
 
class  LtiProvider
 
class  Name
 
class  Names
 
class  NameContainer
 
class  NamesProvider
 
class  Ctypes2LlvmTypeVisitor
 
class  IrModifier
 
class  IdiomsLibgccImpl
 
class  FunctionAnalyzeMetadata
 

Typedefs

using Changed = bool
 
using BBEntrySet = std::unordered_set< BasicBlockEntry * >
 
using DefSet = std::unordered_set< Definition * >
 
using UseSet = std::unordered_set< Use * >
 
using DefVector = std::vector< Definition >
 
using UseVector = std::vector< Use >
 
typedef FilterableLayout::Order OrderID
 
using ValueEntrySet = std::unordered_set< ValueEntry, ValueEntryHash >
 
using TypeEntrySet = std::unordered_set< TypeEntry, TypeEntryHash >
 
using EquationEntrySet = std::unordered_set< EquationEntry, EquationEntryHash >
 
using ValueMap = std::unordered_map< llvm::Value *, EqSet * >
 
using ValuePair = std::pair< llvm::Value *, llvm::Value * >
 
using ValuePairList = std::list< ValuePair >
 
using Llvm2CapstoneInsnMap = typename std::map< llvm::StoreInst *, cs_insn * >
 

Enumerations

enum  CC_compiler {
  CC_ANY = 0 , CC_Borland , CC_GCC , CC_Intel ,
  CC_LLVM , CC_OWatcom , CC_VStudio
}
 Compiler type. More...
 
enum  CC_arch {
  ARCH_ANY = 0 , ARCH_MIPS , ARCH_POWERPC , ARCH_ARM ,
  ARCH_THUMB , ARCH_x86
}
 Target architecture. More...
 
enum class  eSourcePriority { PRIORITY_NONE = 0 , PRIORITY_LTI , PRIORITY_DEBUG }
 

Functions

template<typename T >
std::string llvmObjToString (const T *t)
 
std::string llvmObjToString (const llvm::Module *t)
 
void dumpModuleToFile (const llvm::Module *m, fs::path dirName, const std::string &fileName="")
 
void dumpControFlowToJson (llvm::Module *m, fs::path dirName, const std::string &fileName="control-flow.json")
 
std::ostream & operator<< (std::ostream &out, const ReachingDefinitionsAnalysis &rda)
 
std::ostream & operator<< (std::ostream &out, const BasicBlockEntry &bbe)
 
llvm::Instruction * defInBasicBlock (llvm::Value *v, llvm::BasicBlock *bb, llvm::Instruction *start=nullptr)
 
bool usesInBasicBlock (llvm::Value *v, llvm::BasicBlock *bb, std::set< llvm::Instruction * > &uses, llvm::Instruction *start=nullptr)
 
std::ostream & operator<< (std::ostream &out, const SymbolicTree &s)
 
static RegisterPass< AsmInstructionRemoverX ("retdec-remove-asm-instrs", "Assembly mapping instruction removal", false, false)
 
static RegisterPass< ClassHierarchyAnalysisRegisterPass ("retdec-class-hierarchy", "C++ class hierarchy optimization", false, false)
 
static RegisterPass< CondBranchOptX ("retdec-cond-branch-opt", "Conditional branch optimization", false, false)
 
static RegisterPass< ConstantsAnalysisX ("retdec-constants", "Constants optimization", false, false)
 
bool insnWrittesPc (csh &ce, cs_insn *insn)
 
bool looksLikeArmFunctionStart (cs_insn *insn)
 
bool insnWrittesPcArm64 (csh &ce, cs_insn *insn)
 
bool looksLikeArm64FunctionStart (cs_insn *insn)
 
static llvm::RegisterPass< DecoderX ("retdec-decoder", "Input binary to LLVM IR decoding", false, false)
 
std::ostream & operator<< (std::ostream &os, const RangesToDecode &rs)
 
std::ostream & operator<< (std::ostream &out, const JumpTarget &jt)
 
std::ostream & operator<< (std::ostream &out, const JumpTargets &jts)
 
bool isBadBranch (FileImage *img, cs_insn *br)
 
static RegisterPass< DumpModuleX ("retdec-dump-module", "Module to LLVM IR file dumper", false, false)
 
RegisterPass< IdiomsIdiomsRegistered ("retdec-idioms", "Instruction idioms optimization", false, false)
 
template<>
llvm::Value * IdiomsLibgccImpl::getOp0< std::int32_t > (llvm::CallInst *call)
 
template<>
llvm::Value * IdiomsLibgccImpl::getOp0< std::int64_t > (llvm::CallInst *call)
 
template<>
llvm::Value * IdiomsLibgccImpl::getOp1< std::int32_t > (llvm::CallInst *call)
 
template<>
llvm::Value * IdiomsLibgccImpl::getOp1< std::int64_t > (llvm::CallInst *call)
 
template<>
llvm::Value * IdiomsLibgccImpl::getRes0< std::int32_t > (llvm::CallInst *call, llvm::Value *res)
 
template<>
llvm::Value * IdiomsLibgccImpl::getRes0< std::int64_t > (llvm::CallInst *call, llvm::Value *res)
 
template<>
llvm::Value * IdiomsLibgccImpl::getRes1< std::int32_t > (llvm::CallInst *call, llvm::Value *res)
 
template<>
llvm::Value * IdiomsLibgccImpl::getRes1< std::int64_t > (llvm::CallInst *call, llvm::Value *res)
 
static RegisterPass< IdiomsLibgccX ("retdec-idioms-libgcc", "Libgcc idioms optimization", false, false)
 
static RegisterPass< InstructionOptimizerX ("retdec-inst-opt", "LLVM instruction optimization", false, false)
 
static RegisterPass< InstructionRdaOptimizerX ("retdec-inst-opt-rda", "LLVM instruction optimization using RDA", false, false)
 
static RegisterPass< MainDetectionX ("retdec-main-detection", "Main function identification optimization", false, false)
 
static RegisterPass< ParamReturnX ("retdec-param-return", "Function parameters and returns optimization", false, false)
 
static llvm::RegisterPass< PhiRemoverX ("retdec-remove-phi", "Phi removal", false, false)
 
common::Address getInstAddress (const llvm::Instruction *i)
 
llvm::MDNode * getInstAddressMeta (common::Address a, llvm::Module *m)
 
common::Pattern saveCryptoRule (const yaracpp::YaraRule &rule, retdec::fileformat::FileFormat *file)
 
static RegisterPass< ProviderInitializationX ("retdec-provider-init", "Providers initialization", false, false)
 
static RegisterPass< RegisterLocalizationX ("retdec-register-localization", "Make all registers local", false, false)
 
static RegisterPass< SelectFunctionsX ("retdec-select-fncs", "Selected functions optimization", false, false)
 
std::string priority2string (eSourcePriority p)
 
static RegisterPass< SimpleTypesAnalysisX ("retdec-simple-types", "Simple types recovery optimization", false, false)
 
std::ostream & operator<< (std::ostream &out, const EqSetContainer &eqs)
 
std::ostream & operator<< (std::ostream &out, const EqSet &eq)
 
std::ostream & operator<< (std::ostream &out, const ValueEntry &ve)
 
std::ostream & operator<< (std::ostream &out, const TypeEntry &te)
 
std::ostream & operator<< (std::ostream &out, const EquationEntry &ee)
 
static RegisterPass< StackAnalysisX ("retdec-stack", "Stack optimization", false, false)
 
static RegisterPass< StackPointerOpsRemoveX ("retdec-stack-ptr-op-remove", "Stack pointer operations optimization", false, false)
 
static RegisterPass< SyscallFixerX ("retdec-syscalls", "Syscalls optimization", false, false)
 
static llvm::RegisterPass< TypesPropagatorX ("retdec-types-propagation", "Data types propagation", false, false)
 
RegisterPass< UnreachableFuncsUnreachableFuncsRegistered ("retdec-unreachable-funcs", "Unreachable functions optimization", false, false)
 
static RegisterPass< ValueProtectX ("retdec-value-protect", "Value protection optimization", false, false)
 
void _getConstantExprInstructionUsers (llvm::ConstantExpr *expr, std::set< llvm::Instruction * > &users, std::set< llvm::ConstantExpr * > &seen)
 
void getConstantExprInstructionUsers (llvm::ConstantExpr *expr, std::set< llvm::Instruction * > &users)
 
static RegisterPass< BitcodeWriterX ("retdec-write-bc", "Generate the current bitcode", false, false)
 
std::unique_ptr< ToolOutputFile > createBitcodeOutputFile (const std::string &outputFile)
 
static RegisterPass< ConfigWriterX ("retdec-write-config", "Generate the current config", false, false)
 
static llvm::RegisterPass< DsmWriterX ("retdec-write-dsm", "Disassembly generation", false, false)
 
static RegisterPass< LlvmIrWriterX ("retdec-write-ll", "Generate the current LLVM IR", false, false)
 
std::unique_ptr< ToolOutputFile > createAssemblyOutputFile (const std::string &outputFile)
 
static RegisterPass< X86AddressSpacesPassX ("retdec-x86-addr-spaces", "x86 address spaces optimization", false, false)
 
int augmentedRank (Eigen::MatrixXd &A, Eigen::MatrixXd &B)
 
static RegisterPass< X87FpuAnalysisX ("retdec-x87-fpu", "x87 fpu register analysis", false, false)
 
std::list< FunctionAnalyzeMetadatagetFunctions2Analyze (llvm::GlobalVariable *top)
 
retdec::common::Address getBasicBlockAddressFromName (llvm::BasicBlock *b)
 
std::ostream & operator<< (std::ostream &out, const AsmInstruction &a)
 
void _eraseUnusedInstructionRecursive (const std::unordered_set< llvm::Value * > &workset)
 

Variables

retdec::config::Config _emptyConfig
 

Typedef Documentation

◆ BBEntrySet

using retdec::bin2llvmir::BBEntrySet = typedef std::unordered_set<BasicBlockEntry*>

◆ Changed

using retdec::bin2llvmir::Changed = typedef bool

◆ DefSet

using retdec::bin2llvmir::DefSet = typedef std::unordered_set<Definition*>

◆ DefVector

using retdec::bin2llvmir::DefVector = typedef std::vector<Definition>

◆ EquationEntrySet

◆ Llvm2CapstoneInsnMap

using retdec::bin2llvmir::Llvm2CapstoneInsnMap = typedef typename std::map<llvm::StoreInst*, cs_insn*>

◆ OrderID

◆ TypeEntrySet

using retdec::bin2llvmir::TypeEntrySet = typedef std::unordered_set<TypeEntry, TypeEntryHash>

◆ UseSet

using retdec::bin2llvmir::UseSet = typedef std::unordered_set<Use*>

◆ UseVector

using retdec::bin2llvmir::UseVector = typedef std::vector<Use>

◆ ValueEntrySet

using retdec::bin2llvmir::ValueEntrySet = typedef std::unordered_set<ValueEntry, ValueEntryHash>

◆ ValueMap

using retdec::bin2llvmir::ValueMap = typedef std::unordered_map<llvm::Value*, EqSet*>

◆ ValuePair

using retdec::bin2llvmir::ValuePair = typedef std::pair<llvm::Value*, llvm::Value*>

◆ ValuePairList

using retdec::bin2llvmir::ValuePairList = typedef std::list<ValuePair>

Enumeration Type Documentation

◆ CC_arch

Target architecture.

Enumerator
ARCH_ANY 
ARCH_MIPS 
ARCH_POWERPC 
ARCH_ARM 
ARCH_THUMB 
ARCH_x86 

◆ CC_compiler

Compiler type.

Enumerator
CC_ANY 
CC_Borland 
CC_GCC 
CC_Intel 
CC_LLVM 
CC_OWatcom 
CC_VStudio 

◆ eSourcePriority

Priority of data type sources. Higher values have higher priority.

Enumerator
PRIORITY_NONE 
PRIORITY_LTI 
PRIORITY_DEBUG 

Function Documentation

◆ _eraseUnusedInstructionRecursive()

void retdec::bin2llvmir::_eraseUnusedInstructionRecursive ( const std::unordered_set< llvm::Value * > &  workset)

◆ _getConstantExprInstructionUsers()

void retdec::bin2llvmir::_getConstantExprInstructionUsers ( llvm::ConstantExpr *  expr,
std::set< llvm::Instruction * > &  users,
std::set< llvm::ConstantExpr * > &  seen 
)

◆ augmentedRank()

int retdec::bin2llvmir::augmentedRank ( Eigen::MatrixXd &  A,
Eigen::MatrixXd &  B 
)

◆ createAssemblyOutputFile()

std::unique_ptr<ToolOutputFile> retdec::bin2llvmir::createAssemblyOutputFile ( const std::string &  outputFile)

Create assembly output file object.

◆ createBitcodeOutputFile()

std::unique_ptr<ToolOutputFile> retdec::bin2llvmir::createBitcodeOutputFile ( const std::string &  outputFile)

Create bitcode output file object.

◆ defInBasicBlock()

llvm::Instruction* retdec::bin2llvmir::defInBasicBlock ( llvm::Value *  v,
llvm::BasicBlock *  bb,
llvm::Instruction *  start = nullptr 
)

Find the last definition of value v in basic block bb. If start is defined (not nullptr), start the reverse iteration search from this instruction, otherwise start from the basic block's back.

Returns
Instruction defining v (at most one definition is possible in BB), or nullptr if definition not found.

◆ dumpControFlowToJson()

void retdec::bin2llvmir::dumpControFlowToJson ( llvm::Module *  m,
fs::path  dirName,
const std::string &  fileName = "control-flow.json" 
)

◆ dumpModuleToFile()

void retdec::bin2llvmir::dumpModuleToFile ( const llvm::Module *  m,
fs::path  dirName,
const std::string &  fileName = "" 
)

◆ getBasicBlockAddressFromName()

retdec::common::Address retdec::bin2llvmir::getBasicBlockAddressFromName ( llvm::BasicBlock *  b)

◆ getConstantExprInstructionUsers()

void retdec::bin2llvmir::getConstantExprInstructionUsers ( llvm::ConstantExpr *  expr,
std::set< llvm::Instruction * > &  users 
)

Recursively collect all instrucions where expr is used.

◆ getFunctions2Analyze()

std::list<FunctionAnalyzeMetadata> retdec::bin2llvmir::getFunctions2Analyze ( llvm::GlobalVariable *  top)

◆ getInstAddress()

common::Address retdec::bin2llvmir::getInstAddress ( const llvm::Instruction *  i)

◆ getInstAddressMeta()

llvm::MDNode* retdec::bin2llvmir::getInstAddressMeta ( common::Address  a,
llvm::Module *  m 
)

◆ IdiomsLibgccImpl::getOp0< std::int32_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getOp0< std::int32_t > ( llvm::CallInst *  call)

◆ IdiomsLibgccImpl::getOp0< std::int64_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getOp0< std::int64_t > ( llvm::CallInst *  call)

◆ IdiomsLibgccImpl::getOp1< std::int32_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getOp1< std::int32_t > ( llvm::CallInst *  call)

◆ IdiomsLibgccImpl::getOp1< std::int64_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getOp1< std::int64_t > ( llvm::CallInst *  call)

◆ IdiomsLibgccImpl::getRes0< std::int32_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getRes0< std::int32_t > ( llvm::CallInst *  call,
llvm::Value *  res 
)

◆ IdiomsLibgccImpl::getRes0< std::int64_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getRes0< std::int64_t > ( llvm::CallInst *  call,
llvm::Value *  res 
)

◆ IdiomsLibgccImpl::getRes1< std::int32_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getRes1< std::int32_t > ( llvm::CallInst *  call,
llvm::Value *  res 
)

◆ IdiomsLibgccImpl::getRes1< std::int64_t >()

template<>
llvm::Value* retdec::bin2llvmir::IdiomsLibgccImpl::getRes1< std::int64_t > ( llvm::CallInst *  call,
llvm::Value *  res 
)

◆ IdiomsRegistered()

RegisterPass<Idioms> retdec::bin2llvmir::IdiomsRegistered ( "retdec-idioms"  ,
"Instruction idioms optimization"  ,
false  ,
false   
)

◆ insnWrittesPc()

bool retdec::bin2llvmir::insnWrittesPc ( csh &  ce,
cs_insn *  insn 
)

◆ insnWrittesPcArm64()

bool retdec::bin2llvmir::insnWrittesPcArm64 ( csh &  ce,
cs_insn *  insn 
)

◆ isBadBranch()

bool retdec::bin2llvmir::isBadBranch ( FileImage img,
cs_insn *  br 
)

Patterns of branch instructions that does not make sense and should not be accepted.

◆ llvmObjToString() [1/2]

std::string retdec::bin2llvmir::llvmObjToString ( const llvm::Module *  t)

We need special function for Module printing because its print method takes one more parameter.

Parameters
tModule to print.
Returns
String with printed module.

◆ llvmObjToString() [2/2]

template<typename T >
std::string retdec::bin2llvmir::llvmObjToString ( const T *  t)

Print any LLVM object which implements print(llvm::raw_string_ostream&) method into std::string.

Parameters
tLLVM object to print.
Returns
String with printed object.

◆ looksLikeArm64FunctionStart()

bool retdec::bin2llvmir::looksLikeArm64FunctionStart ( cs_insn *  insn)

◆ looksLikeArmFunctionStart()

bool retdec::bin2llvmir::looksLikeArmFunctionStart ( cs_insn *  insn)

◆ operator<<() [1/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  os,
const RangesToDecode rs 
)

◆ operator<<() [2/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const AsmInstruction a 
)

◆ operator<<() [3/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const BasicBlockEntry bbe 
)

◆ operator<<() [4/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const EqSet eq 
)

◆ operator<<() [5/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const EqSetContainer eqs 
)

◆ operator<<() [6/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const EquationEntry ee 
)

◆ operator<<() [7/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const JumpTarget jt 
)

◆ operator<<() [8/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const JumpTargets jts 
)

◆ operator<<() [9/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const ReachingDefinitionsAnalysis rda 
)

◆ operator<<() [10/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const SymbolicTree s 
)

◆ operator<<() [11/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const TypeEntry te 
)

◆ operator<<() [12/12]

std::ostream& retdec::bin2llvmir::operator<< ( std::ostream &  out,
const ValueEntry ve 
)

◆ priority2string()

std::string retdec::bin2llvmir::priority2string ( eSourcePriority  p)

◆ RegisterPass()

static RegisterPass<ClassHierarchyAnalysis> retdec::bin2llvmir::RegisterPass ( "retdec-class-hierarchy"  ,
"C++ class hierarchy optimization"  ,
false  ,
false   
)
static

◆ saveCryptoRule()

common::Pattern retdec::bin2llvmir::saveCryptoRule ( const yaracpp::YaraRule rule,
retdec::fileformat::FileFormat file 
)

◆ UnreachableFuncsRegistered()

RegisterPass<UnreachableFuncs> retdec::bin2llvmir::UnreachableFuncsRegistered ( "retdec-unreachable-funcs"  ,
"Unreachable functions optimization"  ,
false  ,
false   
)

◆ usesInBasicBlock()

bool retdec::bin2llvmir::usesInBasicBlock ( llvm::Value *  v,
llvm::BasicBlock *  bb,
std::set< llvm::Instruction * > &  uses,
llvm::Instruction *  start = nullptr 
)

Find all uses of value v in basic block bb and add them to uses. If start is defined (not nullptr), start the iteration search from this instruction, otherwise start from the basic block's front.

Returns
True if the basic block kills the value, false otherwise.

◆ X() [1/26]

static RegisterPass<CondBranchOpt> retdec::bin2llvmir::X ( "retdec-cond-branch-opt"  ,
"Conditional branch optimization"  ,
false  ,
false   
)
static

◆ X() [2/26]

static RegisterPass<ConstantsAnalysis> retdec::bin2llvmir::X ( "retdec-constants"  ,
"Constants optimization"  ,
false  ,
false   
)
static

◆ X() [3/26]

static llvm::RegisterPass<Decoder> retdec::bin2llvmir::X ( "retdec-decoder"  ,
"Input binary to LLVM IR decoding"  ,
false  ,
false   
)
static

◆ X() [4/26]

static RegisterPass<DumpModule> retdec::bin2llvmir::X ( "retdec-dump-module ,
"Module to LLVM IR file dumper"  ,
false  ,
false   
)
static

◆ X() [5/26]

static RegisterPass<IdiomsLibgcc> retdec::bin2llvmir::X ( "retdec-idioms-libgcc"  ,
"Libgcc idioms optimization"  ,
false  ,
false   
)
static

◆ X() [6/26]

static RegisterPass<InstructionOptimizer> retdec::bin2llvmir::X ( "retdec-inst-opt"  ,
"LLVM instruction optimization"  ,
false  ,
false   
)
static

◆ X() [7/26]

static RegisterPass<InstructionRdaOptimizer> retdec::bin2llvmir::X ( "retdec-inst-opt-rda"  ,
"LLVM instruction optimization using RDA"  ,
false  ,
false   
)
static

◆ X() [8/26]

static RegisterPass<MainDetection> retdec::bin2llvmir::X ( "retdec-main-detection"  ,
"Main function identification optimization"  ,
false  ,
false   
)
static

◆ X() [9/26]

static RegisterPass<ParamReturn> retdec::bin2llvmir::X ( "retdec-param-return"  ,
"Function parameters and returns optimization"  ,
false  ,
false   
)
static

◆ X() [10/26]

static RegisterPass<ProviderInitialization> retdec::bin2llvmir::X ( "retdec-provider-init"  ,
"Providers initialization"  ,
false  ,
false   
)
static

◆ X() [11/26]

static RegisterPass<RegisterLocalization> retdec::bin2llvmir::X ( "retdec-register-localization"  ,
"Make all registers local"  ,
false  ,
false   
)
static

◆ X() [12/26]

static RegisterPass<AsmInstructionRemover> retdec::bin2llvmir::X ( "retdec-remove-asm-instrs"  ,
"Assembly mapping instruction removal"  ,
false  ,
false   
)
static

◆ X() [13/26]

static llvm::RegisterPass<PhiRemover> retdec::bin2llvmir::X ( "retdec-remove-phi"  ,
"Phi removal"  ,
false  ,
false   
)
static

◆ X() [14/26]

static RegisterPass<SelectFunctions> retdec::bin2llvmir::X ( "retdec-select-fncs"  ,
"Selected functions optimization"  ,
false  ,
false   
)
static

◆ X() [15/26]

static RegisterPass<SimpleTypesAnalysis> retdec::bin2llvmir::X ( "retdec-simple-types"  ,
"Simple types recovery optimization"  ,
false  ,
false   
)
static

◆ X() [16/26]

static RegisterPass<StackAnalysis> retdec::bin2llvmir::X ( "retdec-stack"  ,
"Stack optimization"  ,
false  ,
false   
)
static

◆ X() [17/26]

static RegisterPass<StackPointerOpsRemove> retdec::bin2llvmir::X ( "retdec-stack-ptr-op-remove"  ,
"Stack pointer operations optimization"  ,
false  ,
false   
)
static

◆ X() [18/26]

static RegisterPass<SyscallFixer> retdec::bin2llvmir::X ( "retdec-syscalls"  ,
"Syscalls optimization"  ,
false  ,
false   
)
static

◆ X() [19/26]

static llvm::RegisterPass<TypesPropagator> retdec::bin2llvmir::X ( "retdec-types-propagation"  ,
"Data types propagation"  ,
false  ,
false   
)
static

◆ X() [20/26]

static RegisterPass<ValueProtect> retdec::bin2llvmir::X ( "retdec-value-protect"  ,
"Value protection optimization"  ,
false  ,
false   
)
static

◆ X() [21/26]

static RegisterPass<BitcodeWriter> retdec::bin2llvmir::X ( "retdec-write-bc"  ,
"Generate the current bitcode"  ,
false  ,
false   
)
static

◆ X() [22/26]

static RegisterPass<ConfigWriter> retdec::bin2llvmir::X ( "retdec-write-config"  ,
"Generate the current config"  ,
false  ,
false   
)
static

◆ X() [23/26]

static llvm::RegisterPass<DsmWriter> retdec::bin2llvmir::X ( "retdec-write-dsm"  ,
"Disassembly generation"  ,
false  ,
false   
)
static

◆ X() [24/26]

static RegisterPass<LlvmIrWriter> retdec::bin2llvmir::X ( "retdec-write-ll"  ,
"Generate the current LLVM IR"  ,
false  ,
false   
)
static

◆ X() [25/26]

static RegisterPass<X86AddressSpacesPass> retdec::bin2llvmir::X ( "retdec-x86-addr-spaces"  ,
"x86 address spaces optimization"  ,
false  ,
false   
)
static

◆ X() [26/26]

static RegisterPass<X87FpuAnalysis> retdec::bin2llvmir::X ( "retdec-x87-fpu"  ,
"x87 fpu register analysis"  ,
false  ,
false   
)
static

Variable Documentation

◆ _emptyConfig

retdec::config::Config retdec::bin2llvmir::_emptyConfig