Every function that is called (“called function”) is expanded by insertion of several statements at the entry and exit thereof. Moreover, a calling function may also be expanded, by insertion of statements prior to and/or subsequent to a statement in which a called function is invoked. Many of the statements that are inserted contain new variables (called “synthetic variables”) to which registers are allocated during register allocation; the synthetic variables are not part of the originally-written software but are introduced during expansion, e.g. to transfer arguments to and return value from the called functions. Statements that are inserted can be either statements that are translated into assembly code in the normal manner, or alternatively dummy statements that contain instructions which are never translated into assembly code (i.e. ignored by the assembler. Use of dummy statements ensures that a web is established for new variables. After expansion, register allocation is performed.