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]

[PATCH][RFC] Flattening GIMPLE memory representation, introducing MEM_REF


This is an updated patch (last one was posted at
http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00262.html) that implements
flattened (lowered) memory access trees, also known as MEM_REF.  See
those previous mails and the wiki page at http://gcc.gnu.org/wiki/MemRef
for an overview on the proposed scheme.

This snapshot is able to bootstrap (yay!) with -O1 and -O2 
-fno-strict-aliasing, -O2 doesn't yet work (boo!).  Also SRA, PRE and
IVOPTs are completely disabled at the moment.  The C testsuite (I didn't
yet build more than C, though the C++ and Fortran runtime builds fine)
is mostly clean apart from missed optimizations.  See also the TODO
section on the wiki page on what is currently missing -- the next
task to tackle is proper RTL expansion for MEM_REF (that means setting
the mem attributes properly) and setting MEM_REF_ALIGN to something
better than unconditionally 1.

For the ease of transition (and for experimenting with moving the
lowering to different places) I introduced PROP_gimple_lmem and
have not removed any code yet but only added new one guarded by
PROP_gimple_lmem.  The lowering is currently carried out just before
building the CFG.  Verification is in place, so if you are in lowered
form, producing non-lowered trees will get you an ICE during verify_stmts.

Compressed patch attached (otherwise it blows the list limit);  after
pushing some parts to trunk I will probably open a branch with this
work.

Experiments with data-flow / loop optimizations should be possible
in this state.

Richard.

Attachment: mem-ref.gz
Description: GNU Zip compressed data


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