• Aucun résultat trouvé

ENTRY RETURNS(DEC FLOAT);

Dans le document OS PL/I (Page 161-167)

DCL I FLOAT BIN(60};

E: ENTRY RETURNS(DEC FLOAT);

DCL F DEC FLOAT., G FILE;

RETURN(F)i RETURN (G);

In this example, the first RETURN statement conflicts with the PROC statement and will be treated as a RETURN without an expression if executed during an invocation of P.

Similarly, the expression in the second RETURN statement will be ignored if executed during an invocation of E.

DATA VARIABLE USED FOR PROGRAM CONTROL.

BASED REFERENCE TO PROGRAM CONTROL DATA REFERS TO STORAGE USED BY VARIABLE D BUT IS ACCEPTED AS VALID.

DCL BLV LABEL BASED, P POINTER;

P->BLV = LAB CON

1. GOTO P->BLV (valid)

Part I: Compile-time(IEL) Messages 157

***

BEFORE CALLING IBM FOR PROGRAMMING SUPPORT, REFER TO PAGE 3

***

IEL0910I W

IEL0911I W

2. GOTO ADDR(FLOAT)->BLV (invalid but allowed)

~!E!~n~t!Qn: The global* optimization process must include analysis of all possible values of label

variables~ entry variables, and pointers in the program before it can attempt to perform move-out and

strength-reduction. During the process~ the second condition in the example above would be detected. This condition would restrict the global* optimization process, since this process cannot detect all the possible label constant values that might be assigned to FLOAT.

*Global optimization is defined in the explanation for IEL0910I.

TOO MANY CALLS AND FUNCTION REFERENCES FOR OPTIMIZATION.

COMPILER RESTRICTION.

compilation is completed without global optimization; some local optimization may have been performed. ~n this context, lo~J_QPtimi~at1QD includes such things as the in-line simplification of calculations such as 1*3 and A**4, and the matching of data items with format items in edit I/O. Conversely. gJQ~~! 2Et!~!~~!QD is concerned with the commoning of expressions, the moving of invariant expressions from loops, and further simplification of expressions. If full global optimization is ferformed, then any or all of the types of optimization may be

carried out, either within or between flow units (logical divisions of the PL/I source program). If certain

compiler limitations are exceeded, then global

optimization is restricted to expression commoning alone.

Furthermore, this is performed solely ~!tniD flow units.

The compiler permits up to 256 separate CALL statements and function references involving both entry constants and entry variables. This limit includes each entry constant or entry variable passed as an argument to an external procedure. A further limit of 2048 exists for all possible assignments of entry constants to entry variables.

Rrog!~~~~E_g~~EQn~~: To obtain global optimization i t is necessary to simplify the program's structure so that the number of branches between begin blocks and between

internal procedures is kept within the limits described above.

TOO MANY LOCATOR LABEL OR ENTRY ASSIGNMENTS FOR OPTIMIZATION.

COMPILER RESTRICTION. TOO MANY LOCATOR LABEL OR ENTRY VARIABLE ASSIGNMENTS. OPTIMIZATION IS INHIBITED FOR THE

IEL0912r W exceeded. The compilation is completed without global optimization.

The compiler permits up to 1360 locator, label, or entry variable assignments without inhibiting

optimization.

* Local and global optimization are defined in the explanation for IEL0910I.

~~2gram~!-B~E2n~: To obtain global optimization i t is necessary to reduce the number of locator and entry

variable assignments that appear in the source program.

TOO MANY BASED LOCATOR LABEL OR ENTRY ASSIGNMENTS FOR OPTIMIZATION.

COMPILER RESTRICTION. TOO MANY ASSIGNMENTS WITH BASED LOCATORS LABEL OR ENTRY VARIABLES. OPTIMIZATION IS INHIBITED FOR THE PROGRAM. without global optimization.

The compiler permits up to 680 based locator, label or entry variable assignments without inhibiting

optimization.

* Local and global optimization are defined in the explanation for IEL0910I.

~g~m~r ResE2~: To obtain global optimization i t is necessary to reduce the number of based locator, based label, and based entry variable assignments that appear in the source program.

TOO MANY LOCATOR TEMPORARIES ACTIVE FOR OPTIMIZATION.

COMPILER RESTRICTION. TOO MANY LOCATOR TEMPORARIES ACTIVE. OPTIMIZATION IS INHIBITED FOR THE PROGRAM.

EXElan~~!2n: The compiler creates a 'locator temporary' for functions that return locator values. A program that is to be compiled with global* optimization (with

OPT (TIME) specified) has so many of these locator

temporaries created that the capacity of the compiler to analyze them has been exceeded. The compilation is completed without global optimization.

The compiler permits up to 10 locator temporaries without inhibiting optimization.

* Local and global optimization are defined in the explanation for IEL0910I.

Part I: Compile-time (IEL) Messages 159

*** BEFORE CALLING IBM FOR PROGRAMMING SUPPORT, REFER TO PAGE 3 ***

IEL0914I W

IEL0915I W

I]~L0916I W

Programm~B~2E2n§~: To obtain global optimization i t is necessary to reduce the number of locator values returned by functions that appear in the source program.

STATEMENT MAY NEVER BE EXECUTED.

STATEMENT MAY NEVER BE EXECUTED.

P: PROCEDURE;

DCL X, Y CHAR(l);

IF X='2' THEN Y=";

GOTO L2;

Ll: A=5;

L2: B=6;

END P;

ELSE GOTO L2;

In this example, the message will be produced for the statement labelled Ll. since there is no possibility of control being transferred to i t .

The statement nGOTO L2;n in this example can be executed.

However, the optimization process has modified the THEN clause to branch directly to the label constant L2 rather than to the statement following the ELSE clause. The message is then produced and the redundant statement is eliminated.

E:;!Elan~!:iQ!!: This message warns that the compiler has detected a statement that can never be executed as the flow of control must always pass by it.

TOO MANY STATEMENT LABEL CONSTANTS FOR OPTIMIZATION.

COMPILER RESTRICTION. TOO MANY STATEMENT LABEL CONSTANTS.

OPTIMIZATION IS INHIBITED FOR THE PROGRAM.

Explanation: A program that is to be compiled with global* optimization (with OPT (TIME) specified) has so many statement label constants that the capacity of the compiler to analyze them has been exceeded. The

compilation is completed without global optimization.

The compiler permits up to 2048 statement label constants without inhibiting optimization.

* Local and global optimization are defined in the explanation for IEL0910I.

Programmer Respon~~: To obtain global optimization i t is necessary to reduce the number of statement label

constants used in the source program.

ITEM(S) D MAY BE UNINITIALIZED.

ITEM(S) D MAY BE UNINITIALIZED WHEN USED IN THIS BLOCK.

IEL0917I W

Y: PROC;

DCL X;

Z=X;

END Y;

Explanation: This message refers only to variables declared within the block. The flow-analysis stage of optimization che6ks all possible flow-paths through a program although many of the possible flow-paths may never be used. In doing so, the flow analysis determines

flow-paths originating from statements prefixed by label constants that can be branched to from on-units, as well aggravated by the necessity to consider label constants as external entry points. In the following example, an exceeded, and consequently, global optimization is restricted. Before scanning to the next block, the

compiler looks fo·r do-groups in the current block, in the hope that flow analysis (and full global optimization) may be completed for these.

* Local and global optimization are defined in the explanation for IEL0910I.

Programmer Response: If full optimization is required for the block~ either simplify the flow of control within the block, or divide the block into two or more simpler

blocks.

Part I: Compile-time(IEL) Messages 161

*** BEFORE CALLING IBM FOR PROGRAMMING SUPPORT, REFER TO PAGE 3 ***

IEL0918I W

execution-time error. If this message appears, message IEL0580I (severity E) will have been produced for the specified label variable.

Pr2gramme!-B~§E2n§~: Redeclare the LABEL variable as AUTOMATIC.

N VARIABLES IN PROGRAM. GLOBAL OPTIMIZATION RESTRICTED.

N VARIABLES IN PROGRAM. GLOBAL OPTIMIZATION PERFORMED FOR 255 VARIABLES. LOCAL OPTIMIZATION PERFORMED ON REMAINDER.

Explan~tiQ!!: The compiler will consider 255 variables in the program for global* optimization. The remainder are considered solely for local* optimization.

Explicitly-declared variables will be considered for global optimization in preference to contextually declared variables, and the latter will in turn be considered in preference to implicitly declared variables. Furthermore, the highest preference will be given to those variables declared in the final DECLARE statements in the outermost block.

If the program contains more than 255 variables, most benefit will be obtained from the global optimization of arithmetic variables, particularly DO loop control

variables and subscripting variables. Little or no benefit will be gained from the optimization of string variables or program control data.

Arithmetic variables should not, therefore, be

implicitly declared but should be declared in the final DECLARE statements in the outermost block. Further benefits may be obtained if declared but unreferenced variables are eliminated from the program.

* Local and global optimization are defined in the explanation for IEL0910I.

N FLOW UNITS IN DO GROUP. GLOBAL OPTIMIZATION RESTRICTED. been exceeded and full global* optimization within the group. Partial global

will be performed for flow units within the

IEL0921I E

IEL0923I E

IEL0924I E

*

Local and global optimization are defined in the explanation for IEL0910I.

LESS THAN N CHARACTERS OF T IN D PRINTED.

QUALIFIED NAME OF ELEMENT T OF STRUCTURE D WILL BE TRUNCATED TO LESS THAN N CHARACTERS IN DATA DIRECTED I/O.

PUT DATA (PAYROLL}i

where PAYROLL is declared as a base element of a structure which when fully qualified exceeds 255 characters~

including periods.

D INVALID TYPE IN DATA LIST FOR DATA DIRECTED I/O OR CHECK.

COMPILER RESTRICTION. TYPE OF 'BASED' VARIABLE D IN DATA LIST NOT SUPPORTED FOR DATA DIRECTED I/O OR CHECK.

ITEM IGNORED.

DCL 1 STR BASED(P),

Dans le document OS PL/I (Page 161-167)

Documents relatifs