Next:Reading RTL, Previous:On-the-Side SSA Form for RTL, Up:RTL Representation [Contents][Index]
The compiler assumes that certain kinds of RTL expressions are unique;there do not exist two distinct objects representing the same value.In other cases, it makes an opposite assumption: that no RTL expressionobject of a certain kind appears in more than one place in thecontaining structure.
These assumptions refer to a single function; except for the RTLobjects that describe global variables and external functions,and a few standard objects such as small integer constants,no RTL objects are common to two functions.
reg object to represent it,and therefore only a single machine mode.symbol_ref objectreferring to it.const_int expressions with equal values are shared.const_poly_int expressions with equal modes and valuesare shared.pc expression.const_double expression with value 0 foreach floating point mode. Likewise for values 1 and 2.const_vector expression with value 0 foreach vector mode, be it an integer or a double constant vector.label_ref orscratch appears in more than one place inthe RTL structure; in other words, it is safe to do a tree-walk of allthe insns in the function and assume that each time alabel_reforscratch is seen it is distinct from all others that are seen.mem object is normally created for each staticvariable or stack slot, so these objects are frequently shared in allthe places they appear. However, separate but equal objects for thesevariables are occasionally made.asm statement has multiple output operands, adistinctasm_operands expression is made for each output operand.However, these all share the vector which contains the sequence of inputoperands. This sharing is used later on to test whether twoasm_operands expressions come from the same statement, so alloptimizations must carefully preserve the sharing if they copy thevector at all.unshare_all_rtl inemit-rtl.cc,after which the above rules are guaranteed to be followed.copy_rtx_if_shared, which is a subroutine ofunshare_all_rtl.Next:Reading RTL, Previous:On-the-Side SSA Form for RTL, Up:RTL Representation [Contents][Index]