> On Tue, 1 Dec 2015, Jan Hubicka wrote: > > > Hi, > > memory attributes are currently optimized and attached to RTL even when not > > optimizing. This is obviously just a wasted effort. > > Huh, are you sure? What about globals used from different optimize > contexts?
Hmm, you are right - we will get worse code quality. The code won't ICE because MEM_ATTRS can legally be NULL - get_mem_attrs will then supply default one for given mode, but we will miss code quality. I will look into disabling mem attrs for non-globals only. It would be nice to get rid of those global persistent RTLs (and make DECL_RTL to be function local hash) Honza