ROSE 0.11.145.192
|
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.
#include <Rose/BinaryAnalysis/Partitioner2/Modules.h>
Public Types | |
typedef Sawyer::SharedPointer< BasicBlockSizeLimiter > | Ptr |
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. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Static Public Member Functions | |
static Ptr | instance (size_t maxInsns) |
Constructor. | |
Protected Member Functions | |
BasicBlockSizeLimiter (size_t maxInsns) | |
typedef Sawyer::SharedPointer<BasicBlockSizeLimiter> Rose::BinaryAnalysis::Partitioner2::Modules::BasicBlockSizeLimiter::Ptr |
Shared-ownership pointer to a BasicBlockSizeLimiter.
See Shared ownership.
|
inlineprotected |
|
inlinestatic |
|
inline |
|
inline |
|
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.