Method and apparatus for generating multiple processor-specific code segments in a single executable
First Claim
1. A method comprising:
- analyzing a source code segment that is to be compiled for execution by any one of a plurality of types of processors;
determining whether generating a customized version of object code for the source code segment to execute on a particular one of the plurality of types of processors would provide a performance advantage over generating a non-customized version of object code;
if so, generating the customized version of object code;
wherein, in determining, a determination is made whether generating two or more customized versions of object code to execute on two or more types of processors would provide performance advantages over a non-customized version of object code;
if so, generating the two or more customized versions of object code and a non-customized version of object code; and
generating a control section that causes a first customized version of object code to be called during execution if the executing processor is a first type, the control section causing a second customized version of object code to be called during execution if the executing processor is a second type, and the control section causing the non-customized version of object code to be called during execution if the executing processor is neither the first or second type.
0 Assignments
0 Petitions
Accused Products
Abstract
A computer-implemented method analyzes a source code segment which is to be compiled for execution by any one of several different processor types. The method determines whether a performance advantage would be achieved by generating a customized version of object code that can be executed by one of the processor types compared with generating a non-customized version. If a performance advantage would be achieved, the method generates at least one customized object code version and a non-customized version for the source code segment, and it generates a control section that causes one of the object code versions to be called during execution of the object code in accordance with an executing processor'"'"'s processor type. If no performance advantage would be achieved, the method generates a non-customized version of the object code that can be executed by any of the different processor types.
-
Citations
3 Claims
-
1. A method comprising:
-
analyzing a source code segment that is to be compiled for execution by any one of a plurality of types of processors; determining whether generating a customized version of object code for the source code segment to execute on a particular one of the plurality of types of processors would provide a performance advantage over generating a non-customized version of object code; if so, generating the customized version of object code; wherein, in determining, a determination is made whether generating two or more customized versions of object code to execute on two or more types of processors would provide performance advantages over a non-customized version of object code; if so, generating the two or more customized versions of object code and a non-customized version of object code; and generating a control section that causes a first customized version of object code to be called during execution if the executing processor is a first type, the control section causing a second customized version of object code to be called during execution if the executing processor is a second type, and the control section causing the non-customized version of object code to be called during execution if the executing processor is neither the first or second type. - View Dependent Claims (2, 3)
-
Specification