Browse Prior Art Database

A method for speculatively moving indirect memory loads for non-type-safe languages

IP.com Disclosure Number: IPCOM000016674D
Original Publication Date: 2003-Jul-09
Included in the Prior Art Database: 2003-Jul-09
Document File: 1 page(s) / 13K

Publishing Venue

IBM

Abstract

Disclosed a method for speculatively moving indirect memory loads for non-type-safe languages on general architectures. Previous speculative code motion techniques for indirect memory loads for non-type-safe languages relied on special instructions, such as a speculative load (ld.s) on IA-64.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 61% of the total text.

Page 1 of 1

A method for speculatively moving indirect memory loads for non-type-safe languages

This disclosure consists of three steps to speculatively move indirect memory loads.

(1) We insert a dummy check (we do not generate any machine instruction) immediately before every memory access. This check has three parameters: base address, offset, and access length. We use it as a safeguard to correctly move memory loads.

(2) We eliminate redundant dummy checks. The dummy checks are very similar to array bounds checks in Java. Thus, we can implement this elimination by enhancing array bounds check elimination techniques for Java.

(3) We treat dummy checks as barriers in speculatively moving memory loads.

Fig.1 shows an example. In this example, we assume all memory loads are 32-bit loads. In the first step (a), we insert three dummy checks (denoted as RANGECHECK) for indirect loads from the variable 'a'. For the memoy load "a->id", offset is zero and access length is four bytes. Thus, we insert "RANGECHECK(a, 0, 4)" (1) before the memory load. For other two memory loads, we insert "RANGECHECK(a, 16, 4)" (2) and "RANGECHECK(a, 12, 4)" (3). In the second step (b), we can eliminate the dummy check in the loop (3) because of (1) and (2). In the third step (c), we can move the memory load "a->j" out of the loop because the dummy check (3) was eliminated in the second step.

a) After inserting dummy checks

RANGECHECK(a, 0, 4) -- (1)

id = a->id; /* offset: 0 */

RANGECHECK(a, 16, 4) -...