ScEpTIC.AST.transformations.virtual_memory.analysis package
Submodules
ScEpTIC.AST.transformations.virtual_memory.analysis.memory_instructions_indentifier module
- class ScEpTIC.AST.transformations.virtual_memory.analysis.memory_instructions_indentifier.MemoryInstructionsIdentifier
Bases:
object
This class contains the analysis required for identifying the first/last memory read/write instructions.
- static resolve_first_reads_writes(basic_blocks, only_nvm=False, conditional_container=None, conditional_path=None)
- Analyses the provided sequence of basic blocks and returns:
the list of all the read instructions that can execute before any write
the list of all the write instructions that can execute as first
Each list is a python dictionary, whose key is the memory tag
- static resolve_last_reads_writes(basic_blocks, only_nvm=False, conditional_container=None, conditional_path=None)
- Analyses the provided sequence of basic blocks and returns:
the list of all the read instructions that can execute after any write
the list of all the write instructions that can execute as last
Each list is a python dictionary, whose key is the memory tag
ScEpTIC.AST.transformations.virtual_memory.analysis.memory_usage module
- class ScEpTIC.AST.transformations.virtual_memory.analysis.memory_usage.MemoryUsage
Bases:
object
- static get_base_memory_tag(memory_tag)
Returns the base memory tag, that is, a scalar-equivalent memory tag e.g. a[0] -> returns a[]
- static get_memory_usage_list(computation_intervals, order_function, initial_alive_tags)
Analyses the memory tags that need to be preserved across power failures :returns:
set of the tags that the function gets from outside its stack frame
set of the tags that the function writes outside its stack frame
list of the tags that need to be preserved, for each computation interval
Outside-frame accesses supported only for global variables. TODO: pointers (not required for evaluation)
- static get_outside_frame_read_volatile(before_call_data, outside_frame_reads)
Computes the elements that need to be retrieved from volatile memory
- static get_unique_volatile_elements(volatile_elements, merge_data={})
Merges volatile_elements and merge_data Parses retrieved volatile data and returns unique sets for each function
- static get_volatile_elements_after_calls(computation_intervals, order_function, checkpoint_function_name)
Returns for each function the memory tags whose store can target volatile memory Does not support call depth > 1 (sufficient for evaluation) TODO: support call depth > 1
- static get_volatile_elements_before_calls(computation_intervals, order_function, checkpoint_function_name)
Returns for each function the memory tags whose reads can target volatile memory Does not support call depth > 1 (sufficient for evaluation) TODO: support call depth > 1
- static remove_after_call_data_from_outside_frame_writes(after_call_data, outside_frame_writes)
Computes the elements that need to be preserved by the function call that has only one computation interval. The method returns a list of sets (one set per call to the function)
ScEpTIC.AST.transformations.virtual_memory.analysis.nvm_instructions_identifier module
- class ScEpTIC.AST.transformations.virtual_memory.analysis.nvm_instructions_identifier.NVMInstructionsIdentifier
Bases:
object
Class for identifying specific sets of NVM read/write instructions
- static already_processed(metadata)
Returns if the metadata has already been processed due to instructions included in previous instructions
- static identify_nvm_instruction(basic_blocks, conditional_container=None, conditional_path=None)
Identifies all the NVM read/write instructions in basic_block
- static identify_nvm_instructions_to_consolidate(metadata, n_min_function)
ScEpTIC.AST.transformations.virtual_memory.analysis.registers_usage module
- class ScEpTIC.AST.transformations.virtual_memory.analysis.registers_usage.RegistersUsage
Bases:
object
- static account_for_pc_save_only(comp_int_manager, name)
Adjust checkpoints that need to save the stack pointer (that is, if a checkpoint need to save a register, except PC) If a checkpoint need to save only the PC (that is, checkpoint_save_esp = False) -> no 2-phase-commit needed as PC save is atomic
- static get_alloca_regs(computation_intervals, n_args)
Returns the registers that are target of alloca instructions
- static get_regs_first_use_def(basic_blocks, alloca_regs)
- Returns two lists:
registers whose use happens before their defs
registers defined
- static reset_register_info(comp_int_manager, name)
Resets the register-saving information associated to each checkpoint
- static set_checkpoints_esp_reg(comp_int_manager, name)
Sets the checkpoints in the computation interval that need to save the stack pointer
- static set_checkpoints_general_purpose_regs(comp_int_manager, name)
Sets the general purpose registers that each checkpoint in the computation interval need to save
- static set_checkpoints_regs(comp_int_manager)
Identifies the registers that each checkpoint need to save