Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

A Method to Divide an Assembly Program into Methods

IP.com Disclosure Number: IPCOM000012692D
Original Publication Date: 2003-May-21
Included in the Prior Art Database: 2003-May-21
Document File: 3 page(s) / 79K

Publishing Venue

IBM

Abstract

Disclosed is a mechanism to separate an assembly program into multiple "methods" which is a unit for optimization.

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 3

A Method to Divide an Assembly Program into Methods

  Disclosed is a mechanism to separate an assembly program into multiple "methods" which is a unit for optimization.

The mechanism consists of the following five steps.

STEP 1

Separate the target assembly program into basic blocks (BBs), which is a section where flow of control never merges or diverges, and construct a flow graph. Conventional technique can be used for this step. The separation points are:

a. Entry points of the program which are specified in advance

b. Targets of BRANCH and BAL (branch and link) instructions

c. Points after BRANCH instructions

d. Points after RET (return) instructions

e. Points after EXIT instructions, which finishes the execution

Note that points after BAL is not separated, and BAL source and target is not connected in the flow graph.

STEP 2

Register entry points (specified in advance) and BAL targets as "entries".

STEP 3

Calculate reachablity from each "entry" (ReachableEntries[BBn]) by solving the following dataflow equations.

GEN[BBn] = { i } -- if BBn is the target of "entry" i

= { } -- otherwise

ReachableEntries[BBn] = U(ReachableEntries[Prev(BBn)]) U GEN[BBn]

STEP 4

If the calculated results (ReachableEntries) of two BBs connected in the flow graph are different, register the point as a new "entry" if not registered yet.

For example, if BBx-->BBy is connected in the flow graph and BBx is reachable only from "entry" 1 and BBy is reachable from "entries" 1 and 2, register BB...