Patent ID: 8539467

Claim:
A method for solving conflicts in assembler programs, the method comprising: a) generating an internal representation of control flow of a source code of the assembler program by using standard techniques of compiler constructions, wherein said internal representation contains nodes for every instruction found in said source code and a directed edge for every possible flow of control between nodes; b) attributing data attributes to said nodes and/or said edges, wherein said data attributes are used to store the information whether the resource used by at least one instruction of said assembler program is available or for which amount of time is unavailable; c) applying a data-flow analysis method to said internal representation of the control flow of the source code for determining whether the resource used by at least one instruction of said assembler program is available or for which amount of time is unavailable comprising: c1) initializing all of said attributes of said internal representation of the control flow of the source code with an initial value; c2) providing access to the following input parameters: execution time of said instruction associated to said node; information on what hardware resource is used by said instruction; and all attributes of the nodes from which a directed edge to said node for the attribute is currently being calculated; c3) calculating for each of the nodes a real value for said attribute associated to said node based on said parameters; c4) repeating calculating step in c3) until for all attributes the newly computed real value remains unchanged; d) checking for each node whether the instruction accesses a resource which is not available, wherein unavailable hardware resources represents a resource conflict; and e) taking an appropriate action in order to overcome the resource conflict, wherein said calculation of the real value for each data attribute D associated with each node n is performed by evaluating the assignment D=in(n) where an entry is a node where program execution begins and function in is given as in ⁡ ( n ) = { 0 if ⁢ ⁢ n ⁢ ⁢ is ⁢ ⁢ the ⁢ ⁢ entry ∏ p ∈ PRED ⁡ ( n ) ⁢ ⁢ F ⁡ ( inst p , in ⁡ ( p ) ) otherwise ( 6 ) and the flow function F is given as F ⁡ ( inst , D ) = { c if ⁢ ⁢ the ⁢ ⁢ execution ⁢ ⁢ of ⁢ ⁢ inst ⁢ ⁢ blocks the ⁢ ⁢ resource ⁢ ⁢ for ⁢ ⁢ c ⁢ ⁢ cycles s ⁡ ( D , c ) otherwise , let ⁢ ⁢ ⁢ the ⁢ ⁢ excution ⁢ ⁢ of inst ⁢ ⁢ take ⁢ ⁢ c ⁢ ⁢ cycles ( 5 ) which uses a function s defined as s ⁡ ( D , c ) = { 0 if ⁢ ⁢ D ≤ c D - c otherwise ( 4 ) and a meet operation returns the maximum value of a comparison between x and y wherein: x y=max(x,y) (3) and PRED(n) is a function that returns the set of all nodes from which there is a control flow edge to n.