On 10/6/20 11:58 AM, Andrew MacLeod wrote:
On 10/6/20 1:48 PM, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 01:41:54PM -0400, Andrew MacLeod wrote:
On 10/6/20 1:32 PM, Jakub Jelinek via Gcc-patches wrote:
On Tue, Oct 06, 2020 at 10:42:12AM -0600, Martin Sebor wrote:
The manual documents the [
On 10/6/20 2:41 PM, Andreas Schwab wrote:
On Okt 06 2020, Andrew MacLeod via Gcc-patches wrote:
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 7031a823138..02a952bf81f 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -668,13 +668,12 @@ irange_allocator::allocate (unsigned num
On Okt 06 2020, Andrew MacLeod via Gcc-patches wrote:
> diff --git a/gcc/value-range.h b/gcc/value-range.h
> index 7031a823138..02a952bf81f 100644
> --- a/gcc/value-range.h
> +++ b/gcc/value-range.h
> @@ -668,13 +668,12 @@ irange_allocator::allocate (unsigned num_pairs)
>if (num_pairs < 2)
>
On 10/6/20 2:18 PM, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 02:09:42PM -0400, Andrew MacLeod wrote:
+ size_t nbytes = sizeof (tree) * 2 * num_pairs;
+
+ // Allocate the irnge and required memory for the vector
+ void *r = (irange *) obstack_alloc (&m_obstack, sizeof (irange));
Then eit
The following cast looks odd:
On 10/6/20 8:09 PM, Andrew MacLeod via Gcc-patches wrote:
+ // Allocate the irnge and required memory for the vector
+ void *r = (irange *) obstack_alloc (&m_obstack, sizeof (irange));
Tobias
-
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 20
On Tue, Oct 06, 2020 at 02:09:42PM -0400, Andrew MacLeod wrote:
> + size_t nbytes = sizeof (tree) * 2 * num_pairs;
> +
> + // Allocate the irnge and required memory for the vector
> + void *r = (irange *) obstack_alloc (&m_obstack, sizeof (irange));
Then either
void *r = (void *) obstack_all
On 10/6/20 1:58 PM, Andrew MacLeod via Gcc-patches wrote:
On 10/6/20 1:48 PM, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 01:41:54PM -0400, Andrew MacLeod wrote:
On 10/6/20 1:32 PM, Jakub Jelinek via Gcc-patches wrote:
On Tue, Oct 06, 2020 at 10:42:12AM -0600, Martin Sebor wrote:
The manual
On 10/6/20 1:48 PM, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 01:41:54PM -0400, Andrew MacLeod wrote:
On 10/6/20 1:32 PM, Jakub Jelinek via Gcc-patches wrote:
On Tue, Oct 06, 2020 at 10:42:12AM -0600, Martin Sebor wrote:
The manual documents the [0] extension and mentions but discourages
us
On Tue, Oct 06, 2020 at 01:41:54PM -0400, Andrew MacLeod wrote:
> On 10/6/20 1:32 PM, Jakub Jelinek via Gcc-patches wrote:
> > On Tue, Oct 06, 2020 at 10:42:12AM -0600, Martin Sebor wrote:
> > > The manual documents the [0] extension and mentions but discourages
> > > using [1]. Nothing is said ab
On 10/6/20 1:32 PM, Jakub Jelinek via Gcc-patches wrote:
On Tue, Oct 06, 2020 at 10:42:12AM -0600, Martin Sebor wrote:
The manual documents the [0] extension and mentions but discourages
using [1]. Nothing is said about other sizes and the warnings such
as -Warray-bounds have been increasingly
On Tue, Oct 06, 2020 at 10:42:12AM -0600, Martin Sebor wrote:
> The manual documents the [0] extension and mentions but discourages
> using [1]. Nothing is said about other sizes and the warnings such
> as -Warray-bounds have been increasingly complaining about accesses
> past the declared constan
On 10/6/20 1:52 AM, Jakub Jelinek via Gcc-patches wrote:
On Tue, Oct 06, 2020 at 09:37:21AM +0200, Aldy Hernandez via Gcc-patches wrote:
Pushed as obvious.
gcc/ChangeLog:
* value-range.h (irange_allocator::allocate): Increase
newir storage by one.
---
gcc/value-range.h | 2 +-
On 10/6/20 8:55 AM, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 08:47:53AM -0400, Andrew MacLeod wrote:
I think the proper alignment will be guaranteed if irange and tree[] are
obstack_alloc'd separately. They don't need to be adjacent, do they?
They do not, it just seemed wasteful to do 2
On Tue, Oct 06, 2020 at 08:47:53AM -0400, Andrew MacLeod wrote:
> > I think the proper alignment will be guaranteed if irange and tree[] are
> > obstack_alloc'd separately. They don't need to be adjacent, do they?
> >
> >
> They do not, it just seemed wasteful to do 2 allocs each time, and it'd
On 10/6/20 6:22 AM, Jakub Jelinek via Gcc-patches wrote:
On Tue, Oct 06, 2020 at 11:20:52AM +0200, Aldy Hernandez wrote:
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 94b48e55e77..7031a823138 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -670,7 +670,7 @@ irange_allocator::
On 10/6/20 6:40 AM, Andreas Schwab wrote:
On Okt 06 2020, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 10:47:34AM +0200, Andreas Schwab wrote:
On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote:
I mean, we could just use:
size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs;
On Okt 06 2020, Jakub Jelinek wrote:
> On Tue, Oct 06, 2020 at 10:47:34AM +0200, Andreas Schwab wrote:
>> On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote:
>>
>> > I mean, we could just use:
>> > size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs;
>> > irange *r = (irange *) o
On Tue, Oct 06, 2020 at 11:20:52AM +0200, Aldy Hernandez wrote:
> > > diff --git a/gcc/value-range.h b/gcc/value-range.h
> > > index 94b48e55e77..7031a823138 100644
> > > --- a/gcc/value-range.h
> > > +++ b/gcc/value-range.h
> > > @@ -670,7 +670,7 @@ irange_allocator::allocate (unsigned num_pairs)
On 10/6/20 9:52 AM, Jakub Jelinek wrote:
On Tue, Oct 06, 2020 at 09:37:21AM +0200, Aldy Hernandez via Gcc-patches wrote:
Pushed as obvious.
gcc/ChangeLog:
* value-range.h (irange_allocator::allocate): Increase
newir storage by one.
---
gcc/value-range.h | 2 +-
1 file cha
On Tue, Oct 06, 2020 at 10:47:34AM +0200, Andreas Schwab wrote:
> On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote:
>
> > I mean, we could just use:
> > size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs;
> > irange *r = (irange *) obstack_alloc (&m_obstack, nbytes);
> > retu
On Okt 06 2020, Jakub Jelinek via Gcc-patches wrote:
> I mean, we could just use:
> size_t nbytes = sizeof (irange) + sizeof (tree) * 2 * num_pairs;
> irange *r = (irange *) obstack_alloc (&m_obstack, nbytes);
> return new (r) irange ((tree *) (r + 1), num_pairs);
> without any new type.
Mo
On Tue, Oct 06, 2020 at 09:37:21AM +0200, Aldy Hernandez via Gcc-patches wrote:
> Pushed as obvious.
>
> gcc/ChangeLog:
>
> * value-range.h (irange_allocator::allocate): Increase
> newir storage by one.
> ---
> gcc/value-range.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Pushed as obvious.
gcc/ChangeLog:
* value-range.h (irange_allocator::allocate): Increase
newir storage by one.
---
gcc/value-range.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 94b48e55e77..7031a823138 100644
--
23 matches
Mail list logo