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]

Major alias pessimization


>From store_field:

      /* If the address of the structure varies, then it might be on
	 the stack.  And, stack slots may be shared across scopes.
	 So, two different structures, of different types, can end up
	 at the same location.  We will give the structures alias set
	 zero; here we must be careful not to give non-zero alias sets
	 to their fields.  */
      set_mem_alias_set (to_rtx,
			 rtx_varies_p (addr, /*for_alias=*/0)
			 ? 0 : alias_set);

This is a *very* major pessimization since it essentially means that for
all stores into aggregates, we use set 0, which means it will conflict
with anything, which essentially disables most alias set handling.

We are supposed to make sure that we never share stack slots of objects
which don't always conflict, so this should not be necessary.

There must be a better way to fix this.

What is the test case here?


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