This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mudflap extention request
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Herman ten Brugge <hermantenbrugge at home dot nl>
- Cc: gcc at gcc dot gnu dot org
- Date: 23 Jan 2006 17:05:55 -0500
- Subject: Re: mudflap extention request
- References: <43D53F0F.8020703@home.nl>
Herman ten Brugge <hermantenbrugge@home.nl> writes:
> [...] Finally the question. Is it possible to add this extension to
> mudflap so the above problem is found here as well.
It is likely possible.
The first one (array embedded in struct, indexed by run-time
expression) is tricky. There is IIRC no code that specially handles
comparing run-time array indexes with statically-declared bounds.
This would require emitting a new comparison block, likely in addition
to the current pointer-bounds based one. It may be straightforward,
but it would be new code.
With many tree-ssa optimizations and some subtle tree flag changes
since the original work, some tree-mudflap.c checks have to be
re-tuned to avoid eliding checks (and object registrations) where
still actually necessary. The second of your two cases you point out
sounds like one that could be detected by just such a tweak.
Similarly, mudflap could exploit some of the clever ssa analysis such
as VRP or alias stuff, which should allow us to elide some checks that
the compiler can prove as unnecessary.
All these just require an interested programmer with some spare time.
(I wish I had enough of the latter.)
- FChE