Automatic compiler restructuring of COBOL programs into a proc per paragraph model
AssigneeHewlett-Packard Company
InventorsJeffrey B. Caldwell, Harry Charles Muttart, David Henry Gross
Life of this patent
Estimating the term…
Loading patent…
AssigneeHewlett-Packard Company
InventorsJeffrey B. Caldwell, Harry Charles Muttart, David Henry Gross
Estimating the term…
A compiler for compiling and optimizing a COBOL program. The invention is embodied in a front end that reads the COBOL program and generates an intermediate representation that can be optimized by later stages of the compiler. After reading the COBOL program, the compiler first coalesces the paragraphs into procedures. If a paragraph's preceding paragraph is not a potential exit point, then the paragraphs are coalesced. Next, the basic block counts of the procedures are estimated. If a basic block count exceeds a predetermined limit, then basic blocks are sliced from the procedure, placed into a new procedure, and a call to the new procedure is inserted into the sliced procedure. Finally, the compiler generates a super-procedure from the sliced procedures. The super-procedure implements the control flow of the original COBOL program. Because the resulting program behavior resembles that of a C, C++, or Fortran program, the compiler can use C, C++, or Fortran compiler technology to optimize the COBOL program.
A compiler adapted for execution on a computer system having a memory, the compiler comprising:
A method of compiling a source program stored in a memory of a computer system, the source program comprised of a plurality of paragraphs, each paragraph having a plurality of instructions, the instructions defining a control flow, the method comprising the steps of:
A computer program product having a computer readable medium having computer program logic recorded thereon for optimizing a source program on a computer system having a memory, the computer program product comprising:
Dependencies are inferred from the claim text.