ROSE  0.9.9.109
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter Class Reference

Description

Callback to limit basic block size.

This basic block callback limits the number of instructions in a basic block. During basic block discovery when instructions are repeatedly appended to a block, if the number of instructions reaches the limit then the block is forced to terminate. This is useful when instruction semantics are enabled since large basic blocks can slow down the semantic analysis.

Definition at line 203 of file Modules.h.

#include <Modules.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter:
Collaboration graph
[legend]

Public Types

typedef Sawyer::SharedPointer< BasicBlockSizeLimiterPtr
 Shared-ownership pointer to a BasicBlockSizeLimiter. More...
 
- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback
enum  Termination {
  CONTINUE_DISCOVERY,
  TERMINATE_NOW,
  TERMINATE_PRIOR
}
 Whether to terminate a basic block. More...
 
typedef Sawyer::SharedPointer< BasicBlockCallbackPtr
 Shared-ownership pointer to a BasicBlockCallback. More...
 

Public Member Functions

virtual bool operator() (bool chain, const Args &) ROSE_OVERRIDE
 Callback method. More...
 
size_t maxInstructions () const
 Property: Maximum size of block. More...
 
void maxInstructions (size_t maxInsns)
 Property: Maximum size of block. More...
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

Static Public Member Functions

static Ptr instance (size_t maxInsns)
 Constructor. More...
 

Protected Member Functions

 BasicBlockSizeLimiter (size_t maxInsns)
 

Member Typedef Documentation

Shared-ownership pointer to a BasicBlockSizeLimiter.

See Shared ownership.

Definition at line 212 of file Modules.h.

Member Function Documentation

static Ptr Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter::instance ( size_t  maxInsns)
inlinestatic

Constructor.

Definition at line 215 of file Modules.h.

size_t Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter::maxInstructions ( ) const
inline

Property: Maximum size of block.

A value of zero means no maximum, effectively disabling this callback without removing it from the callback list.

Definition at line 224 of file Modules.h.

void Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter::maxInstructions ( size_t  maxInsns)
inline

Property: Maximum size of block.

A value of zero means no maximum, effectively disabling this callback without removing it from the callback list.

Definition at line 225 of file Modules.h.

virtual bool Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter::operator() ( bool  chain,
const Args  
)
virtual

Callback method.

This is the method invoked for the callback. The chain argument is the return value from the previous callback in the list (true for the first callback). The successor callbacks use chain to indicate whether subsequent callbacks should do anything.

Implements Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback.


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