Re: [PATCH] Optimize store_expr from STRING_CST [PR95052]

2020-05-15 Thread Jeff Law via Gcc-patches
On Thu, 2020-05-14 at 18:51 +0200, Jakub Jelinek wrote: > On Thu, May 14, 2020 at 10:10:55AM -0600, Jeff Law wrote: > > On Tue, 2020-05-12 at 10:12 +0200, Jakub Jelinek wrote: > > > Hi! > > > > > > In the following testcase, store_expr of e.g. 97 bytes long string literal > > > into 1MB long array

Re: [PATCH] Optimize store_expr from STRING_CST [PR95052]

2020-05-14 Thread Jakub Jelinek via Gcc-patches
On Thu, May 14, 2020 at 10:10:55AM -0600, Jeff Law wrote: > On Tue, 2020-05-12 at 10:12 +0200, Jakub Jelinek wrote: > > Hi! > > > > In the following testcase, store_expr of e.g. 97 bytes long string literal > > into 1MB long array is implemented by copying the 97 bytes from .rodata > > section, fo

Re: [PATCH] Optimize store_expr from STRING_CST [PR95052]

2020-05-14 Thread Jeff Law via Gcc-patches
On Tue, 2020-05-12 at 10:12 +0200, Jakub Jelinek wrote: > Hi! > > In the following testcase, store_expr of e.g. 97 bytes long string literal > into 1MB long array is implemented by copying the 97 bytes from .rodata > section, followed by clearing the remaining bytes. But, as the STRING_CST > has

[PATCH] Optimize store_expr from STRING_CST [PR95052]

2020-05-12 Thread Jakub Jelinek via Gcc-patches
Hi! In the following testcase, store_expr of e.g. 97 bytes long string literal into 1MB long array is implemented by copying the 97 bytes from .rodata section, followed by clearing the remaining bytes. But, as the STRING_CST has type char[1024*1024], we actually allocate whole 1MB in .rodata sect