EP4081897A1 - Optimizing runtime alias checks - Google Patents
Optimizing runtime alias checksInfo
- Publication number
- EP4081897A1 EP4081897A1 EP20845310.0A EP20845310A EP4081897A1 EP 4081897 A1 EP4081897 A1 EP 4081897A1 EP 20845310 A EP20845310 A EP 20845310A EP 4081897 A1 EP4081897 A1 EP 4081897A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- runtime
- access
- code
- compiler
- generating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
- G06F8/433—Dependency analysis; Data or control flow analysis
- G06F8/434—Pointers; Aliasing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
- G06F8/436—Semantic checking
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
- G06F8/4434—Reducing the memory space required by the program code
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/45—Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
- G06F8/451—Code distribution
- G06F8/452—Loops
Definitions
- Aliasing refers to the case where the data location in memory can be accessed through different symbolic names in the program. Thus, modifying the data through one name implicitly modifies the values associated with all aliased names. As a result, aliasing has various effects on performance of the compiler and correctness of the code generated by the compiler. Where a value for an alias of a pointer is not known at compile time, runtime alias checks are inserted into the compiled code.
- Figure 1 is a block diagram of an example computing device for optimizing runtime alias checks according to some embodiments.
- Figure 2 is a flowchart of an example method for optimizing runtime alias checks according to some embodiments.
- Figure 3 is a flowchart of an example method for optimizing runtime alias checks according to some embodiments.
- Figure 4 is a flowchart of an example method for optimizing runtime alias checks according to some embodiments.
- Figure 5 is a flowchart of an example method for optimizing runtime alias checks according to some embodiments.
- Figure 6 is a flowchart of an example method for optimizing runtime alias checks according to some embodiments.
- a method of optimizing runtime alias checks includes identifying, by a compiler, a base pointer and a plurality of different memory accesses based on the base pointer in a code loop; generating, by the compiler, a first portion of runtime code to determine a minimum access and a maximum access of the plurality of different memory accesses; and generating, by the compiler, a second portion of runtime code including one or more runtime alias checks for the minimum access and one or more runtime alias checks for the maximum access.
- the one or more runtime alias checks are based on one or more other base pointers in the code loop.
- the method includes identifying, by the compiler, in the code loop, a first memory access group based on the base pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern; wherein generating the first portion of runtime code to determine the minimum access and the maximum access of the plurality of different memory addresses includes generating, by the compiler, the first portion of runtime code to determine the minimum access and the maximum access based on the common memory access pattern.
- generating the first portion of runtime code to determine the minimum access and the maximum access of the plurality of different memory addresses includes generating, by the compiler, the first portion of runtime code to determine another minimum access for the other base pointer and another maximum access for the other base pointer based on the common memory access pattern; and generating the second portion of runtime code includes generating, by the compiler, the second portion of runtime code including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the method includes identifying, by the compiler, in the code loop, a first memory access group based on the base pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern; generating, by the compiler, a third portion of runtime code to determine another minimum access based on the minimum access and determine another maximum access based on the maximum access; wherein generating the second portion of runtime code includes generating, by the compiler, the second portion of runtime code including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the method includes determining, by the compiler, an estimated cost of the one or more runtime checks; and determining, by the compiler, that the estimated cost falls below a threshold; wherein generating the first portion of runtime code and generating the second portion of runtime code are performed in response to the estimated cost falling below the threshold.
- the method includes applying, by the compiler, one or more loop optimizations to the code loop.
- an apparatus for optimizing runtime alias checks performs steps including: identifying, by a compiler, a base pointer and a plurality of different memory accesses based on the base pointer in a code loop; generating, by the compiler, a first portion of runtime code to determine a minimum access and a maximum access of the plurality of different memory accesses; and generating, by the compiler, a second portion of runtime code including one or more runtime alias checks for the minimum access and one or more runtime alias checks for the maximum access.
- the one or more runtime alias checks are based on one or more other base pointers in the code loop.
- the steps include identifying, by the compiler, in the code loop, a first memory access group based on the base pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern; wherein generating the first portion of runtime code to determine the minimum access and the maximum access of the plurality of different memory addresses includes generating, by the compiler, the first portion of runtime code to determine the minimum access and the maximum access based on the common memory access pattern.
- generating the first portion of runtime code to determine the minimum access and the maximum access of the plurality of different memory addresses includes generating, by the compiler, the first portion of runtime code to determine another minimum access for the other base pointer and another maximum access for the other base pointer based on the common memory access pattern; and generating the second portion of runtime code includes generating, by the compiler, the second portion of runtime code including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the steps include identifying, by the compiler, in the code loop, a first memory access group based on the base pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern; generating, by the compiler, a third portion of runtime code to determine another minimum access based on the minimum access and determine another maximum access based on the maximum access; wherein generating the second portion of runtime code includes generating, by the compiler, the second portion of runtime code including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the steps include determining, by the compiler, an estimated cost of the one or more runtime checks; and determining, by the compiler, that the estimated cost falls below a threshold; wherein generating the first portion of runtime code and generating the second portion of runtime code are performed in response to the estimated cost falling below the threshold.
- the steps include applying, by the compiler, one or more loop optimizations to the code loop.
- a computer program product for optimizing runtime alias checks is disposed upon a computer readable medium and includes computer program instructions that, when executed, cause a computer to perform steps including: identifying, by a compiler, a base pointer and a plurality of different memory accesses based on the base pointer in a code loop; generating, by the compiler, a first portion of runtime code to determine a minimum access and a maximum access of the plurality of different memory accesses; and generating, by the compiler, a second portion of runtime code including one or more runtime alias checks for the minimum access and one or more runtime alias checks for the maximum access.
- the one or more runtime alias checks are based on one or more other base pointers in the code loop.
- the steps include identifying, by the compiler, in the code loop, a first memory access group based on the base pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern; wherein generating the first portion of runtime code to determine the minimum access and the maximum access of the plurality of different memory addresses includes generating, by the compiler, the first portion of runtime code to determine the minimum access and the maximum access based on the common memory access pattern.
- generating the first portion of runtime code to determine the minimum access and the maximum access of the plurality of different memory addresses includes generating, by the compiler, the first portion of runtime code to determine another minimum access for the other base pointer and another maximum access for the other base pointer based on the common memory access pattern; and generating the second portion of runtime code includes generating, by the compiler, the second portion of runtime code including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the steps include identifying, by the compiler, in the code loop, a first memory access group based on the base pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern; generating, by the compiler, a third portion of runtime code to determine another minimum access based on the minimum access and determine another maximum access based on the maximum access; wherein generating the second portion of runtime code includes generating, by the compiler, the second portion of runtime code including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the steps include determining, by the compiler, an estimated cost of the one or more runtime checks; and determining, by the compiler, that the estimated cost falls below a threshold; wherein generating the first portion of runtime code and generating the second portion of runtime code are performed in response to the estimated cost falling below the threshold.
- FIG. 1 sets forth a block diagram of automated computing machinery including an exemplary computer 100 configured for optimizing runtime alias checks according to certain embodiments.
- the computer 100 of Figure 1 includes at least one computer processor 102 or ‘CPU’ as well as random access memory 104 (‘RAM’) which is connected through a high speed memory bus 106 and bus adapter 108 to processor 102 and to other components of the computer 100.
- processor 102 or ‘CPU’ as well as random access memory 104 (‘RAM’) which is connected through a high speed memory bus 106 and bus adapter 108 to processor 102 and to other components of the computer 100.
- RAM random access memory
- RAM 104 Stored in RAM 104 is an operating system 110.
- Operating systems useful in computers configured for optimizing runtime alias checks include UNIXTM, LinuxTM, Microsoft WindowsTM, and others as will occur to those of skill in the art.
- the operating system 110 in the example of Figure 1 is shown in RAM 104, but many components of such software typically are stored in non-volatile memory also, such as, for example, on data storage 112, such as a disk drive.
- the compiler 114 Also stored in RAM is the compiler 114 for optimizing runtime alias checks.
- the computer 100 of Figure 1 includes disk drive adapter 116 coupled through expansion bus 118 and bus adapter 108 to processor 102 and other components of the computer 100.
- Disk drive adapter 116 connects non-volatile data storage to the computer 100 in the form of data storage 112.
- Disk drive adapters useful in computers configured for optimizing runtime alias checks include Integrated Drive Electronics (‘IDE’) adapters, Small computer System Interface (‘SCSI’) adapters, and others as will occur to those of skill in the art.
- IDE Integrated Drive Electronics
- SCSI Small computer System Interface
- non-volatile computer memory is implemented for as an optical disk drive, electrically erasable programmable read-only memory (so-called ‘EEPROM’ or ‘Flash’ memory), RAM drives, and so on, as will occur to those of skill in the art.
- EEPROM electrically erasable programmable read-only memory
- Flash RAM drives
- the example computer 100 of Figure 1 includes one or more input/output (‘I/O’) adapters 120.
- I/O adapters implement user-oriented input/output through, for example, software drivers and computer hardware for controlling output to display devices such as computer display screens, as well as user input from user input devices 122 such as keyboards and mice.
- the example computer 100 of Figure 1 includes a video adapter 124, which is an example of an I/O adapter specially designed for graphic output to a display device 126 such as a display screen or computer monitor.
- Video adapter 124 is connected to processor 102 through a high speed video bus 128, bus adapter 108, and the front side bus 130, which is also a high speed bus.
- the exemplary computer 100 of Figure 1 includes a communications adapter 132 for data communications with other computers and for data communications with a data communications network. Such data communications are carried out serially through RS-232 connections, through external buses such as a Universal Serial Bus (‘USB’), through data communications networks such as IP data communications networks, and in other ways as will occur to those of skill in the art.
- Communications adapters implement the hardware level of data communications through which one computer sends data communications to another computer, directly or through a data communications network. Examples of communications adapters useful in computers configured for optimizing runtime alias checks include modems for wired dial-up communications, Ethernet (IEEE 802.3) adapters for wired data communications, and 802.11 adapters for wireless data communications.
- Figure 2 sets forth a flow chart illustrating an exemplary method for optimizing runtime alias checks that includes identifying 202, by the compiler 114, a base pointer and a plurality of different memory accesses based on the pointer in a code loop (e.g., a code loop in code 204 to be compiled by the compiler 114).
- the code loop includes an iterating portion of code 204 (e.g., a “for” loop, a “while” loop, etc.).
- the base pointer is a symbolic reference to a pointer to a location in memory. For example, the base pointer corresponds to a declared variable in the code loop, or an attribute input to a function that includes the code loop.
- the plurality of different memory accesses based on the base pointer are accesses to locations in memory using the base pointer or the base pointer and an offset. Where an offset is not used to access memory, and only the base pointer is used, the offset is considered to be NULL. Accordingly, where combinations of base pointers and offsets are discussed, it is assumed that such combinations include the base pointer itself (e.g., having a NULL offset).
- the subscript includes an loop induction variable and/or a combination of an loop induction variable and an offset.
- the loop induction variable includes a variable modified during iteration of the code loop.
- the offset includes a value to which the loop induction variable is added or subtracted to determine the particular memory location accessed during each iteration of the loop.
- “i” serves as the loop induction variable.
- the code loop includes base pointers “A,” “XI,” “X2,” “X3,” and “X4.”
- the base pointer “A” serves as the basis for twelve different memory accesses during each iteration of the loop: A[P], A[Q], A[R], A[2*P], A[2*Q], A[2*R], A[3*P], A[3*Q], A[3*R], A[4*P], A[4*Q], A[4*R]
- Each memory access corresponds to a range of addresses accessed relative to the memory access during the loop.
- a range of a particular memory access is defined by its base pointer, its offset, and the range of memory accesses determined by the loop induction variable. For example, given a start value of “S” for “i” and an end value of “E” for “i,” a range for memory access A[i + P] would start at A[S + P] and end at A[S + E] [0023]
- the plurality of different memory accesses are read accesses and/or write accesses.
- the base pointer is identified as not being able to be determined at compile time. Thus, the specific memory addresses targeted by the plurality of different memory accesses are unable to be determined at compile time.
- the base pointer is identified as one of a plurality of base pointers that are unable to be determined at compile time.
- the method of Figure 2 also includes generating 206 a first portion of runtime code 207 (e.g., machine-executable instructions) to determine a minimum access and a maximum access of the plurality of different memory accesses.
- runtime code 207 e.g., machine-executable instructions
- the minimum access is a lowest memory access in a range of memory accesses
- the maximum access is a highest memory access of the range of memory accesses.
- the base pointer “A” serves as the basis for twelve different memory accesses during each iteration of the loop: A[P], A[Q], A[R], A[2*P], A[2*Q], A[2*R], A[3*P], A[3*Q], A[3*R], A[4*P], A[4*Q], A[4*R]
- the minimum access “MIN_A” is determined as MIN(A[P], A[Q], A[R], A[2*P], A[2*Q], A[2*R], A[3*P], A[3*Q], A[3*R], A[4*P], A[4*Q], A[4*R]) and the maximum access is determined as MAX(A[P], A[Q], A[R], A[2*P], A[2*Q], A[2*R], A[3*P], A[3*Q], A[3*R], A[4*P], A[4*P], A[4*P], A[
- the method of Figure 2 also includes generating 208 a second portion of runtime code 210 (e.g., machine-executable instructions) including one or more runtime alias checks for the minimum access and one or more runtime alias checks for the maximum access.
- Runtime alias checks are functions that determine whether a memory range for a given memory access (e.g., the range of memory accessed by the given memory access) conflicts with a memory range for another memory access. A conflict exists when a range for a write memory access overlaps with the range for another memory access (e.g., a read memory access or another write memory access).
- the runtime alias checks are included in executable code (e.g., the compiled code 210) such that the runtime alias checks are performed when the executable code is executed.
- runtime alias checks are performed for each different memory access (e.g., each base pointer and offset combination) such that memory ranges for each write memory access are compared to memory access ranges every other memory access.
- memory access e.g., each base pointer and offset combination
- ranges for each write access in the grouping of memory accesses are compared to ranges of every other memory access in the grouping.
- the runtime code (e.g., the first portion of runtime code 207 and second portion of runtime code 210) is generated such that, for a given base pointer associated with multiple memory accesses, only the minimum access and the maximum access are included in the grouping of memory accesses for the runtime alias checks.
- the runtime alias checks for the base pointer exclude memory access from the plurality of different memory accesses other than the minimum access and maximum access.
- the grouping from which runtime alias checks are generated would include the minimum and maximum accesses for the first base pointer and the minimum and maximum accesses for the second base pointer, etc.
- MIN_A MIN(A[P], A[Q], A[R], A[2*P], A[2*Q], A[2*R], A[3*P], A[3*Q], A[3*R], A[4*P], A[4*Q], A[4*R])
- MAX A MAX(A[P], A[Q], A[R], A[2*P], A[2*Q], A[2*R], A[3*P], A[3*Q], A[3*R], A[4*P], A[4*Q], A[4*R])
- the compiler 114 applies loop optimizations (e.g., auto vectorization, loop versioning, loop distribution, loop load elimination, loop tiling, etc.) to the code loop which necessitate the runtime alias checks.
- the compiler 114 determines to apply the loop optimizations if the performance benefit provided by the loop optimization outweighs the performance cost of the runtime alias checks.
- the first portion of runtime code 207 and second portion of runtime code 210 are included in a compiled version of the code 204 such that the generated runtime alias checks are executed when the compiled code is executed.
- Figure 3 sets forth a flow chart illustrating an exemplary method for optimizing runtime alias checks that includes identifying 202, by a compiler 114, a base pointer and a plurality of different memory accesses based on the pointer in a code loop; generating 206 a first portion of runtime code 207 to determine a minimum access and a maximum access of the plurality of different memory accesses; and generating 208 a second portion of runtime code 210 including one or more runtime alias checks for the minimum address and one or more runtime alias checks for the maximum address.
- the method of Figure 3 differs from Figure 2 in that the method of Figure 3 also includes identifying 302, in the code loop, a first memory access group based on the first pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern.
- a memory access group for a given base pointer includes all memory accesses relative to that base pointer.
- a memory access pattern for a memory access group includes the set of subscripts (e.g., the offsets) for each of the memory accesses.
- the memory access group for the base pointer A is (A[P], A[Q], A[R], A[2*P], A[2*Q], A[2*R], A[3*P], A[3*Q], A[3*R], A[4*P], A[4*Q], A[4*R]).
- the memory access pattern for the base pointer A is ([P], [Q], [R], [2*P], [2*Q], [2*R], [3*P], [3*Q], [3*R], [4*P], [4*Q], [4*R]).
- the “foo2” example function also includes a base pointer B sharing a same memory access pattern as A.
- the method of Figure 3 further differs from Figure 2 in that generating 206 the first portion of runtime code 207 to determine the minimum access and the maximum access of the plurality of different memory addresses includes generating 304 the first portion of runtime code to determine the minimum access and the maximum access based on the common memory access pattern.
- the first portion of runtime code 207 is generated to include instructions to identify, at runtime, a minimum and maximum value from the common memory access pattern.
- MAX Common MAX(P, Q, R, 2*P, 2*Q, 2*R, 3*P, 3*Q, 3*R, 4*P, 4*Q, 4*R)” where MIN Common is a minimum value in the common memory access pattern and MAX Common is a maximum value in the common memory access pattern.
- the minimum access value is then determined by incrementing the base pointer by the minimum value in the common memory access pattern, and the maximum access is determined by incrementing the base pointer by the maximum value in the common memory access pattern.
- the first portion of runtime code 207 is generated to include instructions to determine the minimum access at runtime by incrementing the base pointer by the minimum value in the common memory access pattern, and instructions to determine the maximum access by incrementing the base pointer by the maximum value in the common memory access pattern.
- Figure 4 sets forth a flow chart illustrating an exemplary method for optimizing runtime alias checks that includes identifying 202, by a compiler 114, a base pointer and a plurality of different memory accesses based on the pointer in a code loop; identifying 302, in the code loop, a first memory access group based on the first pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern; generating 206 a first portion of runtime code 207 to determine a minimum access and a maximum access of the plurality of different memory accesses by generating 304 the first portion of runtime code to determine the minimum access and the second minimum access based on the common memory access pattern; and generating 208 a second portion of runtime code 210 including one or more runtime alias checks for the minimum address and one or more runtime alias checks for the maximum address.
- the method of Figure 4 differs from Figure 3 in that generating 206 a first portion of runtime code 207 to determine a minimum access and a maximum access of the plurality of different memory accesses also includes generating 402 the first portion of runtime code 207 to determine the another minimum access and another maximum access for the other base pointer based on the common memory access pattern.
- the first portion of runtime code 207 is generated to include instructions to find the minimum value of the common memory access pattern and the maximum value of the common memory access pattern.
- the first portion of runtime code 207 is then generated to determine minimum and maximum accesses for any base pointer sharing the common memory access pattern using the determined minimum value of the common memory access pattern and the maximum value of the common memory access pattern.
- the minimum access for the B base pointer is determined (e.g., by executing the first portion of runtime code 207) by incrementing the B base pointer by the minimum value of the common memory access pattern and the maximum access is determined by incrementing the B base pointer by the maximum value of the common memory access pattern.
- the method of Figure 4 differs from Figure 3 in that generating 208 a second portion of runtime code 210 including one or more runtime alias checks for the minimum access and one or more runtime alias checks for the maximum access includes generating 404 the second portion of runtime code 210 including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the second portion of runtime code 210 includes runtime alias checks for the minimum and maximum accesses for the first base pointer and minimum and maximum accesses for the second base pointer.
- Figure 5 sets forth a flow chart illustrating an exemplary method for optimizing runtime alias checks that includes identifying 202, by a compiler 114, a base pointer and a plurality of different memory accesses based on the pointer in a code loop; generating 206 a first portion of runtime code 207 to determine a minimum access and a maximum access of the plurality of different memory accesses; and generating 208 a second portion of runtime code 210 including one or more runtime alias checks for the minimum address and one or more runtime alias checks for the maximum address.
- the method of Figure 5 differs from Figure 2 in that the method of Figure 5 also includes identifying 502, in the code loop, a first memory access group based on the first pointer and a second memory access group based on another base pointer, wherein the first memory access group and the second memory access group share a common memory access pattern.
- the method of Figure 5 further differs from Figure 2 in that the method of Figure 5 also includes generating 504 a third portion of runtime code to determine another minimum access (e.g., for the other base pointer) based on the minimum access (e.g., for the base pointer) and determine another maximum access (e.g., for the other base pointer) based on the maximum access (e.g., for the base pointer).
- the minimum access and maximum access for the base pointer have been determined.
- the other minimum access for the other base pointer is determined (e.g., by executing the third portion of the runtime code 506) by incrementing the other base pointer by the minimum access decremented by the base pointer.
- the other maximum access for the other base pointer is determined (e.g., by executing the third portion of the runtime code 506) by incrementing the other base pointer by the maximum access decremented by the base pointer.
- the method of Figure 5 differs from Figure 2 in that generating 208 a second portion of runtime code 210 including one or more runtime alias checks for the minimum access and one or more runtime alias checks for the maximum access includes generating 508 the second portion of runtime code 210 including one or more runtime alias checks for the other minimum access and one or more runtime alias checks for the other maximum access.
- the second portion of runtime code 210 includes runtime alias checks for the minimum and maximum accesses for the first base pointer and minimum and maximum accesses for the second base pointer.
- Figure 6 sets forth a flow chart illustrating an exemplary method for optimizing runtime alias checks that includes identifying 202, by a compiler 114, a base pointer and a plurality of different memory accesses based on the pointer in a code loop; generating 206 a first portion of runtime code 207 to determine a minimum access and a maximum access of the plurality of different memory accesses; and generating 208 a second portion of runtime code 210 including one or more runtime alias checks for the minimum address and one or more runtime alias checks for the maximum address.
- the method of Figure 6 differs from Figure 2 in that the method of Figure 6 also includes determining 602 an estimated cost of the one or more runtime checks.
- the estimated cost is expressed as a number of runtime checks or a number of instructions required to perform the runtime checks.
- the number of runtime checks or instructions required to perform the runtime checks is determined based on a number of memory accesses in the plurality of different memory accesses.
- the method of Figure 6 further differs from Figure 2 in that the method of Figure 6 also includes determining 604 that the estimated cost falls below a threshold.
- the threshold corresponds to an expected performance for applying one or more loop operations.
- the first portion of runtime code 207 and second portion of runtime code 210 are only generated when the cost falls below the threshold.
- the loop optimizations are only performed when the estimated cost falls below the threshold.
- Exemplary embodiments of the present disclosure are described largely in the context of a fully functional computer system for optimizing runtime alias checks. Readers of skill in the art will recognize, however, that the present disclosure also can be embodied in a computer program product disposed upon computer readable storage media for use with any suitable data processing system.
- Such computer readable storage media can be any storage medium for machine-readable information, including magnetic media, optical media, or other suitable media. Examples of such media include magnetic disks in hard drives or diskettes, compact disks for optical drives, magnetic tape, and others as will occur to those of skill in the art.
- Persons skilled in the art will immediately recognize that any computer system having suitable programming means will be capable of executing the steps of the method of the disclosure as embodied in a computer program product. Persons skilled in the art will recognize also that, although some of the exemplary embodiments described in this specification are oriented to software installed and executing on computer hardware, nevertheless, alternative embodiments implemented as firmware or as hardware are well within the scope of the present disclosure.
- the present disclosure can be a system, a method, and/or a computer program product.
- the computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present disclosure.
- the computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device.
- the computer readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- a non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskete, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD- ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing.
- a computer readable storage medium, as used herein, is not to be construed as being transitory signals per se. such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber optic cable), or electrical signals transmited through a wire.
- Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network.
- the network can include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers.
- a network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
- Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-seting data, or either source code or object code writen in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
- the computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
- the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
- electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
- These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
- These computer readable program instructions can also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein includes an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
- the computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
- the flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure.
- each block in the flowchart or block diagrams can represent a module, segment, or portion of instructions, which includes one or more executable instructions for implementing the specified logical function(s).
- the functions noted in the block can occur out of the order noted in the figures.
- two blocks shown in succession can, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved.
- each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
Claims
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| IN201911053702 | 2019-12-24 | ||
| US16/774,756 US11435987B2 (en) | 2019-12-24 | 2020-01-28 | Optimizing runtime alias checks |
| PCT/US2020/066548 WO2021133769A1 (en) | 2019-12-24 | 2020-12-22 | Optimizing runtime alias checks |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| EP4081897A1 true EP4081897A1 (en) | 2022-11-02 |
| EP4081897B1 EP4081897B1 (en) | 2025-08-27 |
Family
ID=76438078
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP20845310.0A Active EP4081897B1 (en) | 2019-12-24 | 2020-12-22 | Optimizing runtime alias checks |
Country Status (6)
| Country | Link |
|---|---|
| US (1) | US11435987B2 (en) |
| EP (1) | EP4081897B1 (en) |
| JP (1) | JP7727636B2 (en) |
| KR (1) | KR20220115973A (en) |
| CN (1) | CN114846442A (en) |
| WO (1) | WO2021133769A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20250224938A1 (en) * | 2024-01-09 | 2025-07-10 | International Business Machines Corporation | Runtime check compiler optimization |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH08194624A (en) * | 1995-01-20 | 1996-07-30 | Fujitsu Ltd | How to create an executable program |
| CA2200812A1 (en) | 1997-03-24 | 1998-09-24 | Archambault, Roch George | Optimizing compilation of pointer variables |
| JP3608446B2 (en) | 1999-08-27 | 2005-01-12 | 富士通株式会社 | Compiler device and processor |
| JP2001142715A (en) | 1999-11-11 | 2001-05-25 | Nec Corp | Compiler and compilation method |
| US7013460B2 (en) * | 2001-05-15 | 2006-03-14 | Hewlett-Packard Development Company, L.P. | Specifying an invariant property (range of addresses) in the annotation in source code of the computer program |
| US20030074655A1 (en) * | 2001-09-27 | 2003-04-17 | Robison Arch D. | Method and apparatus for alias analysis for restricted pointers |
| US20090037690A1 (en) | 2007-08-03 | 2009-02-05 | Nema Labs Ab | Dynamic Pointer Disambiguation |
| US8285670B2 (en) | 2008-07-22 | 2012-10-09 | International Business Machines Corporation | Dynamically maintaining coherency within live ranges of direct buffers |
| US8533695B2 (en) * | 2010-09-28 | 2013-09-10 | Microsoft Corporation | Compile-time bounds checking for user-defined types |
| US9152417B2 (en) * | 2011-09-27 | 2015-10-06 | Intel Corporation | Expediting execution time memory aliasing checking |
| AU2013387185B2 (en) * | 2013-05-30 | 2016-08-04 | Intel Corporation | Allocation of alias registers in a pipelined schedule |
-
2020
- 2020-01-28 US US16/774,756 patent/US11435987B2/en active Active
- 2020-12-22 KR KR1020227022300A patent/KR20220115973A/en active Pending
- 2020-12-22 JP JP2022539163A patent/JP7727636B2/en active Active
- 2020-12-22 WO PCT/US2020/066548 patent/WO2021133769A1/en not_active Ceased
- 2020-12-22 EP EP20845310.0A patent/EP4081897B1/en active Active
- 2020-12-22 CN CN202080089932.1A patent/CN114846442A/en active Pending
Also Published As
| Publication number | Publication date |
|---|---|
| KR20220115973A (en) | 2022-08-19 |
| US20210191700A1 (en) | 2021-06-24 |
| JP2023508984A (en) | 2023-03-06 |
| WO2021133769A1 (en) | 2021-07-01 |
| US11435987B2 (en) | 2022-09-06 |
| EP4081897B1 (en) | 2025-08-27 |
| JP7727636B2 (en) | 2025-08-21 |
| CN114846442A (en) | 2022-08-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9342336B2 (en) | Memory page de-duplication in a computer system that includes a plurality of virtual machines | |
| US20190004946A1 (en) | Method and device for cache management | |
| US10467150B2 (en) | Dynamic tier remapping of data stored in a hybrid storage system | |
| US10198208B2 (en) | Performing collective I/O operations within operating system processes | |
| US10810105B2 (en) | Logging stored information for identifying a fix for and/or a cause of an error condition | |
| US20190324762A1 (en) | Kernel management method, device and computer program product | |
| US20160313919A1 (en) | Sub-block input/output (i/o) commands for storage device including byte stream buffer | |
| EP4081897B1 (en) | Optimizing runtime alias checks | |
| US10325844B2 (en) | Modifying execution flow in save-to-return code scenarios | |
| US9330037B2 (en) | Dynamically resizing direct memory access (DMA) windows | |
| US12008401B2 (en) | Automatic central processing unit (CPU) usage optimization | |
| US9003172B2 (en) | Intelligently controlling loading of legacy option ROMs in a computing system | |
| US20210303355A1 (en) | Memory allocation for processing-in-memory operations | |
| US11435806B2 (en) | Automatic voltage reconfiguration | |
| JP7658698B2 (en) | Executing small memory address width program code in a large memory address width address space | |
| US9870158B2 (en) | Rack mountable computer system that includes microarray storage systems | |
| US11556374B2 (en) | Compiler-optimized context switching with compiler-inserted data table for in-use register identification at a preferred preemption point | |
| US20170256028A1 (en) | Automatically enabling a read-only cache in a language in which two arrays in two different variables may alias each other | |
| US9665517B1 (en) | Multipath I/O in a computer system | |
| US9811345B2 (en) | Utilizing computing resources under a disabled processor node without fully enabling the disabled processor node | |
| US9104559B2 (en) | Preventing out-of-space errors for legacy option ROM in a computing system | |
| US11310112B2 (en) | Automatic server configuration using a switch | |
| US11507158B2 (en) | Electrical design current throttling | |
| US11853209B2 (en) | Shared memory workloads using existing network fabrics | |
| US20180069759A1 (en) | Self-locking a network communications component transmission rate |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: UNKNOWN |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE |
|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| 17P | Request for examination filed |
Effective date: 20220701 |
|
| AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| DAV | Request for validation of the european patent (deleted) | ||
| DAX | Request for extension of the european patent (deleted) | ||
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: EXAMINATION IS IN PROGRESS |
|
| 17Q | First examination report despatched |
Effective date: 20230705 |
|
| GRAP | Despatch of communication of intention to grant a patent |
Free format text: ORIGINAL CODE: EPIDOSNIGR1 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: GRANT OF PATENT IS INTENDED |
|
| INTG | Intention to grant announced |
Effective date: 20250325 |
|
| GRAS | Grant fee paid |
Free format text: ORIGINAL CODE: EPIDOSNIGR3 |
|
| GRAA | (expected) grant |
Free format text: ORIGINAL CODE: 0009210 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE PATENT HAS BEEN GRANTED |
|
| AK | Designated contracting states |
Kind code of ref document: B1 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| REG | Reference to a national code |
Ref country code: CH Ref legal event code: EP |
|
| REG | Reference to a national code |
Ref country code: DE Ref legal event code: R096 Ref document number: 602020057639 Country of ref document: DE |
|
| P01 | Opt-out of the competence of the unified patent court (upc) registered |
Free format text: CASE NUMBER: UPC_APP_3780_4081897/2025 Effective date: 20250820 |
|
| REG | Reference to a national code |
Ref country code: IE Ref legal event code: FG4D |
|
| REG | Reference to a national code |
Ref country code: NL Ref legal event code: MP Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: IS Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20251227 |
|
| PGFP | Annual fee paid to national office [announced via postgrant information from national office to epo] |
Ref country code: DE Payment date: 20251113 Year of fee payment: 6 |
|
| PGFP | Annual fee paid to national office [announced via postgrant information from national office to epo] |
Ref country code: GB Payment date: 20251203 Year of fee payment: 6 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: NO Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20251127 |
|
| REG | Reference to a national code |
Ref country code: LT Ref legal event code: MG9D |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: PT Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20251229 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: FI Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: HR Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 Ref country code: NL Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: GR Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20251128 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: SE Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: LV Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: PL Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 Ref country code: BG Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: RS Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20251127 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: ES Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| REG | Reference to a national code |
Ref country code: AT Ref legal event code: MK05 Ref document number: 1830721 Country of ref document: AT Kind code of ref document: T Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: RO Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: SM Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: DK Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: AT Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: IT Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: CZ Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |
|
| PG25 | Lapsed in a contracting state [announced via postgrant information from national office to epo] |
Ref country code: SK Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 Ref country code: EE Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT Effective date: 20250827 |