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 44891 - required type conversion in load elimination in SRA


On Thu, Jul 22, 2010 at 3:44 AM, Martin Jambor <mjambor@suse.cz> wrote:
> Hi,
>
> with MEM_REF, the code in SRA that performs removal of loads from
> pieces of aggregates that are known to be uninitialized can produce
> statements with incompatible types when it creates a
> default-definition replacement SSA_NAME for register loads.
>
> In order to try to keep the code complexity at least a bit sane, I
> removed propagation of the LHS SSA_NAME with the replacement (fwprop
> should do that just fine) and I no longer actually remove the
> statement but rather simply adjust the RHS, potentially also
> generating type conversion.
>
> I have also added a simple message dump (and specifically want it to
> be also in the non-detailed dumps) that tells a load is being removed
> so that we can quickly see that this code path triggered when
> analyzing SRA output.
>
> I have bootstrapped and regression tested this patch on x86_64-linux
> without any problems, OK for trunk?
>
> Thanks,
>
> Martin
>
>
>
> 2010-07-21 ?Martin Jambor ?<mjambor@suse.cz>
>
> ? ? ? ?PR tree-optimization/44891
> ? ? ? ?* tree-sra.c: Include gimple-pretty-print.h.
> ? ? ? ?(replace_uses_with_default_def_ssa_name): Renamed to
> ? ? ? ?get_repl_default_def_ssa_name, return the new SSA name instead of
> ? ? ? ?replacing the old one.
> ? ? ? ?(sra_modify_assign): Dump a message when removing a load, if the LHS
> ? ? ? ?is an SSA_NAME, do not do any propagation, just set the RHS to a
> ? ? ? ?default definition SSA NAME, type convert if necessary.
> ? ? ? ?* Makefile.in (tree-sra.o): Add gimple-pretty-print.h to dependencies.
>
> ? ? ? ?* testsuite/gcc.c-torture/compile/pr44891.c: New test.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45415


-- 
H.J.


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