1. A method comprising: building, on a computer, at least one intermediate representation (IR) including a specification for one or more components and a plurality of interconnections between the one or more components; storing the at least one IR in a memory; analyzing, on the computer, a first component of the at least one IR, the analyzing comprising receiving a first input value; determining a first condition of whether the first component produces an output value that is the same as the first input value; and determining a second condition of whether the first component does not change internal state with the first input value; when the first and second conditions are determined to exist, then rearranging, on the computer, at least one of the plurality of interconnections or at least one of the one or more of the components in the at least one IR.