Otawa  0.10
otawa::ipet::ConstraintLoader Class Reference

This code processor allows loading IPET constraint from an external file. More...

#include <otawa/ipet/ConstraintLoader.h>

Inheritance diagram for otawa::ipet::ConstraintLoader:
otawa::CFGProcessor otawa::Processor otawa::Monitor

Public Types

enum  log_level_t {
  LOG_NONE = 0, LOG_PROC = 1, LOG_FILE = 2, LOG_DEPS = LOG_FILE,
  LOG_FUN = 3, LOG_CFG = LOG_FUN, LOG_BLOCK = 4, LOG_BB = LOG_BLOCK,
  LOG_INST = 5
}
 
typedef enum
otawa::Monitor::log_level_t 
log_level_t
 

Public Member Functions

 ConstraintLoader (AbstractRegistration &r=reg)
 Constructor. More...
 
elm::String name (void) const
 
elm::Version version (void) const
 
void process (WorkSpace *ws, const PropList &props=PropList::EMPTY)
 Execute the code processor on the given framework. More...
 
WorkSpaceworkspace (void)
 Get the current workspace. More...
 
bool isVerbose (void) const
 Test if the verbosity is activated. More...
 
bool logFor (log_level_t tested) const
 Test if the given log level is activated or not. More...
 
log_level_t logLevel (void) const
 

Public Attributes

elm::io::Output out
 Provide a stream to perform output for the user. More...
 
elm::io::Output log
 Provide a stream to perform log output. More...
 

Static Public Attributes

static Identifier< StringPATH
 This property identifier is used for passing specific file to load to the ConstraintLoader (argument of type elm::String). More...
 
static Registration
< ConstraintLoader
reg
 
static Identifier< PropList * > STATS
 This property identifiers is used to pass a property list to the processor that will be used to store statistics about the performed work. More...
 
static Identifier< bool > TIMED
 If the value of the associated property is true (default to false), time statistics will also be collected with other processor statistics. More...
 
static Identifier< bool > RECURSIVE
 
static Identifier< Progress * > PROGRESS
 Install. More...
 
static Identifier< bool > COLLECT_STATS
 This property allows to activate collection of statistics for the work of the current processor. More...
 
static Identifier
< elm::io::OutStream * > & 
OUTPUT = otawa::OUTPUT
 This property identifier is used for setting the output stream used by the processor to write results. More...
 
static Identifier
< elm::io::OutStream * > & 
LOG = otawa::LOG
 This property identifier is used for setting the log stream used by the processor to write messages (information, warning, error). More...
 
static Identifier< bool > & VERBOSE = otawa::VERBOSE
 This property activates the verbose mode of the processor: information about the processor work will be displayed. More...
 
static Identifier< log_level_t > & LOG_LEVEL = otawa::LOG_LEVEL
 Property passed in the configuration property list of a processor to select the log level between LOG_PROC, LOG_CFG or LOG_BB. More...
 
static Identifier
< elm::system::time_t > 
RUNTIME
 This property identifier is used to store in the statistics of a processor the overall run time of the processor work. More...
 
static Monitornull = __null_mon
 Monitor that output nothing. More...
 

Protected Member Functions

virtual void processCFG (WorkSpace *fw, CFG *cfg)
 
virtual void configure (const PropList &props=PropList::EMPTY)
 Configure the current processor. More...
 
virtual void processWorkSpace (WorkSpace *fw)
 Process the given framework. More...
 
virtual void cleanupCFG (WorkSpace *ws, CFG *cfg)
 This function may be overridden by a subclass to provide custom cleanup for a CFG. More...
 
void doCleanUp (void)
 Trigger associated with CFG. More...
 
string str (const Address &address)
 Transform an address to a smart string, that is, if a source line is available, transform it to "source_file:source_line", if the CFG has a label, it gives "label + 0xoffset", else return the address. More...
 
string str (const Address &base, const Address &address)
 Transform an address to a smart string, that is, if a source line is available, transform it to "source_file:source_line", if the CFG has a label, it gives "label + 0xoffset", else return the address. More...
 
CFGcfg (void) const
 Get the current CFG. More...
 
bool isTimed (void) const
 Test if the timed mode is activated (recording of timings in the statistics). More...
 
bool recordsStats (void) const
 Test if the statictics mode is activated. More...
 
bool isAllocated (void) const
 
bool isPrepared (void) const
 
bool isCollectingStats (void) const
 
void require (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a required feature for the work of the current processor. More...
 
void provide (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a feature provided by the work of the current processor. More...
 
void invalidate (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a feature invalidated by the work of the current processor. More...
 
void use (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a feature as used by the work of the current processor. More...
 
void warn (const String &message)
 Display a warning. More...
 
WorkSpaceworkspace (void) const
 Get the current workspace. More...
 
Progressprogress (void)
 Get the current progress handler. More...
 
void recordStat (const AbstractFeature &feature, StatCollector *collector)
 Add a statistics collector to the current workspace collection. More...
 
void addCleaner (const AbstractFeature &feature, Cleaner *cleaner)
 Add a cleaner for the given feature. More...
 
template<class T >
void addRemover (const AbstractFeature &feature, const Ref< T, Identifier< T > > &ref)
 
template<class T >
void addDeletor (const AbstractFeature &feature, const Ref< T *, Identifier< T * > > &ref)
 
virtual void prepare (WorkSpace *ws)
 This method called to let the processor customize its requirements according to some generic feature. More...
 
virtual void setup (WorkSpace *ws)
 This method is called before an anlysis to let the processor do some initialization. More...
 
virtual void cleanup (WorkSpace *ws)
 This method is called after the end of the processor analysis to let it do some clean up. More...
 
virtual void collectStats (WorkSpace *ws)
 This method is invoked if the user has required to collect statistics about the processor. More...
 
virtual void processFrameWork (WorkSpace *fw)
 Process the given workspace. More...
 
template<class T >
T * track (const AbstractFeature &feature, T *object)
 
template<class T >
void track (const AbstractFeature &feature, const Ref< T *, Identifier< T * > > &ref)
 Track the release of an allocated object assigned to an identifier relatively to the given feature. More...
 
template<class T >
void track (const AbstractFeature &feature, const Ref< T *, const Identifier< T * > > &ref)
 Track the release of an allocated object assigned to an identifier relatively to the given feature. More...
 
virtual void requireDyn (WorkSpace *ws, const PropList &props)
 Method called after registration requirements to support dynamic requirements. More...
 
void setWorkspace (WorkSpace *workspace)
 Set the current workspace. More...
 

Protected Attributes

PropListstats
 
t::uint32 flags
 Contains various bit flags. More...
 

Static Protected Attributes

static const t::uint32 IS_TIMED = 0x01 << CUSTOM_SHIFT
 
static const t::uint32 IS_ALLOCATED = 0x04 << CUSTOM_SHIFT
 
static const t::uint32 IS_PREPARED = 0x08 << CUSTOM_SHIFT
 
static const t::uint32 IS_COLLECTING = 0x10 << CUSTOM_SHIFT
 
static const t::uint32 IS_VERBOSE = 0x01
 
static const t::uint32 CUSTOM_SHIFT = 16
 

Private Member Functions

friend int::ipet_parse (ConstraintLoader *)
 
friend void::ipet_error (ConstraintLoader *, const char *)
 
BasicBlockgetBB (address_t addr)
 Find the BB matching the given address. More...
 
BasicBlockgetBB (int index)
 find BB matching the given index from the main CFG. More...
 
void newBBVar (cstring name, address_t addr)
 For internal use only. More...
 
void newBBVar (cstring name, int index)
 For internal use only. More...
 
bool newEdgeVar (elm::CString name, address_t src, address_t dst)
 For internal use only. More...
 
ilp::VargetVar (CString name)
 For internal use only. More...
 
bool addConstraint (ExpNode *left, ilp::Constraint::comparator_t t, ExpNode *right)
 Add a constraint to the current ILP system. More...
 
NormNode * normalize (ExpNode *node, double mult=1)
 Normalize the given expression. More...
 
void error (string message)
 Display an error with line number. More...
 
void fatal (string message)
 Display an error message and stop the execution (raising an exception). More...
 

Private Attributes

WorkSpacefw
 
ilp::Systemsystem
 
elm::genstruct::HashTable
< Address, BasicBlock * > 
bbs
 
elm::genstruct::HashTable
< String, ilp::Var * > 
vars
 
elm::String path
 

Detailed Description

This code processor allows loading IPET constraint from an external file.

The external file must follows the format ExtCons.

Configuration Properties
Required Feature

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
LOG_NONE 
LOG_PROC 
LOG_FILE 
LOG_DEPS 
LOG_FUN 
LOG_CFG 
LOG_BLOCK 
LOG_BB 
LOG_INST 

Constructor & Destructor Documentation

otawa::ipet::ConstraintLoader::ConstraintLoader ( AbstractRegistration r = reg)

Constructor.

Member Function Documentation

void otawa::Processor::addCleaner ( const AbstractFeature feature,
Cleaner cleaner 
)
inlineprotectedinherited

Add a cleaner for the given feature.

A cleaner is an object with a virtual destructor that is called when the associated feature is removed: this let the processor to release and clean up the resources it allocated to implement the provided features.

Parameters
featureFeature the cleaner apply to.
cleanerCleaner to add.

Referenced by otawa::DelayedBuilder::cleanup(), otawa::StackAnalysis::cleanup(), otawa::Dominance::processCFG(), otawa::CFGCollector::processWorkSpace(), otawa::clp::Analysis::processWorkSpace(), and otawa::Processor::recordStat().

bool otawa::ipet::ConstraintLoader::addConstraint ( ExpNode left,
ilp::Constraint::comparator_t  t,
ExpNode right 
)
private

Add a constraint to the current ILP system.

Parameters
leftLeft side of the equation.
tComparator of the equation.
rightRight side of the equation.
Returns

References otawa::ilp::Constraint::add(), otawa::ilp::Constraint::EQ, otawa::ilp::Constraint::GE, otawa::ilp::Constraint::GT, otawa::ilp::Constraint::LE, otawa::Monitor::log, otawa::Monitor::LOG_BB, otawa::Monitor::logFor(), otawa::ilp::Constraint::LT, otawa::ilp::System::newConstraint(), normalize(), and system.

Referenced by yyparse().

template<class T >
void otawa::Processor::addDeletor ( const AbstractFeature feature,
const Ref< T *, Identifier< T * > > &  ref 
)
inlineprotectedinherited
template<class T >
void otawa::Processor::addRemover ( const AbstractFeature feature,
const Ref< T, Identifier< T > > &  ref 
)
inlineprotectedinherited
CFG * otawa::CFGProcessor::cfg ( void  ) const
inlineprotectedinherited
void otawa::CFGProcessor::cleanupCFG ( WorkSpace ws,
CFG cfg 
)
protectedvirtualinherited

This function may be overridden by a subclass to provide custom cleanup for a CFG.

It is called for each CFG of the task when doCleanUp() is called. As a default, do nothing.

Parameters
wsCurrent workspace.
cfgCurrent CFG.

Reimplemented in otawa::BBProcessor, and otawa::EdgeProcessor.

Referenced by otawa::CFGProcessor::doCleanUp().

void otawa::Processor::collectStats ( WorkSpace ws)
protectedvirtualinherited

This method is invoked if the user has required to collect statistics about the processor.

In its default implementation, this method does nothing but it may be customized if the current implementation provides statistics. It is called after the main computation of the processor.

Statistics must be objects inheriting from the class StatCollector and recorded with method recordStat().

Parameters
wsCurrent workspace.

Reimplemented in otawa::dcache::CatConstraintBuilder, otawa::ipet::WCETComputation, and otawa::CAT2OnlyConstraintBuilder.

Referenced by otawa::Processor::process().

void otawa::ipet::ConstraintLoader::configure ( const PropList props = PropList::EMPTY)
protectedvirtual

Configure the current processor.

Parameters
propsConfiguration properties.

Reimplemented from otawa::CFGProcessor.

References otawa::CFGProcessor::configure(), PATH, and path.

void otawa::CFGProcessor::doCleanUp ( void  )
protectedinherited

Trigger associated with CFG.

For each CFG, perform a call to cleanupCFG() that may be customized by a subclass.

References otawa::CFGProcessor::cleanupCFG(), otawa::CFGCollection::count(), otawa::CFGCollection::get(), otawa::INVOLVED_CFGS, and otawa::Processor::workspace().

void otawa::ipet::ConstraintLoader::error ( string  message)
private

Display an error with line number.

Parameters
messageMessage to display.

References ipet_line, and otawa::Monitor::log.

Referenced by fatal(), and newBBVar().

void otawa::ipet::ConstraintLoader::fatal ( string  message)
private

Display an error message and stop the execution (raising an exception).

Parameters
messageMessage to display.

References error().

BasicBlock * otawa::ipet::ConstraintLoader::getBB ( address_t  addr)
private

Find the BB matching the given address.

Parameters
addrAddress of BB to find.
Returns
Found BB or null.

References otawa::cfgio::bb(), bbs, fw, otawa::INVOLVED_CFGS, and otawa::Monitor::log.

Referenced by newBBVar(), and newEdgeVar().

BasicBlock * otawa::ipet::ConstraintLoader::getBB ( int  index)
private

find BB matching the given index from the main CFG.

Parameters
indexBB index.
Returns
Found BB or null.

References otawa::cfgio::bb(), fw, and otawa::INVOLVED_CFGS.

ilp::Var * otawa::ipet::ConstraintLoader::getVar ( CString  name)
private

For internal use only.

References otawa::Monitor::log, and vars.

Referenced by yyparse().

void otawa::Processor::invalidate ( const AbstractFeature feature)
protectedinherited

Usually called from a processor constructor, this method records a feature invalidated by the work of the current processor.

Parameters
featureInvalidated feature.

References otawa::Processor::_reg, otawa::AbstractRegistration::features, otawa::Monitor::flags, otawa::FeatureUsage::invalidate, otawa::Processor::IS_ALLOCATED, otawa::Processor::isAllocated(), and otawa::Processor::isPrepared().

Referenced by otawa::LoopReductor::LoopReductor().

bool otawa::Processor::isAllocated ( void  ) const
inlineprotectedinherited
bool otawa::Processor::isCollectingStats ( void  ) const
inlineprotectedinherited
bool otawa::Processor::isPrepared ( void  ) const
inlineprotectedinherited
bool otawa::Processor::isTimed ( void  ) const
inlineprotectedinherited

Test if the timed mode is activated (recording of timings in the statistics).

Returns
True if timed mode is activated, false else.
Note
If statistics are not activated, this method returns ever false.

References flags.

Referenced by otawa::Processor::process().

bool otawa::Monitor::logFor ( log_level_t  tested) const
inlineinherited

Test if the given log level is activated or not.

Parameters
testedTested log level.
Returns
True if the log level is activated, false else.

Referenced by otawa::CFGBuilder::addCFG(), addConstraint(), otawa::PFGBuilder::addFunction(), otawa::etime::EdgeTimeBuilder::applyWeightedSplit(), otawa::DelayedBuilder::buildBB(), otawa::CFGBuilder::buildCFG(), otawa::DelayedBuilder::buildEdges(), otawa::branch::BranchBuilder::categorize(), otawa::ipet::FlowFactLoader::cleanup(), otawa::dcache::CATBuilder::cleanup(), otawa::DelayedBuilder::cloneEdge(), otawa::ACSBuilder::configure(), otawa::CAT2Builder::configure(), otawa::etime::EdgeTimeBuilder::genForOneCost(), otawa::etime::StandardEventBuilder::handleVariableBranchPred(), otawa::Processor::init(), otawa::FlowFactLoader::load(), otawa::script::Script::makeConfig(), otawa::CFGBuilder::nextBB(), otawa::FlowFactLoader::onLoop(), otawa::FlowFactLoader::onMemoryAccess(), otawa::FlowFactLoader::onNoInline(), otawa::FlowFactLoader::onReturn(), otawa::FlowFactLoader::onSetInlining(), otawa::Processor::process(), otawa::branch::OnlyConsBuilder::processBB(), otawa::branch::CondNumber::processBB(), otawa::ipet::FlowFactConstraintBuilder::processBB(), otawa::dcache::CLPBlockBuilder::processBB(), otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::BlockBuilder::processBB(), otawa::CFGCheckSummer::processCFG(), otawa::EdgeProcessor::processCFG(), otawa::CAT2Builder::processCFG(), otawa::display::CFGOutput::processCFG(), processCFG(), otawa::ContextualProcessor::processCFG(), otawa::BBProcessor::processCFG(), otawa::etime::EdgeTimeBuilder::processEdge(), otawa::VarTextDecoder::processEntry(), otawa::dcache::CATBuilder::processLBlockSet(), otawa::ACSMayBuilder::processLBlockSet(), otawa::CAT2Builder::processLBlockSet(), otawa::dcache::ACSBuilder::processLBlockSet(), otawa::etime::EdgeTimeBuilder::processSequence(), otawa::VarTextDecoder::processWorkSpace(), otawa::TextDecoder::processWorkSpace(), otawa::LBlockProcessor::processWorkSpace(), otawa::ipet::WCETComputation::processWorkSpace(), otawa::FixedTextDecoder::processWorkSpace(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::PFGBuilder::processWorkSpace(), otawa::StackAnalysis::processWorkSpace(), otawa::ipet::ILPSystemGetter::processWorkSpace(), otawa::branch::BranchBuilder::processWorkSpace(), otawa::CFGCollector::processWorkSpace(), otawa::CFGProcessor::processWorkSpace(), otawa::Virtualizer::processWorkSpace(), otawa::clp::Analysis::processWorkSpace(), otawa::script::Script::processWorkSpace(), otawa::ilp::Output::setup(), otawa::BBRatioDisplayer::setup(), otawa::dcache::BlockBuilder::setup(), otawa::CFGBuilder::thisBB(), otawa::ipet::FlowFactLoader::transfer(), otawa::Virtualizer::virtualize(), and otawa::script::Script::work().

log_level_t otawa::Monitor::logLevel ( void  ) const
inlineinherited
void otawa::ipet::ConstraintLoader::newBBVar ( cstring  name,
address_t  addr 
)
private

For internal use only.

References _, otawa::cfgio::bb(), error(), getBB(), otawa::ipet::VAR, and vars.

Referenced by yyparse().

void otawa::ipet::ConstraintLoader::newBBVar ( cstring  name,
int  index 
)
private

For internal use only.

References _, otawa::cfgio::bb(), error(), getBB(), otawa::ipet::VAR, and vars.

bool otawa::ipet::ConstraintLoader::newEdgeVar ( elm::CString  name,
address_t  src,
address_t  dst 
)
private

For internal use only.

References otawa::cfgio::edge(), getBB(), otawa::Monitor::log, otawa::ipet::VAR, and vars.

Referenced by yyparse().

NormNode * otawa::ipet::ConstraintLoader::normalize ( ExpNode node,
double  mult = 1 
)
private
void otawa::Processor::prepare ( WorkSpace ws)
protectedvirtualinherited

This method called to let the processor customize its requirements according to some generic feature.

When overload, the original method MUST be called at the end of the custom overriding implementation.

Parameters
wsCurrent workspace.

References otawa::Monitor::flags, and otawa::Processor::IS_PREPARED.

Referenced by otawa::Processor::process().

void otawa::Processor::process ( WorkSpace fw,
const PropList props = PropList::EMPTY 
)
inherited

Execute the code processor on the given framework.

Parameters
fwWorkspace to work on.
propsConfiguration properties.

References _, otawa::Processor::_reg, elm::genstruct::Vector< T >::add(), otawa::Processor::cleaners, otawa::Processor::cleanup(), otawa::Processor::collectStats(), otawa::Processor::configure(), elm::genstruct::Vector< T >::contains(), otawa::WorkSpace::getDependency(), otawa::FeatureUsage::invalidate, otawa::WorkSpace::invalidate(), otawa::WorkSpace::isCancelled(), otawa::Processor::isCollectingStats(), otawa::Processor::isPrepared(), otawa::WorkSpace::isProvided(), otawa::Processor::isTimed(), kind, otawa::Monitor::log, otawa::Monitor::LOG_CFG, otawa::Monitor::LOG_DEPS, otawa::Monitor::LOG_PROC, otawa::Monitor::logFor(), otawa::AbstractRegistration::name(), otawa::Processor::name(), otawa::Processor::prepare(), otawa::Processor::processWorkSpace(), otawa::FeatureUsage::provide, otawa::WorkSpace::provide(), otawa::Processor::recordsStats(), elm::genstruct::Vector< T >::remove(), otawa::FeatureUsage::require, otawa::WorkSpace::require(), otawa::Processor::RUNTIME, otawa::Processor::setup(), otawa::Processor::stats, otawa::FeatureUsage::use, otawa::AbstractRegistration::uses(), otawa::Processor::version(), and otawa::Processor::ws.

Referenced by otawa::PFGBuilder::finalizeBB(), otawa::WorkSpace::getCFGInfo(), otawa::FlowFactLoader::onIgnoreEntry(), otawa::SilentFeature::process(), otawa::ActualFeature::process(), otawa::DynProcessor::process(), otawa::Feature< T, C >::process(), otawa::p::feature::process(), otawa::TextDecoder::processWorkSpace(), otawa::cat::CATBuilder::processWorkSpace(), and otawa::DelayedBuilder::setup().

void otawa::ipet::ConstraintLoader::processCFG ( WorkSpace _fw,
CFG cfg 
)
protectedvirtual

Read the constraint file and add it to the current ILP system.

The read file path is taken from configuration if available, or built from the binary file path with ".ipet" appended.

Implements otawa::CFGProcessor.

References _, fw, ipet_in, ipet_parse(), otawa::Monitor::log, otawa::Monitor::LOG_DEPS, otawa::Monitor::logFor(), otawa::File::name(), path, otawa::WorkSpace::process(), otawa::Process::program(), system, otawa::ipet::SYSTEM, elm::String::toCString(), and elm::StringBuffer::toString().

void otawa::Processor::processFrameWork ( WorkSpace fw)
protectedvirtualinherited

Process the given workspace.

Parameters
fwWorkspace to process.
Deprecated:
Use processWorkSpace() instead.

Referenced by otawa::Processor::processWorkSpace().

Progress & otawa::Processor::progress ( void  )
inlineprotectedinherited

Get the current progress handler.

Returns
Progress handler.
void otawa::Processor::provide ( const AbstractFeature feature)
protectedinherited
bool otawa::Processor::recordsStats ( void  ) const
inlineprotectedinherited

Test if the statictics mode is activated.

Returns
True if the statistics mode is activated, false else.

Referenced by otawa::Processor::init(), otawa::Processor::process(), and otawa::CFGProcessor::processWorkSpace().

void otawa::Processor::recordStat ( const AbstractFeature feature,
StatCollector collector 
)
protectedinherited

Add a statistics collector to the current workspace collection.

The statistics object is tracked and linked to the feature. In case of the feature invalidation, the statistics information instance is purged of the statistics collector.

Parameters
featureFeature to link the collector to.
collectorStatistics collector to add.

References otawa::StatInfo::add(), otawa::Processor::addCleaner(), otawa::Processor::isCollectingStats(), and otawa::Processor::workspace().

Referenced by otawa::CAT2OnlyConstraintBuilder::collectStats(), otawa::ipet::WCETComputation::collectStats(), and otawa::dcache::CatConstraintBuilder::collectStats().

void otawa::Processor::requireDyn ( WorkSpace ws,
const PropList props 
)
protectedvirtualinherited

Method called after registration requirements to support dynamic requirements.

As a default, do nothing.

Parameters
wsCurrent workspace.
propsCurrent properties.
void otawa::Monitor::setWorkspace ( WorkSpace workspace)
inlineprotectedinherited

Set the current workspace.

Parameters
workspaceNew current workspace.
string otawa::CFGProcessor::str ( const Address address)
protectedinherited

Transform an address to a smart string, that is, if a source line is available, transform it to "source_file:source_line", if the CFG has a label, it gives "label + 0xoffset", else return the address.

Parameters
addressAddress to display.
Returns
Address transformed in string.

References otawa::Address::null.

Referenced by otawa::ipet::FlowFactLoader::processBB().

string otawa::CFGProcessor::str ( const Address base,
const Address address 
)
protectedinherited

Transform an address to a smart string, that is, if a source line is available, transform it to "source_file:source_line", if the CFG has a label, it gives "label + 0xoffset", else return the address.

Parameters
baseBase address of the function containing the give address.
addressAddress to display.
Returns
Address transformed in string.

References _, otawa::CFGProcessor::_cfg, otawa::ProgItem::address(), otawa::ot::address(), otawa::WorkSpace::findInstAt(), otawa::CFG::firstInst(), otawa::FUNCTION_LABEL, hex(), otawa::Address::isNull(), otawa::Address::offset(), and otawa::Processor::workspace().

template<class T >
T* otawa::Processor::track ( const AbstractFeature feature,
T *  object 
)
inlineprotectedinherited
template<class T >
void otawa::Processor::track ( const AbstractFeature feature,
const Ref< T *, Identifier< T * > > &  ref 
)
inlineprotectedinherited

Track the release of an allocated object assigned to an identifier relatively to the given feature.

When the feature is deleted, the object is fried and the identifier is removed. It is used as below:

track(MY_FEATURE, MY_ID(props) = value);
Parameters
featureLinked feature.
refReference to the identifier to remove.
template<class T >
void otawa::Processor::track ( const AbstractFeature feature,
const Ref< T *, const Identifier< T * > > &  ref 
)
inlineprotectedinherited

Track the release of an allocated object assigned to an identifier relatively to the given feature.

When the feature is deleted, the object is fried and the identifier is removed. It is used as below:

track(MY_FEATURE, MY_ID(props) = value);
Parameters
featureLinked feature.
refReference to the identifier to remove.
void otawa::Processor::use ( const AbstractFeature feature)
protectedinherited

Usually called from a processor constructor, this method records a feature as used by the work of the current processor.

Parameters
featureUsed feature.

References otawa::Processor::_reg, otawa::AbstractRegistration::features, otawa::Monitor::flags, otawa::Processor::IS_ALLOCATED, otawa::Processor::isAllocated(), otawa::Processor::isPrepared(), and otawa::FeatureUsage::use.

elm::Version otawa::Processor::version ( void  ) const
inlineinherited
WorkSpace * otawa::Monitor::workspace ( void  )
inlineinherited

Get the current workspace.

Returns
Current workspace.

Member Data Documentation

elm::genstruct::HashTable<Address, BasicBlock *> otawa::ipet::ConstraintLoader::bbs
private

Referenced by getBB().

Identifier< bool > otawa::Processor::COLLECT_STATS
staticinherited

This property allows to activate collection of statistics for the work of the current processor.

See also
StatInfo class.

Referenced by otawa::Processor::init().

const t::uint32 otawa::Monitor::CUSTOM_SHIFT = 16
staticprotectedinherited
t::uint32 otawa::Monitor::flags
protectedinherited

Contains various bit flags.

Bits from 0 to CUSTOM_SHIFT - 1 are private while bits from CUSTOM_SHIFT to 31 may be customized. To build a bit mask for custom bit i, the CUSTOM_SHIFT may be used as below:

static const t::uint32 MY_MASK = 1 << (i + CUSTOM_SHIFT);

Referenced by otawa::Processor::init(), otawa::Processor::invalidate(), otawa::Processor::prepare(), otawa::Processor::Processor(), otawa::Processor::provide(), otawa::Processor::require(), otawa::Processor::use(), and otawa::Processor::~Processor().

WorkSpace* otawa::ipet::ConstraintLoader::fw
private

Referenced by getBB(), and processCFG().

const t::uint32 otawa::Processor::IS_ALLOCATED = 0x04 << CUSTOM_SHIFT
staticprotectedinherited
const t::uint32 otawa::Processor::IS_COLLECTING = 0x10 << CUSTOM_SHIFT
staticprotectedinherited

Referenced by otawa::Processor::init().

const t::uint32 otawa::Processor::IS_PREPARED = 0x08 << CUSTOM_SHIFT
staticprotectedinherited
const t::uint32 otawa::Processor::IS_TIMED = 0x01 << CUSTOM_SHIFT
staticprotectedinherited

Referenced by otawa::Processor::init().

const t::uint32 otawa::Monitor::IS_VERBOSE = 0x01
staticprotectedinherited
elm::io::Output otawa::Monitor::log
inherited

Provide a stream to perform log output.

Should be used only when verbosity is activated.

Referenced by otawa::CFGBuilder::addCFG(), addConstraint(), otawa::PFGBuilder::addFunction(), otawa::ccg::LBlockBuilder::addLBlock(), otawa::LBlockBuilder::addLBlock(), otawa::etime::EdgeTimeBuilder::applyFloppySplit(), otawa::etime::EdgeTimeBuilder::applyStrictSplit(), otawa::etime::EdgeTimeBuilder::applyWeightedSplit(), otawa::DelayedBuilder::buildBB(), otawa::CFGBuilder::buildCFG(), otawa::branch::BranchBuilder::categorize(), otawa::ipet::FlowFactLoader::cleanup(), otawa::ipet::TrivialDataCacheManager::configure(), otawa::ACSBuilder::configure(), otawa::etime::EdgeTimeBuilder::displayConfs(), error(), otawa::etime::EdgeTimeBuilder::genForOneCost(), getBB(), otawa::VarTextDecoder::getInst(), getVar(), otawa::etime::StandardEventBuilder::handleVariableBranchPred(), otawa::Processor::init(), ipet_error(), otawa::FlowFactLoader::load(), otawa::script::Script::makeConfig(), otawa::etime::EdgeTimeBuilder::makeSplit(), newEdgeVar(), otawa::CFGBuilder::nextBB(), otawa::script::Script::onError(), otawa::FlowFactLoader::onLoop(), otawa::FlowFactLoader::onMemoryAccess(), otawa::FlowFactLoader::onNoInline(), otawa::FlowFactLoader::onReturn(), otawa::FlowFactLoader::onSetInlining(), otawa::script::Script::onWarning(), otawa::Processor::process(), otawa::branch::OnlyConsBuilder::processBB(), otawa::branch::CondNumber::processBB(), otawa::ipet::FlowFactConstraintBuilder::processBB(), otawa::dcache::CLPBlockBuilder::processBB(), otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::BlockBuilder::processBB(), otawa::CFGCheckSummer::processCFG(), otawa::CAT2Builder::processCFG(), processCFG(), otawa::ContextualProcessor::processCFG(), otawa::BBProcessor::processCFG(), otawa::etime::EdgeTimeBuilder::processEdge(), otawa::VarTextDecoder::processEntry(), otawa::dcache::CATBuilder::processLBlockSet(), otawa::ACSMayBuilder::processLBlockSet(), otawa::CAT2Builder::processLBlockSet(), otawa::dcache::ACSBuilder::processLBlockSet(), otawa::etime::EdgeTimeBuilder::processSequence(), otawa::TextDecoder::processWorkSpace(), otawa::VarTextDecoder::processWorkSpace(), otawa::LBlockProcessor::processWorkSpace(), otawa::ipet::WCETComputation::processWorkSpace(), otawa::FixedTextDecoder::processWorkSpace(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::StackAnalysis::processWorkSpace(), otawa::ipet::ILPSystemGetter::processWorkSpace(), otawa::branch::BranchBuilder::processWorkSpace(), otawa::CFGCollector::processWorkSpace(), otawa::CFGProcessor::processWorkSpace(), otawa::Virtualizer::processWorkSpace(), otawa::clp::Analysis::processWorkSpace(), otawa::ilp::Output::setup(), otawa::BBRatioDisplayer::setup(), otawa::dcache::BlockBuilder::setup(), otawa::CFGBuilder::thisBB(), otawa::ipet::FlowFactLoader::transfer(), otawa::Virtualizer::virtualize(), otawa::Processor::warn(), and otawa::script::Script::work().

Identifier< elm::io::OutStream * > & otawa::Processor::LOG = otawa::LOG
staticinherited

This property identifier is used for setting the log stream used by the processor to write messages (information, warning, error).

Deprecated:

Referenced by otawa::Processor::init(), otawa::Manager::loadBin(), and otawa::LiExeGraphBBTime::processBB().

Identifier< Processor::log_level_t > & otawa::Processor::LOG_LEVEL = otawa::LOG_LEVEL
staticinherited

Property passed in the configuration property list of a processor to select the log level between LOG_PROC, LOG_CFG or LOG_BB.

Deprecated:

Referenced by otawa::Application::run().

Monitor & otawa::Monitor::null = __null_mon
staticinherited

Monitor that output nothing.

Identifier< elm::io::OutStream * > & otawa::Processor::OUTPUT = otawa::OUTPUT
staticinherited

This property identifier is used for setting the output stream used by the processor to write results.

Deprecated:

Referenced by otawa::Processor::init().

elm::String otawa::ipet::ConstraintLoader::path
private

Referenced by configure(), ipet_error(), and processCFG().

Identifier< Progress * > otawa::Processor::PROGRESS
staticinherited

Install.

Referenced by otawa::Processor::init().

Identifier<bool> otawa::Processor::RECURSIVE
staticinherited
Registration< ConstraintLoader > otawa::ipet::ConstraintLoader::reg
static
Identifier< elm::system::time_t > otawa::Processor::RUNTIME
staticinherited

This property identifier is used to store in the statistics of a processor the overall run time of the processor work.

Referenced by otawa::Processor::process().

Identifier< PropList * > otawa::Processor::STATS
staticinherited

This property identifiers is used to pass a property list to the processor that will be used to store statistics about the performed work.

Implicitly, passing such a property activates the statistics recording facilities.

Referenced by otawa::Processor::init().

ilp::System* otawa::ipet::ConstraintLoader::system
private

Referenced by addConstraint(), and processCFG().

Identifier< bool > otawa::Processor::TIMED
staticinherited

If the value of the associated property is true (default to false), time statistics will also be collected with other processor statistics.

Passing such a property without PROC_STATS has no effects.

Referenced by otawa::Processor::init().

elm::genstruct::HashTable<String, ilp::Var *> otawa::ipet::ConstraintLoader::vars
private

Referenced by getVar(), newBBVar(), and newEdgeVar().

Identifier< bool > & otawa::Processor::VERBOSE = otawa::VERBOSE
staticinherited

This property activates the verbose mode of the processor: information about the processor work will be displayed.

Deprecated:

Referenced by otawa::Application::run(), and otawa::Manager::setVerbosity().


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