PIPS
|
#include <stdio.h>
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "misc.h"
#include "ri-util.h"
Go to the source code of this file.
Functions | |
expression | update_range (f, r, expression lw, expression up, expression in, bool left) |
Prettyprint one FORTRAN 90 loop as an array expression. More... | |
expression update_range | ( | f | , |
r | , | ||
expression | lw, | ||
expression | up, | ||
expression | in, | ||
bool | left | ||
) |
Prettyprint one FORTRAN 90 loop as an array expression.
Pierre Jouvelot
For one level only loop, with one assignment as body. Replaces occurences of the index variable by ranges in expressions. Ranges are prettyprinted as triplet when they occur as subscript expressions and as vectors with implicit DO otherwise. If the replacement cannot occur, for instance because subscript expressions are coupled, the loop is printed as a loop.
There are/were memory leaks here since a new expression is constructed. Entity f is supposed to be a binary operator, not always commutative but meaningful for a range and a scalar or for two ranges. Boolean argument left means that range r appears on the left of f, i.e. as first operator.
No sharing is created between the new expression e and arguments r, lw, up or in.
expression "in" must be integer constant 1
Definition at line 61 of file fortran90.c.
References copy_expression(), copy_range(), entity_intrinsic(), entity_local_name(), expression_integer_value(), expression_undefined, f(), free_expression(), int_to_expression(), intptr_t, is_syntax_range, make_expression(), make_syntax(), MakeBinaryCall(), MakeUnaryCall(), MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, normalized_undefined, pips_assert, range_consistent_p(), range_increment, range_lower, range_upper, and UNARY_MINUS_OPERATOR_NAME.
Referenced by expand_call().