×

Eliminating store/restores within hot function prolog/epilogs using volatile regosters

  • US 20020196678A1
  • Filed: 03/14/2002
  • Published: 12/26/2002
  • Est. Priority Date: 03/23/2001
  • Status: Active Grant
First Claim
Patent Images

1. A method for code optimization, comprising:

  • disassembling object code that has been compiled and linked;

    analyzing the disassembled code so as to identify a first function in the code, the first function including store and restore instructions with respect to one or more non-volatile registers and further including a call instruction to a second function that is performed infrequently when the first function is run;

    identifying one or more volatile registers unused in the first function; and

    modifying the code so as to replace each reference in the first function to at least one of the non-volatile registers with a reference to a corresponding one of the unused volatile registers, and so as to eliminate at least one pair of the store and restore instructions in the first function with respect to the at least one of the non-volatile registers while storing the corresponding one of the volatile registers before the call instruction to the second function and restoring the corresponding one of the volatile registers after the call instruction to the second function.

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