Patent ID: 9218168
Filing Date: 2015-12-22
Classification: G06F

Abstract:
1. A computer implemented method for processing table of contents (TOC) saves, the method comprising: identifying, with a compiler, a first function call site in a calling function, the first function call site requiring an unconditional TOC save of a TOC pointer value stored in a TOC register for the calling function; identifying a first location in the calling function for the unconditional TOC save, the first location dominating the first function call site; identifying a second function call site in the calling function, the second function call site requiring a conditional or unconditional TOC save of the TOC pointer value stored in the TOC register for the calling function; determining that the first location in the calling function dominates the second function call site; emitting, by the compiler, a TOC save instruction at the first location in the calling function, the TOC save instruction satisfying the unconditional TOC save requirement for the first function call site and further satisfying the conditional or unconditional TOC save requirement for the second function call site; and indicating that the emitted TOC save instruction satisfies the conditional or unconditional TOC save requirement for the second function call site.