This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: random thought - optimizer



On Mon, 2 Jul 2001 law@redhat.com wrote:
  The trick (of course) is proving the MEM is local and not aliased.

I think the front end should be responsible for setting an "aliased"
attribute if an object may be accessed through pointers. This attribute
can easily be set during semantic analysis, when no construct taking
the address of the object is found. Having such an attribute would 
also be great for languages like Ada, where it is known that local 
object cannot be accessed through pointers unless it is declared with 
a special "aliased" keyword.

At the level of trees passed to the back end, and especially at RTL
level, there is no information anymore about "safe" pointer operations
generated by the front end, which do not cause objects to become non-local
or aliased. 

In some cases dataflow analysis could prove potentially aliased objects 
local and unaliased after all, but such extra analysis should be done 
in addition to the initial classification done by the front end.

  -Geert


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]