Otawa  0.10
Flow Facts

This module addresses the problem of the use of flow facts in OTAWA. More...

Classes

class  otawa::FlowFactLoader
 This class is an abstract class to monitor the load of flow facts. More...
 

Functions

Identifier< Path > otawa::FLOW_FACTS_PATH ("otawa::FLOW_FACTS_PATH","")
 This property may be used in the configuration of a code processor to pass the path of an flow fact file containing flow facts. More...
 
Identifier< xom::Element * > otawa::FLOW_FACTS_NODES ("otawa::FLOW_FACTS_NODES")
 This property may be used in the configuration of a code processor to directly pass an xml element containing flow facts in Flow Fact XML format format. More...
 
Feature< FlowFactLoader > otawa::FLOW_FACTS_FEATURE ("otawa::FLOW_FACTS_FEATURE")
 This feature ensures that the flow facts has been loaded. More...
 
Identifier< bool > otawa::IS_RETURN ("otawa::IS_RETURN", false)
 Put on a control flow instruction, this shows that this instruction is equivalent to a function return. More...
 
Identifier< bool > otawa::NO_RETURN ("otawa::NO_RETURN", false)
 This annotation is put on the first instruction of functions that does not never return. More...
 
Identifier< int > otawa::MAX_ITERATION ("otawa::MAX_ITERATION",-1)
 Put on the first instruction of a loop, it gives the maximum number of iteration of this loop. More...
 
Identifier< bool > otawa::FLOW_FACTS_MANDATORY ("otawa::FLOW_FACTS_MANDATORY", false)
 In configuration of the FlowFactLoader, makes it fail if no flow fact fail is available. More...
 
Identifier< bool > otawa::NO_CALL ("otawa::NO_CALL", false)
 Put on the first instruction of a function that must be no called. More...
 
Identifier< bool > otawa::NO_INLINE ("otawa::NO_INLINE")
 Put on the first instruction of a function to indicate whether it should be inlined or not during virtualization. More...
 
Identifier< bool > otawa::INLINING_POLICY ("otawa::INLINING_POLICY")
 Put on the first instruction of a function to set default inlining behavior during its virtualization. More...
 
Identifier< bool > otawa::IGNORE_CONTROL ("otawa::IGNORE_CONTROL", false)
 Put on a control instruction to prevent it to be interpreted as is. More...
 
Identifier< bool > otawa::IGNORE_SEQ ("otawa::IGNORE_SEQ", false)
 Put on a control instruction to prevent to pass in sequence. More...
 
Identifier< Address > otawa::BRANCH_TARGET ("otawa::BRANCH_TARGET", Address())
 Put on instruction that may branch to several targets or whose target computation cannot computed. More...
 
Identifier< Address > otawa::CALL_TARGET ("otawa::CALL_TARGET", Address())
 Put on instruction that may call to several targets or whose target computation cannot computed. More...
 
Identifier< bool > otawa::PRESERVED ("otawa::PRESERVED", false)
 Put on instruction that must preserved from the mkff special flow-fact detection. More...
 
Identifier< int > otawa::MIN_ITERATION ("otawa::MIN_ITERATION",-1)
 Put on the first instruction of a loop, it gives the minimal number of iterations. More...
 
Identifier< int > otawa::TOTAL_ITERATION ("otawa::TOTAL_ITERATION",-1)
 Put on the first instruction of a loop, it gives the total number of iterations during the whole execution of the program. More...
 
Identifier< bool > otawa::IGNORE_ENTRY ("otawa::IGNORE_ENTRY", false)
 Put on function symbol that must be ignored as function entry. More...
 
Identifier< Pair< Address,
Address > > 
otawa::ACCESS_RANGE ("otawa::ACCESS_RANGE")
 Put on a memory access instruction, provides a range of possible accesses. More...
 

Variables

Identifier< Path > otawa::FLOW_FACTS_PATH
 This property may be used in the configuration of a code processor to pass the path of an flow fact file containing flow facts. More...
 
Identifier< xom::Element * > otawa::FLOW_FACTS_NODES
 This property may be used in the configuration of a code processor to directly pass an xml element containing flow facts in Flow Fact XML format format. More...
 
Feature< FlowFactLoader > otawa::FLOW_FACTS_FEATURE
 This feature ensures that the flow facts has been loaded. More...
 
Identifier< bool > otawa::IS_RETURN
 Put on a control flow instruction, this shows that this instruction is equivalent to a function return. More...
 
Identifier< bool > otawa::NO_RETURN
 This annotation is put on the first instruction of functions that does not never return. More...
 
Identifier< int > otawa::MAX_ITERATION
 Put on the first instruction of a loop, it gives the maximum number of iteration of this loop. More...
 
Identifier< bool > otawa::FLOW_FACTS_MANDATORY
 In configuration of the FlowFactLoader, makes it fail if no flow fact fail is available. More...
 
Identifier< bool > otawa::NO_CALL
 Put on the first instruction of a function that must be no called. More...
 
Identifier< bool > otawa::NO_INLINE
 Put on the first instruction of a function to indicate whether it should be inlined or not during virtualization. More...
 
Identifier< bool > otawa::INLINING_POLICY
 Put on the first instruction of a function to set default inlining behavior during its virtualization. More...
 
Identifier< bool > otawa::IGNORE_CONTROL
 Put on a control instruction to prevent it to be interpreted as is. More...
 
Identifier< bool > otawa::IGNORE_SEQ
 Put on a control instruction to prevent to pass in sequence. More...
 
Identifier< Address > otawa::BRANCH_TARGET
 Put on instruction that may branch to several targets or whose target computation cannot computed. More...
 
Identifier< Address > otawa::CALL_TARGET
 Put on instruction that may call to several targets or whose target computation cannot computed. More...
 
Identifier< bool > otawa::PRESERVED
 Put on instruction that must preserved from the mkff special flow-fact detection. More...
 
Identifier< int > otawa::MIN_ITERATION
 Put on the first instruction of a loop, it gives the minimal number of iterations. More...
 
Identifier< int > otawa::TOTAL_ITERATION
 Put on the first instruction of a loop, it gives the total number of iterations during the whole execution of the program. More...
 
Identifier< bool > otawa::IGNORE_ENTRY
 Put on function symbol that must be ignored as function entry. More...
 
Identifier< Pair< Address,
Address > > 
otawa::ACCESS_RANGE
 Put on a memory access instruction, provides a range of possible accesses. More...
 

Detailed Description

This module addresses the problem of the use of flow facts in OTAWA.

As this kind of information may be provided by the user or external tools, OTAWA accepts several formats of input :

During the work of OTAWA, the load of this file is performed using a special code processor: otawa::util::FlowFactLoader.

Flow facts are usually hooked as properties to the program part they apply to. Below is the list of properties set as flow facts.

Flow Fact XML format

The format FFX, usually with the extension {.ffx}, provide the expressivity of XML applied to the expression of flow facts.The top level element must be {flowfacts}:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<flowfacts>
...
</flowfacts>
Addressing of program parts

The different element of this XML flow fact description usually designs some location in the program code. There are is different ways to describe code locations (as shown below) and the syntax, based on attributes of the elements, is shared by most flow fact elements.In the following location forms, the used integers may have the following forms:

  • a decimal integer,
  • prefixed by '0', an octal integer,
  • prefixed by '0[xX]', an hexadecimal integer.
<element address="ADDRESS"/>

This is the simplest way to design a code piece just by its address. This address represents an integer coded as above. As this way is not very human compliant, you may prefer one of the following form.

<element label="LABEL" offset="OFFSET"/>

This form provide a bit more portability and usability as the previous one. The address is represented as a label found in the code (usually a function label) and a signed integer offset to add to or substract from the label address. This location may be useful for symbol found in libraries. As the actual address is not known before program linkage, the location may be used and remains valid after linkage.

<element symbol="SYMBOL" size="SIZE"/>

This form provides a way to define a memory area in a single step. The defined memory area begins by the address of symbol and its size is size of it is defined or the size of the symbol.

<element source="SOURCE_FILE" line="LINE"/>

This is the most advanced to locate code using the source file name and the line of the designed program part. Yet, according to the way the code is written (many source constructor on one line or use of macros) and to the performed optimization, this method may be imprecise as a a source line may match different parts in the code.In the remaining of the document, the location defines above are identified by the keyword LOCATION in the element attributes.

Top level elements

Inside the flowfacts elements, the FFX format accepts the following components.

<noreturn LOCATION/>

This flow fact inform that the located function never return. This may be helpful for function as the C library "_exit".

<nocall LOCATION/>

When OTAWA encounters a call to the located function, it will be ignored.

<doinline LOCATION/>

When virtualizing, calls to the located function will be inlined.

<noinline LOCATION/>

When virtualizing, calls to the located function will not be inlined.

<inlining-on LOCATION/>

When virtualizing the located function, default policy will be set to true.

  • memory access INST_ADDRESS1 LOW_ADDRESS .. HIGH_ADDRESS [in STEP1 / STEP2 / ...] ;
    Sets the memory accessed by the instruction at INST_ADDRESS to the range from LOW_ADDRESS up to third HIGH_ADDRESS, optionally in the given context.
  • memory TYPE ADDRESS = VALUE ;
    Sets the memory at ADDRESS to the VALUE of type TYPE.
<inlining-off LOCATION/>

When virtualizing the located function, default policy will be set to false.

<function LOCATION>
CONTENT
</function>

This flow fact informs that the CONTENT elements are applied to the located function. This element is mainly used to build function call contextual flow fact.

<loop LOCATION maxcount="INTEGER" totalcount="INTEGER"/>

This element allows to put iteration limits on bounds. The LOCATION designs the header of the loop. maxcount gives the maximal number of iteration per loop start and totalcount gives the total number of loop iteration for the whole program execution. At least one of them must be given.

<ignore-entry name="STRING"/>

In some executable files, symbols are marked as function entries but are not, possibly causing problems in instruction decoding. This problem may be avoided by marking such symbols with this directive.

<return LOCATION/>

The instruction at the given location is considered as a return. This element may be useful with languages where control management and computation is melted. For example, the ARM allows to store the return address of a function call out of the usual link register and move of a register value in the PC may as well be considered as an indirect call as a return.

Content of functions and calls

The function element content may be either loop elements as given above or call elements.

<call LOCATION>
CONTENT
</call>

This element represents a function call inside an existing function. The LOCATION gives the address of the called function. The content is the same as of a function, that is, loop and call elements. The embedding of calls allows to build function call contexts to make the loop bounds context aware and tighten the WCET.

<multibranch LOCATION>
<target LOCATION />
...
</multibranch>

This element is used to resolve a complex control to several targets (case of indirect branch found in switch compilation using tables). The first LOCATION is the control instruction itself and the target child elements locations represents the different possible targets.

<multicall LOCATION>
<target LOCATION />
...
</multicall>

This element is used to resolve a complex control to several targets (case of function pointer calls). The first LOCATION is the call instruction itself and the target child elements locations represents the different possible targets.

<ignorecontrol LOCATION/>

This element is used to ignore the control effect of the instruction at LOCATION.

<ignoreseq LOCATION/>

This element is used to force instruction at LOCATION to be considered as an unconditional branch. Can only be put on a conditional branch instruction.

Extension

Top-level element support also the following extension elements (not included in the FFX format):

<mem-access LOCATION>
<low LOCATION />
<high LOCATION />
</mem-access>
<mem-access LOCATION>
<area LOCATION />
...
</mem-access>

Allow to bound the accessed addresses of a memory instruction. When multiple areas are defined, they are joined to a single continuous area! Mainly useful to help data cache analysis.

<reg-set name="TEXT"> VALUE </reg-set>

Set the value of a register. name is the name of the register.

<mem-set type="TEXT" LOCATION> VALUE </mem-set>

Set the value of a kind of memory. The LOCATION attributes gives the address of the accessed memory and type defines the type of data among int8, int16, int32, int64, uint8, uint16, uint32 and uint64.VALUE may be one of:

<value LOCATION/>

Declare a simple integer value or an address.

<low LOCATION/>
<high LOCATION/>

A range of integer or of addresses.

<value LOCATION step="INTEGER" count="INTEGER"/>

Declare a CLP (b, d, n) of base the location attributes, step and count and denotes the set { b + k d / 0 <= j <= n }.

F4 : Flow Facts File Format

This file format is used to store flow facts information, currently, the loop bounds.The usual non-mandatory extension of F4 files is "ff".
Lexical Level

F4 is a simple plain text format. It may contain comments a-la C++, that is, one line comments prefixed by "//" or enclosed comments between "/ *" and "* /"." Spaces and line format are not meaningful for other commands. In the following description, upper case words represents variable part of the command, i.e. sub-rules of grammar. If such a token is prefixed by a name followed by ":", this name is used to identify the token in subsequent description.

Directives
  • loop ADDRESS COUNT ;
    Declare that the loop whose header start at the given address has the given maximal bound.
  • loop ADDRESS ... in STEP1 / STEP2 / ...;
    Same as above but limit the loop bound to the given calling context. STEP1 is the address of the function calling the loop, STEP2 is the address of the function calling the former one and so on. It is not required to go back to the task entry point. In the latter case, the bound will be applied to any call context whose prefix matches the given one.
  • loop ADDRESS [max MAX] [total TOTAL] [in ...]
    In addition to select the MAX number of iterations per startup of a loop, this form of loop allows also to select the TOTAL number of iterations for the whole task run.
  • checksum VALUE ;
    This command is used to check the consistency between the flow fact file and the matching executable file (it is the Fletcher checksum of the executable file).
  • return ADDRESS ;
    Mark a complex control instruction as equivallent to sub-program return.
  • noreturn FUNCTION_ADDRESS ;
    Mark the function as non-returning like the standard C library "exit".
  • ignorecontrol ADDRESS ;
    Force to ignore the control effect of the addressed instruction.
  • ignoreseq ADDRESS ;
    Force the target instruction to be considered as an unconditional branch. Can only be put on a conditional branch instruction.
  • multibranch ADDRESS to ADDRESS, ADDRESS, ... ;
    List the different tagets of a multi-target control instruction (switch-like construction).
  • multicall ADDRESS to ADDRESS, ADDRESS, ... ;
    List the different tagets of a multi-target call instruction (function pointer call).
  • nocall FUNCTION_ADDRESS ;
    Process each call to the given function as a non-control instruction. It may be useful to remove call to intrusive initialization function like "__eabi" in main.
  • doinline FUNCTION_ADDRESS ;
    When virtualizing, calls to the given function will be inlined.
  • noinline FUNCTION_ADDRESS ;
    When virtualizing, calls to the given function will not be inlined.
  • inlining-on FUNCTION_ADDRESS ;
    When virtualizing the given function, default inlining policy will be set to true.
  • inlining-off FUNCTION_ADDRESS ;
    When virtualizing the given function, default inlining policy will be set to false.
  • preserve ADDRESS ;
    Ensure that flow fact loader will not change the addressed instruction.
  • ignore entry STRING;
    In some executable files, symbols are marked as function entries but are not, possibly causing problems in instruction decoding. This problem may be avoided by marking such symbols with this directive.
  • library;
    This command is marker informing that the current flow fact file is applied to a library. The main effect is that if a label does not exist in the current executable, instead of raising a fatal error, the matching flow fact is quietly ignored considering that the label of the library is not linked in the current executable.
Syntactic items

FUNCTION_ADDRESS may have one of the following form:

  • INTEGER: integer address,
  • STRING: double-quoted string that must match a program label,

STEP may have one of the following form:

  • ADDRESS: simple address of a function,
  • @ ADDRESS: address of instruction calling the previous function.

ADDRESS may have one of the following form:

  • INTEGER: integer address,
  • STRING: double-quoted string that must match a program label,
  • STRING + INTEGER: address relative to a label,
  • STRING - INTEGER: address back-relative to a label.

INTEGER may have one of the following form:

  • {DECIMAL_DIGIT}+: decimal integer
  • 0{OCTAL_DIGIT}+: octal integer
  • 0x{HEXADECIMAL_DIGIT}+: hexadecimal integer
  • 0b{BINARY_DIGIT}+: binary integer
Examples

This example shows a program composed of two function, "main" and "ludcmp" containing nested loops.

checksum "ludcmp.elf" 0xaa9b6952;
// Function main
loop "main" + 0x40 6;
loop "main" + 0x70 6;
// Function ludcmp
loop "ludcmp" + 0x80 5;
loop "ludcmp" + 0x108 5;
loop "ludcmp" + 0x170 5;
loop "ludcmp" + 0x2e0 5;
loop "ludcmp" + 0x344 5;
loop "ludcmp" + 0x4a4 5;
loop "ludcmp" + 0x4e0 5;
loop "ludcmp" + 0x654 5;
loop "ludcmp" + 0x6a0 5;
This second example shows the use of contextual loop bounds, that is, bounds only applied according the function call context. In this example, the loop in "f" iterates 10 or 20 times according "f"'s caller being "g1" or "g2". In addition, this flow facts states that the loop in the second state iterates at most 50 times for the whole task run.
checksum "test.arm" 0xdac4ee63;
// Function f
loop "f" + 0x24 10 in "f" / "g1" / "main";
loop "f" + 0x24 max 20 total 50 in "f" / "g2" / "main";
To Come
  • "branch ADDRESS to ADDRESS ;"
  • "loop ADDRESS max COUNT min COUNT ;"
  • "recursive ADDRESS max COUNT min COUNT ;"
  • "entry ADDRESS ;"
  • "entry NAME ;"
Extensions
Flow fact files are very useful file to allow user to give more detail on the behaviour of a program. This section presents some extensions that remain experimental.
  • memory access iaddr: ADDRESS .. lo: ADDRESS .. hi: ADDRESS ;
    Definition of the range lo to hi (exclusive) for the memory instruction at address iaddr.
  • reg NAME = DATA ; Allows to assign a value to a register. This value may be a simple integer or an address.
  • mem [TYPE] ADDRESS = DATA ; Assign a value in memory.TYPE may be one int8, uint8, int816, uint16, int32, uint32, int64, uint64, float32 or float64. DATA supports several forms described below.

DATA a bit complex but allows a lot of flexibility:

  • ADDRESS – the easier form, a simple integer or an address,
  • [ ADDRESS .. ADDRESS ] – an integer or address interval,
  • ( ADDRESS, INTEGER, INTEGER ) – a CLP triple (b, d, n) representing the integer set { b + k d / 0 <= k <= n }.

Function Documentation

Identifier<Pair<Address, Address> > otawa::ACCESS_RANGE ( "otawa::ACCESS_RANGE"  )

Put on a memory access instruction, provides a range of possible accesses.

Features
Hooks
Identifier<Address> otawa::BRANCH_TARGET ( "otawa::BRANCH_TARGET"  ,
Address()   
)

Put on instruction that may branch to several targets or whose target computation cannot computed.

There is one property with this identifier for each branched target.

Features
  • FLOW_fACTS_FEATURE
Hooks
Identifier<Address> otawa::CALL_TARGET ( "otawa::CALL_TARGET"  ,
Address()   
)

Put on instruction that may call to several targets or whose target computation cannot computed.

There is one property with this identifier for each called target.

Features
  • FLOW_fACTS_FEATURE
Hooks
Feature<FlowFactLoader> otawa::FLOW_FACTS_FEATURE ( "otawa::FLOW_FACTS_FEATURE"  )

This feature ensures that the flow facts has been loaded.

Currrently, only the otawa::util::FlowFactLoader provides this kind of information from F4 files.

Hooked Properties
Identifier<bool> otawa::FLOW_FACTS_MANDATORY ( "otawa::FLOW_FACTS_MANDATORY"  ,
false   
)

In configuration of the FlowFactLoader, makes it fail if no flow fact fail is available.

Identifier<xom::Element *> otawa::FLOW_FACTS_NODES ( "otawa::FLOW_FACTS_NODES"  )

This property may be used in the configuration of a code processor to directly pass an xml element containing flow facts in Flow Fact XML format format.

Several properties with this identifier may be passed.

Identifier<Path> otawa::FLOW_FACTS_PATH ( "otawa::FLOW_FACTS_PATH"  ,
""   
)

This property may be used in the configuration of a code processor to pass the path of an flow fact file containing flow facts.

Several properties with this identifier may be passed.

Identifier<bool> otawa::IGNORE_CONTROL ( "otawa::IGNORE_CONTROL"  ,
false   
)

Put on a control instruction to prevent it to be interpreted as is.

Features
Hooks
Identifier<bool> otawa::IGNORE_ENTRY ( "otawa::IGNORE_ENTRY"  ,
false   
)

Put on function symbol that must be ignored as function entry.

It mainly used to avoid problems with executable files containing symbols marked as function that are in fact data.

Features
Hooks
Identifier<bool> otawa::IGNORE_SEQ ( "otawa::IGNORE_SEQ"  ,
false   
)

Put on a control instruction to prevent to pass in sequence.

Features
Hooks
Identifier<bool> otawa::INLINING_POLICY ( "otawa::INLINING_POLICY"  )

Put on the first instruction of a function to set default inlining behavior during its virtualization.

This overrides VIRTUAL_INLINING default policy of Virtualizer.

Identifier<bool> otawa::IS_RETURN ( "otawa::IS_RETURN"  ,
false   
)

Put on a control flow instruction, this shows that this instruction is equivalent to a function return.

It may be useful with assembly providing very complex ways to express a function return.

Hooks
  • Inst (otawa::util::FlowFactLoader)
Identifier<int> otawa::MAX_ITERATION ( "otawa::MAX_ITERATION"  ,
1 
)

Put on the first instruction of a loop, it gives the maximum number of iteration of this loop.

Hooks
  • Inst (otawa::util::FlowFactLoader)
Identifier<int> otawa::MIN_ITERATION ( "otawa::MIN_ITERATION"  ,
1 
)

Put on the first instruction of a loop, it gives the minimal number of iterations.

Features
Hooks
Identifier<bool> otawa::NO_CALL ( "otawa::NO_CALL"  ,
false   
)

Put on the first instruction of a function that must be no called.

Features
Hooks
Identifier<bool> otawa::NO_INLINE ( "otawa::NO_INLINE"  )

Put on the first instruction of a function to indicate whether it should be inlined or not during virtualization.

This overrides VIRTUAL_INLINING default policy of Virtualizer and INLINING_POLICY of the caller CFG.

Identifier<bool> otawa::NO_RETURN ( "otawa::NO_RETURN"  ,
false   
)

This annotation is put on the first instruction of functions that does not never return.

It is usually put on the C library "_exit" function.

Hooks
  • Inst (otawa::util::FlowFactLoader)
Identifier<bool> otawa::PRESERVED ( "otawa::PRESERVED"  ,
false   
)

Put on instruction that must preserved from the mkff special flow-fact detection.

Features
Hooks
Identifier<int> otawa::TOTAL_ITERATION ( "otawa::TOTAL_ITERATION"  ,
1 
)

Put on the first instruction of a loop, it gives the total number of iterations during the whole execution of the program.

Features
Hooks

Variable Documentation

Identifier<Pair<Address, Address> > otawa::ACCESS_RANGE("otawa::ACCESS_RANGE")

Put on a memory access instruction, provides a range of possible accesses.

Features
Hooks

Referenced by otawa::FlowFactLoader::onMemoryAccess().

Identifier<Address> otawa::BRANCH_TARGET("otawa::BRANCH_TARGET", Address())

Put on instruction that may branch to several targets or whose target computation cannot computed.

There is one property with this identifier for each branched target.

Features
  • FLOW_fACTS_FEATURE
Hooks

Referenced by otawa::PFGBuilder::addFunction(), otawa::CFGBuilder::buildCFG(), otawa::PFGBuilder::finalizeBB(), otawa::FlowFactLoader::onMultiBranch(), and otawa::VarTextDecoder::processEntry().

Identifier<Address> otawa::CALL_TARGET("otawa::CALL_TARGET", Address())

Put on instruction that may call to several targets or whose target computation cannot computed.

There is one property with this identifier for each called target.

Features
  • FLOW_fACTS_FEATURE
Hooks

Referenced by otawa::CFGBuilder::buildCFG(), otawa::FlowFactLoader::onMultiCall(), and otawa::VarTextDecoder::processEntry().

Feature<FlowFactLoader> otawa::FLOW_FACTS_FEATURE("otawa::FLOW_FACTS_FEATURE")

This feature ensures that the flow facts has been loaded.

Currrently, only the otawa::util::FlowFactLoader provides this kind of information from F4 files.

Hooked Properties

Referenced by otawa::TextDecoder::TextDecoder().

Identifier<bool> otawa::FLOW_FACTS_MANDATORY("otawa::FLOW_FACTS_MANDATORY", false)

In configuration of the FlowFactLoader, makes it fail if no flow fact fail is available.

Referenced by otawa::FlowFactLoader::configure().

Identifier<xom::Element *> otawa::FLOW_FACTS_NODES("otawa::FLOW_FACTS_NODES")

This property may be used in the configuration of a code processor to directly pass an xml element containing flow facts in Flow Fact XML format format.

Several properties with this identifier may be passed.

Referenced by otawa::FlowFactLoader::configure(), and otawa::script::Script::work().

Identifier<Path> otawa::FLOW_FACTS_PATH("otawa::FLOW_FACTS_PATH","")

This property may be used in the configuration of a code processor to pass the path of an flow fact file containing flow facts.

Several properties with this identifier may be passed.

Referenced by otawa::FlowFactLoader::configure(), and otawa::Application::run().

Identifier<bool> otawa::IGNORE_CONTROL("otawa::IGNORE_CONTROL", false)

Put on a control instruction to prevent it to be interpreted as is.

Features
Hooks

Referenced by otawa::CFGBuilder::buildCFG(), and otawa::FlowFactLoader::onIgnoreControl().

Identifier<bool> otawa::IGNORE_ENTRY("otawa::IGNORE_ENTRY", false)

Put on function symbol that must be ignored as function entry.

It mainly used to avoid problems with executable files containing symbols marked as function that are in fact data.

Features
Hooks

Referenced by otawa::FlowFactLoader::onIgnoreEntry(), and otawa::VarTextDecoder::processWorkSpace().

Identifier<bool> otawa::IGNORE_SEQ("otawa::IGNORE_SEQ", false)

Put on a control instruction to prevent to pass in sequence.

Features
Hooks

Referenced by otawa::CFGBuilder::buildCFG(), and otawa::FlowFactLoader::onIgnoreSeq().

Identifier<bool> otawa::INLINING_POLICY("otawa::INLINING_POLICY")

Put on the first instruction of a function to set default inlining behavior during its virtualization.

This overrides VIRTUAL_INLINING default policy of Virtualizer.

Referenced by otawa::FlowFactLoader::onSetInlining(), and otawa::Virtualizer::virtualize().

Identifier<bool> otawa::IS_RETURN("otawa::IS_RETURN", false)

Put on a control flow instruction, this shows that this instruction is equivalent to a function return.

It may be useful with assembly providing very complex ways to express a function return.

Hooks
  • Inst (otawa::util::FlowFactLoader)

Referenced by otawa::CFGBuilder::buildCFG(), otawa::FlowFactLoader::onReturn(), and otawa::VarTextDecoder::processEntry().

Identifier<int> otawa::MAX_ITERATION("otawa::MAX_ITERATION",-1)

Put on the first instruction of a loop, it gives the maximum number of iteration of this loop.

Hooks
  • Inst (otawa::util::FlowFactLoader)

Referenced by otawa::FlowFactLoader::onLoop(), otawa::ets::FlowFactLoader::processAST(), otawa::ipet::FlowFactConstraintBuilder::processBB(), and otawa::ipet::FlowFactLoader::transfer().

Identifier<int> otawa::MIN_ITERATION("otawa::MIN_ITERATION",-1)

Put on the first instruction of a loop, it gives the minimal number of iterations.

Features
Hooks

Referenced by otawa::ipet::FlowFactConstraintBuilder::processBB(), and otawa::ipet::FlowFactLoader::transfer().

Identifier<bool> otawa::NO_CALL("otawa::NO_CALL", false)

Put on the first instruction of a function that must be no called.

Features
Hooks

Referenced by otawa::CFGBuilder::buildCFG(), otawa::FlowFactLoader::onNoCall(), and otawa::VarTextDecoder::processEntry().

Identifier<bool> otawa::NO_INLINE("otawa::NO_INLINE")

Put on the first instruction of a function to indicate whether it should be inlined or not during virtualization.

This overrides VIRTUAL_INLINING default policy of Virtualizer and INLINING_POLICY of the caller CFG.

Referenced by otawa::Virtualizer::isInlined(), otawa::FlowFactLoader::onNoInline(), and otawa::VirtualCFG::virtualize().

Identifier<bool> otawa::NO_RETURN("otawa::NO_RETURN", false)

This annotation is put on the first instruction of functions that does not never return.

It is usually put on the C library "_exit" function.

Hooks
  • Inst (otawa::util::FlowFactLoader)

Referenced by otawa::CFGBuilder::buildCFG(), otawa::FlowFactLoader::onNoReturn(), otawa::VarTextDecoder::processEntry(), and otawa::Symbol::setNoReturn().

Identifier<bool> otawa::PRESERVED("otawa::PRESERVED", false)

Put on instruction that must preserved from the mkff special flow-fact detection.

Features
Hooks

Referenced by otawa::FlowFactLoader::onPreserve().

Identifier<int> otawa::TOTAL_ITERATION("otawa::TOTAL_ITERATION",-1)

Put on the first instruction of a loop, it gives the total number of iterations during the whole execution of the program.

Features
Hooks

Referenced by otawa::FlowFactLoader::onLoop(), otawa::ipet::FlowFactConstraintBuilder::processBB(), and otawa::ipet::FlowFactLoader::transfer().