US2008034361A1PendingUtilityA1

Method and apparatus for generating multiple processor- specific code segments in a single executable

Assignee: INTEL CORPPriority: Apr 13, 1998Filed: Oct 11, 2007Published: Feb 7, 2008
Est. expiryApr 13, 2018(expired)· nominal 20-yr term from priority
G06F 8/447G06F 9/44547
50
PatentIndex Score
0
Cited by
0
References
0
Claims

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.

Claims

exact text as granted — not AI-modified
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; and    if so, generating the customized version of object code.    
   
   
       2 . The method of  claim 1  further comprising: 
 generating a non-customized version of object code that can be executed by more than one type of processor.    
   
   
       3 . The method of  claim 2  further comprising: 
 generating a control section to examine a processor variable and to cause a version of object code to be called during execution in accordance with an executing processor's type, and wherein the control section examines the processor variable.    
   
   
       4 . The method of  claim 1  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; and 
 if so, generating the two or more customized versions of object code and a non-customized version of object code.    
   
   
       5 . The method of  claim 4  further comprising: 
 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.    
   
   
       6 . The method of  claim 5  wherein the first customized version of the object code is more advanced than the second customized version of object code, and wherein the control section causes the first customized version of object code to be executed if the processor type variable corresponds to a processor type that can execute either the first or second customized versions of object code.  
   
   
       7 . A system comprising: 
 a bus coupling elements of the system;    a memory coupled to the bus to store instructions; and    a processor coupled to the bus, the processor to execute instructions to perform operations 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; and  
 if so, generating the customized version of object code.  
   
   
   
       8 . The system of  claim 7  wherein the operations further comprise the operation of generating a non-customized version of object code that can be executed by more than one type of processor.  
   
   
       9 . The system of  claim 7  wherein the operations further comprise the operation of generating a control section to examine a processor type variable, the control section to cause a version of object code to be called during execution in accordance with an executing processor's type.  
   
   
       10 . A processor to execute a compiler program to perform operations 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; and    if so, generating the customized version of object code.    
   
   
       11 . The compiler program of  claim 10  further comprising the operation of generating a non-customized version of object code that can be executed by more than one type of processor.  
   
   
       12 . The compiler program of  claim 11  further comprising the operation of generating a control section that causes one of the versions of object code to be called during execution in accordance with an executing processor's type.  
   
   
       13 . The compiler program of  claim 10  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; and 
 if so, the compiler program generates the two or more customized versions of object code.    
   
   
       14 . The compiler program of  claim 13  wherein the compiler program further comprises the operation of generating a non-customized version of object code that can be executed by more than one type of processor.  
   
   
       15 . The compiler program of  claim 14  wherein the compiler program further comprises the operation of 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.  
   
   
       16 . The compiler program of  claim 15  wherein the control section examines a processor type variable.  
   
   
       17 . The compiler program of  claim 16  wherein the first customized version of the object code is more advanced than the second customized version of object code, and wherein the control section causes the first customized version of object code to be executed if the processor type variable corresponds to a processor type that can execute either the first or second customized versions of object code.  
   
   
       18 . An article comprising a computer-accessible medium having associated instructions, wherein the instructions, when accessed, result in a machine performing 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; and    if so, generating the customized version of object code.    
   
   
       19 . The article of  claim 18  wherein the method further comprises generating a non-customized version of object code.  
   
   
       20 . The article of  claim 19  wherein the non-customized version of object code can be executed by more than one type of processor.  
   
   
       21 . The article of  claim 20  wherein the method further comprises generating a control section that causes one of the versions of object code to be called during execution in accordance with an executing processor's type.  
   
   
       22 . The article of  claim 18  wherein the determining further comprises determining 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; and 
 if so, generating the two or more customized versions of object code.    
   
   
       23 . The article of  claim 22  wherein the method further comprises generating a non-customized version of object code.  
   
   
       24 . The article of  claim 23  wherein the method further comprises: 
 generating a control section to examine a processor type variable and to cause 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.    
   
   
       25 . The article of  claim 24  wherein the first customized version of the object code is more advanced than the second customized version of object code, and wherein the control section causes the first customized version of object code to be executed if the processor type variable corresponds to a processor type that can execute either the first or second customized versions of object code.

Join the waitlist — get patent alerts

Track US2008034361A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.