Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 116 lines (94 sloc) 5.039 kb
d237cc9 A couple of new backend files dealing with arrays
paul_brook authored
1 /* Header for array handling functions
2 Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3 Contributed by Paul Brook
4
5 This file is part of GNU G95.
6
7 GNU G95 is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU G95 is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU G95; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22 /* Generate code to free an array. */
23 tree g95_array_deallocate (tree);
24
25 /* Generate code to initialise an allocate an array. Statements are added to
26 se, which should contain an expression for the array descriptor. */
27 void g95_array_allocate (g95_se *, g95_ref *, tree);
28
3d50a84 Backend stuff:
paul_brook authored
29 /* Generate code to allocate a temporary array. */
a2272d4 Fix breakages due to changes in the GCC source tree.
paul_brook authored
30 tree g95_trans_allocate_temp_array (g95_loopinfo *, g95_ss_info *, tree, tree);
3d50a84 Backend stuff:
paul_brook authored
31
b36c70b Fix build problems vs. recent GCC changes.
paul_brook authored
32 /* Generate function entry code for allocation of compiler allocated array
33 variables. */
a2272d4 Fix breakages due to changes in the GCC source tree.
paul_brook authored
34 tree g95_trans_auto_array_allocation (tree, g95_symbol *);
3d50a84 Backend stuff:
paul_brook authored
35 /* Generate entry and exit code for dummy array parameters. */
36 tree g95_trans_dummy_array_bias (g95_symbol *, tree, tree);
d237cc9 A couple of new backend files dealing with arrays
paul_brook authored
37 /* Add initialisation for deferred arrays. */
38 tree g95_trans_deferred_array (g95_symbol *, tree);
b36c70b Fix build problems vs. recent GCC changes.
paul_brook authored
39 /* Generate an initializer for a static pointer or allocatable array. */
40 void g95_trans_static_array_pointer (g95_symbol *);
366fb67 Modifications to how pointer variables are translated (mainly in
paul_brook authored
41
d237cc9 A couple of new backend files dealing with arrays
paul_brook authored
42 /* Generate scalarization information for an expression. */
43 g95_ss * g95_walk_expr (g95_ss *, g95_expr *);
366fb67 Modifications to how pointer variables are translated (mainly in
paul_brook authored
44 /* Walk the arguments of an intrinsic function. */
45 g95_ss * g95_walk_elemental_function_args (g95_ss *, g95_expr *, g95_ss_type);
46 /* Walk an intrinsic function. */
47 g95_ss * g95_walk_intrinsic_function (g95_ss *, g95_expr *,
48 g95_intrinsic_sym *);
49
50 /* Free the SS assocuated with a loop. */
51 void g95_cleanup_loop (g95_loopinfo *);
52 /* Associate a SS chain with a loop. */
53 void g95_add_ss_to_loop (g95_loopinfo *, g95_ss *);
54 /* Mark a SS chain as used in this loop. */
a2272d4 Fix breakages due to changes in the GCC source tree.
paul_brook authored
55 void g95_mark_ss_chain_used (g95_ss *, unsigned);
9bd9dbe Backend:
paul_brook authored
56
57 /* Calculates the lower bound and stride of array sections. */
58 void g95_conv_ss_startstride (g95_loopinfo *);
59
60 void g95_init_loopinfo (g95_loopinfo *);
61 void g95_copy_loopinfo_to_se (g95_se *, g95_loopinfo *);
62
366fb67 Modifications to how pointer variables are translated (mainly in
paul_brook authored
63 /* Marks the start of a scalarized expression, and declares loop variables. */
b36c70b Fix build problems vs. recent GCC changes.
paul_brook authored
64 void g95_start_scalarized_body (g95_loopinfo *, stmtblock_t *);
9bd9dbe Backend:
paul_brook authored
65 /* Generates the actual loops for a scalarized expression. */
b36c70b Fix build problems vs. recent GCC changes.
paul_brook authored
66 void g95_trans_scalarizing_loops (g95_loopinfo *, stmtblock_t *);
a2272d4 Fix breakages due to changes in the GCC source tree.
paul_brook authored
67 /* Mark the end of the main loop body and the start of the copying loop. */
b36c70b Fix build problems vs. recent GCC changes.
paul_brook authored
68 void g95_trans_scalarized_loop_boundary (g95_loopinfo *, stmtblock_t *);
9bd9dbe Backend:
paul_brook authored
69 /* Initialise the scalarization loop parameters. */
366fb67 Modifications to how pointer variables are translated (mainly in
paul_brook authored
70 void g95_conv_loop_setup (g95_loopinfo *);
38d52a1 Fix thinko which made g95 enter an infinite loop when compiling function...
paul_brook authored
71 /* Resolve array assignment dependencies. */
a2272d4 Fix breakages due to changes in the GCC source tree.
paul_brook authored
72 void g95_conv_resolve_dependencies (g95_loopinfo *, g95_ss *, g95_ss *);
9bd9dbe Backend:
paul_brook authored
73
366fb67 Modifications to how pointer variables are translated (mainly in
paul_brook authored
74 /* Get a single array element. */
75 void g95_conv_array_ref (g95_se *, g95_array_ref *);
9bd9dbe Backend:
paul_brook authored
76 /* Translate an array reference. */
a2272d4 Fix breakages due to changes in the GCC source tree.
paul_brook authored
77 //void g95_conv_scalarized_array_ref (g95_se *, g95_array_ref *);
78 /* Translate a reference to a temporary array. */
79 void g95_conv_tmp_array_ref (g95_se * se);
d92ce74 Added more documentation to the backend array/expression code.
paul_brook authored
80 /* Translate a reference to an array temporary. */
81 void g95_conv_tmp_ref (g95_se *);
82
83 /* Convert an array for passing as an actual function parameter. */
84 void g95_conv_array_parameter (g95_se *, g95_expr *, g95_ss *);
9bd9dbe Backend:
paul_brook authored
85
a54e6de Handle arrays without creating a descriptor where possible.
paul_brook authored
86 /* These work with both descriptors and descriptorless arrays. */
87 tree g95_conv_array_base (tree);
88 tree g95_conv_array_data (tree);
919aba1 Changed the format of array descriptors to use arrays for stride/bound
paul_brook authored
89 /* Return either an INT_CST or an expression for that part of the descriptor. */
9bd9dbe Backend:
paul_brook authored
90 tree g95_conv_array_stride (tree, int);
91 tree g95_conv_array_lbound (tree, int);
92 tree g95_conv_array_ubound (tree, int);
93
94 /* The remaining space available for stack variables. */
95 extern unsigned HOST_WIDE_INT g95_stack_space_left;
96 /* Returns true if a variable of specified size should go on the stack. */
97 int g95_can_put_var_on_stack (tree);
d237cc9 A couple of new backend files dealing with arrays
paul_brook authored
98
662ce28 Change the format of an array descriptor. Added rank member and grouped ...
paul_brook authored
99 /* Build expressions for accessing components of an array descriptor. */
919aba1 Changed the format of array descriptors to use arrays for stride/bound
paul_brook authored
100 tree g95_conv_descriptor_data (tree);
101 tree g95_conv_descriptor_base (tree);
cafe3d7 Changed rank array descriptor member to dtype.
paul_brook authored
102 tree g95_conv_descriptor_dtype (tree);
919aba1 Changed the format of array descriptors to use arrays for stride/bound
paul_brook authored
103 tree g95_conv_descriptor_stride (tree, tree);
104 tree g95_conv_descriptor_lbound (tree, tree);
105 tree g95_conv_descriptor_ubound (tree, tree);
106
38d52a1 Fix thinko which made g95 enter an infinite loop when compiling function...
paul_brook authored
107 /* Dependency checking for WHERE and FORALL. */
108 int g95_check_dependency (g95_expr *, g95_expr *, g95_expr **, int);
109 /* Dependency checking for function calls. */
110 int g95_check_fncall_dependency (g95_expr *, g95_expr *);
919aba1 Changed the format of array descriptors to use arrays for stride/bound
paul_brook authored
111
366fb67 Modifications to how pointer variables are translated (mainly in
paul_brook authored
112 /* Add pre-loop scalarization code for intrinsic functions which require
113 special handling. */
114 void g95_add_intrinsic_ss_code (g95_loopinfo *, g95_ss *);
919aba1 Changed the format of array descriptors to use arrays for stride/bound
paul_brook authored
115
Something went wrong with that request. Please try again.