Invention Grant
- Patent Title: Compile time evaluation of library functions
- Patent Title (中): 图书馆功能的编译时间评估
-
Application No.: US11505070Application Date: 2006-08-15
-
Publication No.: US07921418B2Publication Date: 2011-04-05
- Inventor: Rohini Nair , Thomas James Christopher Ward
- Applicant: Rohini Nair , Thomas James Christopher Ward
- Applicant Address: US NY Armonk
- Assignee: International Business Machines Corporation
- Current Assignee: International Business Machines Corporation
- Current Assignee Address: US NY Armonk
- Agency: Schmeiser, Olsen & Watts
- Agent John Pivnichny
- Main IPC: G06F9/45
- IPC: G06F9/45

Abstract:
A method and system for evaluating a call to a library function at compile time. A first call included in a program being compiled by a compiler is identified. The first call is a call to a library function included in a pre-defined list of library functions external to the program. The first call includes one or more arguments associated with one or more formal arguments of a library function in the pre-defined list. The identification of the first call includes searching the pre-defined list of library functions for the library function. The arguments are determined to be constants. A second call to the library function is constructed in an optimizer of the compiler. A result of the second call is statically computed in the optimizer by issuing the second call with the constants as arguments. During compile time, the first call is replaced with the result.
Public/Granted literature
- US20080046870A1 Compile time evaluation of library functions Public/Granted day:2008-02-21
Information query