retdec
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
retdec::bin2llvmir::PhiRemover Class Reference

#include <phi_remover.h>

Inheritance diagram for retdec::bin2llvmir::PhiRemover:
Inheritance graph
[legend]
Collaboration diagram for retdec::bin2llvmir::PhiRemover:
Collaboration graph
[legend]

Public Member Functions

 PhiRemover ()
 
virtual bool runOnModule (llvm::Module &M) override
 
bool runOnModuleCustom (llvm::Module &M, Config *c)
 

Static Public Attributes

static char ID = 0
 

Private Member Functions

bool run ()
 
bool demotePhiToStack (llvm::PHINode *phi, llvm::MDNode *faddr)
 

Private Attributes

llvm::Module * _module = nullptr
 
Config_config = nullptr
 

Constructor & Destructor Documentation

◆ PhiRemover()

retdec::bin2llvmir::PhiRemover::PhiRemover ( )

Member Function Documentation

◆ demotePhiToStack()

bool retdec::bin2llvmir::PhiRemover::demotePhiToStack ( llvm::PHINode *  phi,
llvm::MDNode *  faddr 
)
private

Code taken from llvm::DemotePHIToStack(). We need to implement it ourselves in order to add instruction address metadata to newly created instructions.

◆ run()

bool retdec::bin2llvmir::PhiRemover::run ( )
private
Returns
True if at least one instruction was removed. False otherwise.

◆ runOnModule()

bool retdec::bin2llvmir::PhiRemover::runOnModule ( llvm::Module &  M)
overridevirtual

◆ runOnModuleCustom()

bool retdec::bin2llvmir::PhiRemover::runOnModuleCustom ( llvm::Module &  M,
Config c 
)

Member Data Documentation

◆ _config

Config* retdec::bin2llvmir::PhiRemover::_config = nullptr
private

◆ _module

llvm::Module* retdec::bin2llvmir::PhiRemover::_module = nullptr
private

◆ ID

char retdec::bin2llvmir::PhiRemover::ID = 0
static

The documentation for this class was generated from the following files: