13.10.2014 Views

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

OPTIMIZING THE JAVA VIRTUAL MACHINE INSTRUCTION SET BY ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

138<br />

eligible for multicode substitution because they span two or more multicode blocks.<br />

As a result, it is necessary to establish a separate notation to denote the number<br />

of times that the multicode will be executed if it is substituted. This notation is<br />

shown below in Equation 7.10 and Equation 7.11. Equation 7.10 represents the<br />

number of times that an unoptimized multicode substitution can be performed, while<br />

Equation 7.11 represents the number of optimized multicode substitutions that can be<br />

performed. These values are identical in all cases because multicode block boundaries,<br />

not optimization potential, dictate whether a substitution is possible.<br />

N x1 /x 2 /x 3 /.../x n→ (7.10)<br />

N x1 x 2 x 3 ...x n→ (7.11)<br />

The overall performance gain that can be expected from a multicode substitution is<br />

the product of the number of times that the multicode substitution can be performed<br />

and the amount of performance gain achieved for each substitution. The notation used<br />

to denote the unoptimized and optimized performance gain are shown in Equations<br />

7.12 and 7.13 respectively.<br />

ε x1 /x 2 /x 3 /.../x n→ = ∆ x1 /x 2 /x 3 /.../x n→ × N x1 /x 2 /x 3 /.../x n→ (7.12)<br />

ε x1 x 2 x 3 ...x n→ = ∆ x1 x 2 x 3 ...x n→ × N x1 x 2 x 3 ...x n→ (7.13)<br />

The notation introduced in this section will be used to describe how to identify<br />

the best candidate sequences for multicode replacement for a particular application<br />

or set of applications.<br />

7.3 Multicode Identification<br />

The process of determining what sequences of bytecodes should be replaced with<br />

multicodes will be referred to as multicode identification. The goal is to select those<br />

sequences that provide the maximal value of ε x1 x 2 x 3 ...x n→. However, determining these<br />

sequences is difficult because it is necessary to quantify the cumulative impact of a<br />

variety of factors, including the cost of the transfers removed, the amount of cost<br />

savings from optimization, and the impact the selection of the multicode will have on

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!