ROSE 0.11.145.147
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 205 of file Modules.h.

#include <Rose/BinaryAnalysis/Partitioner2/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.
 
- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback
enum  Termination {
  CONTINUE_DISCOVERY ,
  TERMINATE_NOW ,
  TERMINATE_PRIOR
}
 Whether to terminate a basic block. More...
 
using Ptr = BasicBlockCallbackPtr
 Shared-ownership pointer to a BasicBlockCallback.
 

Public Member Functions

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

Static Public Member Functions

static Ptr instance (size_t maxInsns)
 Constructor.
 

Protected Member Functions

 BasicBlockSizeLimiter (size_t maxInsns)
 

Member Typedef Documentation

◆ Ptr

Shared-ownership pointer to a BasicBlockSizeLimiter.

See Shared ownership.

Definition at line 214 of file Modules.h.

Constructor & Destructor Documentation

◆ BasicBlockSizeLimiter()

Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter::BasicBlockSizeLimiter ( size_t  maxInsns)
inlineprotected

Definition at line 209 of file Modules.h.

Member Function Documentation

◆ instance()

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

Constructor.

Definition at line 217 of file Modules.h.

◆ maxInstructions() [1/2]

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 226 of file Modules.h.

◆ maxInstructions() [2/2]

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 227 of file Modules.h.

◆ operator()()

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

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: