snoot: immed_and_type_for_C_intconst: properly parse "0"
[suif.git] / html / suif1_86.html
blob22ef1914ec0155ab66c9d892002f8278159ec0f2
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 - Finding Exposed References</TITLE>
7 <link href="suif1_87.html" rel=Next>
8 <link href="suif1_85.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_85.html">previous</A>, <A HREF="suif1_87.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 <H2><A NAME="SEC86" HREF="suif1_toc.html#TOC86">Finding Exposed References</A></H2>
19 <P>
20 <A NAME="IDX634"></A>
21 <A NAME="IDX635"></A>
22 <A NAME="IDX636"></A>
23 <A NAME="IDX637"></A>
24 <A NAME="IDX638"></A>
25 The first step in the cloning process is to scan through the code being
26 copied to search for references to objects that are not visible in the
27 destination scope. The <CODE>tree_node_list</CODE>, <CODE>tree_node</CODE>,
28 <CODE>operand</CODE>, <CODE>instruction</CODE>, and <CODE>block_symtab</CODE> classes have
29 <CODE>find_exposed_refs</CODE> methods to perform this operation. The results
30 are returned in a <CODE>replacements</CODE> structure by putting the exposed
31 references in the lists of original objects. The lists of new objects
32 are left empty.
34 </P>
35 <P>
36 <A NAME="IDX639"></A>
37 Besides checking for exposed references in the objects themselves, the
38 <CODE>find_exposed_refs</CODE> methods also check for references contained in
39 annotations attached to the objects. Both flat and structured
40 annotations are checked, but unregistered annotations are ignored since
41 they are not copied. The <CODE>find_annote_refs</CODE> method is used to
42 check a <CODE>suif_object</CODE> for exposed references.
44 </P>
45 <P>
46 Label symbols are a special case. Even if a label symbol is visible in
47 the destination scope, it must be replaced if the label instruction is
48 to be cloned. Otherwise, there would be two label instructions sharing
49 the same label symbol! Thus, the <CODE>find_exposed_refs</CODE> method adds
50 the symbol in a label instruction to the list of exposed references.
51 The exception to this is that label symbols that are defined within
52 cloned symbol tables will automatically be replaced and are not included
53 in the exposed references.
55 </P>
57 <P><HR><P>
58 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_85.html">previous</A>, <A HREF="suif1_87.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
59 </BODY>
60 </HTML>