摘要 |
Methods, apparatuses, and computer readable media for unreachable code identification and removal. A method includes generating a Use Graph for a program. Generating the Use Graph includes identifying global identifiers within the program, creating a node in the Use Graph for each of the global identifiers, traversing the program to identify each use of a global identifier, and creating edges in the Use Graph corresponding to each identified use of a global identifier. The method includes storing usee global identifiers identified from the Use Graph, and determining unused global identifiers corresponding to identified global identifiers that are not usee global identifiers. The method includes removing unreachable software code associated with the unused global identifiers from the program to produce a revised program and storing the revised program.
|