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: fix 23714


David Edelsohn wrote:
> 	The patch caused a 5% performance degradation of SPECint
> 186.crafty on PowerPC and similar drops on x86.  It also caused compile
> time to increase 1.5%, according to Steven Bosscher.  This looks like an
> unreasonably high price to pay to avoid an ICE on a technically invalid
> testcase.

I think avoiding the ICE is important.  But, I think it's a false
dichotomy; we should haven't to choose between performance and
robustness in this case.

Unfortunately, I haven't looked in detail at the cause of the ICE, so
what follow may be silly.

Richard's fix, if I'm reading correctly, makes every array variable
addressable, which obviously works, but penalizes small arrays.  (Maybe
only arrays of size 1?  Do we put 8-element byte arrays into DImode
registers?)  For the test case in the PR, we could notice that "*(stack
- 1)" refers to a location outside the array, and change it into
"*stack"; since the code is undefined if executed, that's a valid
transformation.  I would assume that if it were "*(stack - n)" (for some
unknown "n"), then "stack" would be marked addressable anyhow, right?

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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