PIPS
|
non well structured à la Fortran do-loop into an equivalent code with tests and gotos. More...
Functions | |
statement | unsugared_loop_header (statement sl) |
LOOP_HEADER, LOOP_TEST and LOOP_INC build the desugaring phases of a do-loop L for the loop header (i=1), the test (i<10) and the increment (i=i+1). More... | |
statement | unsugared_forloop_header (statement sl) |
statement | unsugared_whileloop_header (statement sl __attribute__((__unused__))) |
statement | unsugared_loop_test (statement sl) |
Do a crude test of end of do-loop for do-loop unsugaring. More... | |
statement | unsugared_forloop_test (statement sl) |
statement | unsugared_whileloop_test (statement sl) |
statement | unsugared_loop_inc (statement sl) |
Do an index increment instruction for do-loop unsugaring. More... | |
statement | unsugared_forloop_inc (statement sl) |
non well structured à la Fortran do-loop into an equivalent code with tests and gotos.
sl | l |
Definition at line 474 of file controlizer.c.
References copy_expression(), forloop_initialization, instruction_to_statement(), make_instruction_expression(), and statement_forloop().
Referenced by controlize_forloop().
sl | l |
Definition at line 569 of file controlizer.c.
References copy_expression(), forloop_increment, instruction_to_statement(), make_instruction_expression(), and statement_forloop().
Referenced by controlize_forloop().
Build if (c) with empty branches:
sl | l |
Definition at line 518 of file controlizer.c.
References copy_expression(), forloop_condition, instruction_to_statement(), make_instruction_test(), make_plain_continue_statement(), make_test(), and statement_forloop().
Referenced by controlize_forloop().
LOOP_HEADER, LOOP_TEST and LOOP_INC build the desugaring phases of a do-loop L for the loop header (i=1), the test (i<10) and the increment (i=i+1).
Make an index initialization header for an unsugared à la Fortran do-loop "do i = l,u,s"
[in] | sl | is the do-loop statement |
Build a reference expression to the loop index:
Assign the lower range to it:
sl | l |
Definition at line 463 of file controlizer.c.
References copy_expression(), entity_to_expression(), loop_index, loop_range, make_assign_statement(), range_lower, and statement_loop().
Referenced by controlize_loop().
Do an index increment instruction for do-loop unsugaring.
TODO : indeed the code is wrong since it only works for loops without side effects on the index inside the loop
[in] | sl | is a statement loop of the form "do i = l, u, s" |
Build "i + s"
Build "i = i +s"
sl | l |
Definition at line 554 of file controlizer.c.
References copy_expression(), entity_intrinsic(), entity_to_expression(), loop_index, loop_range, make_assign_statement(), MakeBinaryCall(), PLUS_OPERATOR_NAME, range_increment, and statement_loop().
Referenced by controlize_loop().
Do a crude test of end of do-loop for do-loop unsugaring.
TODO : indeed the code is wrong since it only works for loops without side effects on the index inside the loop and if the stride is positive, and the upper bound greated than the lower bound
[in] | sl | is a statement loop of the form "do i = l, u, s" |
Build i < u
Build if (i < u) with empty branches:
sl | l |
Definition at line 502 of file controlizer.c.
References copy_expression(), entity_intrinsic(), entity_to_expression(), GREATER_THAN_OPERATOR_NAME, instruction_to_statement(), loop_index, loop_range, make_instruction_test(), make_plain_continue_statement(), make_test(), MakeBinaryCall(), range_upper, and statement_loop().
Referenced by controlize_loop().
Definition at line 484 of file controlizer.c.
References make_plain_continue_statement().
Referenced by controlize_repeatloop(), and controlize_whileloop().
sl | l |
Definition at line 531 of file controlizer.c.
References copy_expression(), instruction_to_statement(), make_instruction_test(), make_plain_continue_statement(), make_test(), statement_whileloop(), and whileloop_condition.
Referenced by controlize_repeatloop(), and controlize_whileloop().