Remove a few more warnings.
[suif.git] / html / suif1_76.html
blob4edf8aac3e4135d22b1b2dc9deb9e19c6dc84de8
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.54
4 from suif1.texi on 28 April 1999 -->
6 <TITLE>The SUIF Version 1 Library - Call-By-Ref Annotes</TITLE>
7 <link href="suif1_77.html" rel=Next>
8 <link href="suif1_75.html" rel=Previous>
9 <link href="suif1_toc.html" rel=ToC>
11 </HEAD>
12 <BODY>
13 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_75.html">previous</A>, <A HREF="suif1_77.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
14 <P><HR><P>
17 <H3><A NAME="SEC76" HREF="suif1_toc.html#TOC76">Call-By-Reference Annotations</A></H3>
18 <P>
19 <A NAME="IDX566"></A>
20 <A NAME="IDX567"></A>
22 </P>
23 <P>
24 Fortran and other languages pass procedure parameters by reference but
25 SUIF uses call-by-value. To implement call-by-reference parameters,
26 SUIF passes pointers to the actual parameters and then dereferences
27 those pointers when the formal parameters are used. While this is
28 perfectly adequate for many compiler passes, the pointer dereferences
29 are difficult to handle in some high-level Fortran passes. The SUIF
30 Fortran mode automatically converts the code to make it appear that the
31 parameters are passed by reference. The library uses two predefined
32 annotations to implement this.
34 </P>
35 <DL COMPACT>
37 <DT><CODE>k_call_by_ref</CODE>
38 <DD>
39 <A NAME="IDX568"></A>
40 The Fortran front-end puts this annotation on pointer types that are
41 used to implement call-by-reference parameter passing. The library uses
42 this to detect parameters that should be modified when converting to
43 Fortran mode. This annotation has no data on its <CODE>immed</CODE> list.
45 <DT><CODE>k_orig_type</CODE>
46 <DD>
47 <A NAME="IDX569"></A>
48 While in Fortran mode, the types of the call-by-reference parameters are
49 temporarily replaced. The <CODE>orig_type</CODE> annotations are attached
50 to the parameter variables to record their original types. The
51 <CODE>immed</CODE> list contains a single entry, the original pointer type of
52 the parameter. These annotations are never written to the output files.
53 </DL>
55 <P><HR><P>
56 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_75.html">previous</A>, <A HREF="suif1_77.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
57 </BODY>
58 </HTML>