1. A computerized method of optimizing code of a software program by analyzing dominance relationships between a plurality of functions of the software program, the method comprising: receiving, at a computer including at least one processor and memory, a source code of a software program, the source code having a plurality of functions; identifying a plurality of intraprocedural dominator graphs each for another of the plurality of functions of the source code; combining, by the at least one processor, the plurality of intraprocedural dominator graphs to create a combined interprocedural dominance graph with edges that logically connect between nodes of the plurality of functions of the source code; identifying, by the at least one processor, a plurality of interprocedural dominance relations between nodes in different functions of the plurality of functions of the source code using the combined interprocedural dominance graph; computing a static single assignment (SSA) form based on the plurality of interprocedural dominance relations; identifying one or more interprocedural dominance candidates in the combined intraprocedural dominator graph; and computing an interprocedural dominator set for each of the interprocedural dominance candidates; performing an analysis of the received software program according to the plurality of interprocedural dominance relations; and optimizing of the source code according to an outcome of said analysis; wherein combining comprises computing the combined interprocedural dominance graph by logically adding interprocedural edges between the one or more interprocedural dominance candidates and one or more dominators from the interprocedural dominator set.