retdec
Public Member Functions | Friends | List of all members
retdec::llvmir2hll::PessimCallInfo Class Reference

Pessimistic information about a function call. More...

#include <pessim_call_info_obtainer.h>

Inheritance diagram for retdec::llvmir2hll::PessimCallInfo:
Inheritance graph
[legend]
Collaboration diagram for retdec::llvmir2hll::PessimCallInfo:
Collaboration graph
[legend]

Public Member Functions

 PessimCallInfo (ShPtr< CallExpr > call)
 Constructs a new pessimistic piece of information about the given function call. More...
 
virtual bool isNeverRead (ShPtr< Variable > var) const override
 Returns true if var is never read in the call, false otherwise. More...
 
virtual bool mayBeRead (ShPtr< Variable > var) const override
 Returns true if var may be read in the call, false otherwise. More...
 
virtual bool isAlwaysRead (ShPtr< Variable > var) const override
 Returns true if var is always read in the call, false otherwise. More...
 
virtual bool isNeverModified (ShPtr< Variable > var) const override
 Returns true if there is no assign into var in the call, false otherwise. More...
 
virtual bool mayBeModified (ShPtr< Variable > var) const override
 Returns true if the value of var may be changed in the call, false otherwise. More...
 
virtual bool isAlwaysModified (ShPtr< Variable > var) const override
 Returns true if the value of var is always changed in the call, false otherwise. More...
 
virtual bool valueIsNeverChanged (ShPtr< Variable > var) const override
 Returns true if the value of var is never changed in the call, false otherwise. More...
 
virtual bool isAlwaysModifiedBeforeRead (ShPtr< Variable > var) const override
 Returns true if the given variable is modified prior to being read in the call, false otherwise. More...
 
- Public Member Functions inherited from retdec::llvmir2hll::CallInfo
virtual ~CallInfo ()=default
 
ShPtr< CallExprgetCall () const
 Returns the function call for which the piece of information has been computed. More...
 

Friends

class PessimCallInfoObtainer
 

Additional Inherited Members

- Protected Member Functions inherited from retdec::llvmir2hll::CallInfo
 CallInfo (ShPtr< CallExpr > call)
 Constructs a new piece of information about the given function call. More...
 
- Protected Attributes inherited from retdec::llvmir2hll::CallInfo
ShPtr< CallExprcall
 Function call for which this piece of information is computed. More...
 

Detailed Description

Pessimistic information about a function call.

Use PessimCallInfoObtainer to create instances.

Instances of this class have reference object semantics.

Constructor & Destructor Documentation

◆ PessimCallInfo()

retdec::llvmir2hll::PessimCallInfo::PessimCallInfo ( ShPtr< CallExpr call)
explicit

Constructs a new pessimistic piece of information about the given function call.

Member Function Documentation

◆ isAlwaysModified()

bool retdec::llvmir2hll::PessimCallInfo::isAlwaysModified ( ShPtr< Variable var) const
overridevirtual

Returns true if the value of var is always changed in the call, false otherwise.

"Always changed" means that every time the function is called, var has a new assigned value. The new value may, however, be the same as the old value.

Implements retdec::llvmir2hll::CallInfo.

◆ isAlwaysModifiedBeforeRead()

bool retdec::llvmir2hll::PessimCallInfo::isAlwaysModifiedBeforeRead ( ShPtr< Variable var) const
overridevirtual

Returns true if the given variable is modified prior to being read in the call, false otherwise.

When this function returns true, it doesn't mean that the variable is actually read or modified in the call. It only means that if the variable is read in the call, then it has been assigned a value before this read.

Implements retdec::llvmir2hll::CallInfo.

◆ isAlwaysRead()

bool retdec::llvmir2hll::PessimCallInfo::isAlwaysRead ( ShPtr< Variable var) const
overridevirtual

Returns true if var is always read in the call, false otherwise.

"Always read" means that every time the function is called, var is read.

Implements retdec::llvmir2hll::CallInfo.

◆ isNeverModified()

bool retdec::llvmir2hll::PessimCallInfo::isNeverModified ( ShPtr< Variable var) const
overridevirtual

Returns true if there is no assign into var in the call, false otherwise.

Implements retdec::llvmir2hll::CallInfo.

◆ isNeverRead()

bool retdec::llvmir2hll::PessimCallInfo::isNeverRead ( ShPtr< Variable var) const
overridevirtual

Returns true if var is never read in the call, false otherwise.

Implements retdec::llvmir2hll::CallInfo.

◆ mayBeModified()

bool retdec::llvmir2hll::PessimCallInfo::mayBeModified ( ShPtr< Variable var) const
overridevirtual

Returns true if the value of var may be changed in the call, false otherwise.

Implements retdec::llvmir2hll::CallInfo.

◆ mayBeRead()

bool retdec::llvmir2hll::PessimCallInfo::mayBeRead ( ShPtr< Variable var) const
overridevirtual

Returns true if var may be read in the call, false otherwise.

Implements retdec::llvmir2hll::CallInfo.

◆ valueIsNeverChanged()

bool retdec::llvmir2hll::PessimCallInfo::valueIsNeverChanged ( ShPtr< Variable var) const
overridevirtual

Returns true if the value of var is never changed in the call, false otherwise.

"Never changed" means that a new value may be assigned to var in the call, but when the called function returns, the value of var is always its original value.

Implements retdec::llvmir2hll::CallInfo.

Friends And Related Function Documentation

◆ PessimCallInfoObtainer

friend class PessimCallInfoObtainer
friend

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