This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug


Hi,

On Fri, 8 Dec 2006, Peter Bergner wrote:

> Ok, I stripped the test case down a little, so the insn number has 
> changed from 176 to 139 and the pseudo has changed from 235 to 238.  I 
> have also made the test case and the rtl dumps available at: 
> http://www.bergner.org/gcc/reload/
> 
> The insn after local-alloc looks like:
> 
>   (insn:HI 139 120 244 3 (set (reg/f:SI 238)
>           (plus:SI (reg/f:SI 113 sfp)
>               (const_int 12 [0xc]))) 79 {*addsi3_internal1} (nil)
>       (expr_list:REG_EQUIV (plus:SI (reg/f:SI 113 sfp)
>               (const_int 12 [0xc]))
>           (nil)))
> 
> Yes, it seems strange that pseudo 238 should be allocated to the link reg.
> >From the global-alloc dump (from what little it there before we died), we
> have this info for pseudo 238:
> 
> ;; 238 conflicts: 153 154 155 156 157 158 159 160 162 163 164 165 166
> 		  170 171 172 173 174 175 176 177 178 180 182 184 185
> 		  186 187 188 190 191 192 194 196 197 199 207 208 209
> 		  210 211 212 213 214 216 218 220 222 223 229 230 231
> 		  233 235 237 238 239 240 241 242 243 244 0 1 9 10 11
> 		  75
> 
> I'll continue to look at why global-alloc allocated 238 to hard reg 65.

The constraints in that instruction seem to not forbid reg 65.  Hence 
global (in fact regclass.c) has no reason to believe that it can not be 
used for that operand (the register allocator is driven only by the 
constraints as far as register classes are concerned).  The predicate must 
not reject registers which the constraints accept.  If for some reason you 
need to reject some hardregs already in the predicate then you need to 
create a new register class which also excludes that register and use that 
in the constraints.


Ciao,
Michael.


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