This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/68337] [MPX] memcpy() for arrays with function pointers results in huge resource usage and binaries
- From: "ienkovich at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Nov 2015 11:04:58 +0000
- Subject: [Bug c/68337] [MPX] memcpy() for arrays with function pointers results in huge resource usage and binaries
- Auto-submitted: auto-generated
- References: <bug-68337-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68337
--- Comment #1 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
The problem is that memcpy is inlined before instrumentation takes place. This
causes a lot of statements to copy bounds and thus we get a huge function and
significant compilation time.
One possible solution is to not inline memcpy. Actually I don't see why we do
it. Seems it always happen when size of copied data is known.
Another solution is to use wrapper function to copy bounds. This function is
not in libmpx yet (it is currently on review) and I don't think it will be
ported to GCC5.