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: [Committed] PR26557: Handle const_int in emit_case_nodes



On Mar 13, 2006, at 6:37 PM, Roger Sayle wrote:


The second of the two fixes mentioned above follows the "why fix it
once" idiom, by teaching fold-const.c/fold_stmt that dereferencing
constant initialized arrays with a constant index returns a constant
result.  This should allow the constant index in the test case below
to be seen by the tree-ssa optimizers.  Unfortunately, this second
change is significantly more intrusive, and probably not appropriate
for the 4.0 and 4.1 release branches.

Store CCP already does this optimization which is why at -O2 the ICE does not show up. Now one could argue that Store CCP should also be turned on at -O1 (which I think is a good thing).

-- Pinski


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