Re: [PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-16 Thread Jakub Jelinek via Gcc-patches
On Fri, Dec 17, 2021 at 12:26:56AM +0530, Siddhesh Poyarekar wrote: > On 12/16/21 21:19, Jakub Jelinek wrote: > > Yes, but please fix up formatting, wholeval should go below old_wholeval. > > Though, perhaps it would be better to: > > > >if (tree_int_cst_compare (oldval, val)) > > return

Re: [PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-16 Thread Siddhesh Poyarekar
On 12/16/21 21:19, Jakub Jelinek wrote: Yes, but please fix up formatting, wholeval should go below old_wholeval. Though, perhaps it would be better to: if (tree_int_cst_compare (oldval, val)) return true; gcc_checking_assert (tree_int_cst_compare (old_wholeval, wholeval) == 0);

Re: [PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-16 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 16, 2021 at 06:11:27AM +0530, Siddhesh Poyarekar wrote: > On 12/16/21 00:13, Jakub Jelinek wrote: > > On Wed, Dec 15, 2021 at 10:42:29PM +0530, Siddhesh Poyarekar wrote: > > > On 12/15/21 20:51, Jakub Jelinek wrote: > > > > Shouldn't this also tree_int_cst_compare (old_wholeval,

Re: [PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-15 Thread Siddhesh Poyarekar
On 12/16/21 00:13, Jakub Jelinek wrote: On Wed, Dec 15, 2021 at 10:42:29PM +0530, Siddhesh Poyarekar wrote: On 12/15/21 20:51, Jakub Jelinek wrote: Shouldn't this also tree_int_cst_compare (old_wholeval, wholeval) ? AFAICT, there is no situation where wholeval changes but val doesn't, so I

Re: [PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-15 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 15, 2021 at 10:42:29PM +0530, Siddhesh Poyarekar wrote: > On 12/15/21 20:51, Jakub Jelinek wrote: > > Shouldn't this also tree_int_cst_compare (old_wholeval, wholeval) ? > > > > AFAICT, there is no situation where wholeval changes but val doesn't, so I > believe the val check should

Re: [PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-15 Thread Siddhesh Poyarekar
On 12/15/21 20:51, Jakub Jelinek wrote: Shouldn't this also tree_int_cst_compare (old_wholeval, wholeval) ? AFAICT, there is no situation where wholeval changes but val doesn't, so I believe the val check should be sufficient. Do you think otherwise? Siddhesh

Re: [PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-15 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 01, 2021 at 07:57:52PM +0530, Siddhesh Poyarekar wrote: > static inline bool > -object_sizes_set (struct object_size_info *osi, unsigned varno, > - unsigned HOST_WIDE_INT val) > +object_sizes_set (struct object_size_info *osi, unsigned varno, tree val, > +

[PATCH v4 1/6] tree-object-size: Use trees and support negative offsets

2021-12-01 Thread Siddhesh Poyarekar
Transform tree-object-size to operate on tree objects instead of host wide integers. This makes it easier to extend to dynamic expressions for object sizes. The compute_builtin_object_size interface also now returns a tree expression instead of HOST_WIDE_INT, so callers have been adjusted to