×

Managing variable assignments in a program

  • US 8,555,266 B2
  • Filed: 11/13/2007
  • Issued: 10/08/2013
  • Est. Priority Date: 11/13/2007
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for managing variable assignments in a program, comprisingthe program containing a plurality of paths, wherein each path is a portion or sequence of programming statements that are executed during a particular execution of the program, and one or more variable assignments located at one or more corresponding program points, wherein each variable assignment assigns a value to a variable;

  • identifying one or more variable assignments in the program that is live on only a portion of the plurality of paths from the corresponding program point by examining each variable assignment in an order that is reverse from an order of execution of the program to form one or more identified variable assignments,for each identified variable assignment,determining, in an order that is reverse from an order of execution of the program, one or more program points at which the identified variable assignment would be closer to one or more locations in the program at which the variable of the identified variable assignment is used,responsive to determining the one or more program points, determining whether the identified variable assignment is movable to the one or more program points, wherein the identified variable assignment is movable to the one or more program points if the identified variable assignment is live on all of a plurality of paths from the one or more program points, wherein the one or more identified variable assignments is live on all of the plurality of paths at the one or more program points if each of the plurality of paths from the one or more program points uses the variable of the identified variable assignment, andresponsive to determining that the identified variable assignment is movable to the one or more program points, moving the identified variable assignment to the one or more program points.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×