Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-23 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 23, 2021 at 09:30:30PM +0530, Siddhesh Poyarekar wrote: > On 11/23/21 21:22, Jakub Jelinek wrote: > > Evaluating __bdos in both passes is undesirable, certainly for the same > > SSA_NAME, but even for different SSA_NAMEs, if everything is done in a > > single pass it can easily share te

Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-23 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 23, 2021 at 09:08:35PM +0530, Siddhesh Poyarekar wrote: > On 11/23/21 21:06, Siddhesh Poyarekar wrote: > > On 11/23/21 20:42, Jakub Jelinek wrote: > > > On Wed, Nov 10, 2021 at 12:31:32AM +0530, Siddhesh Poyarekar wrote: > > > > (object_sizes_execute): Don't insert min/max for dynam

Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-23 Thread Siddhesh Poyarekar
On 11/23/21 21:22, Jakub Jelinek wrote: Evaluating __bdos in both passes is undesirable, certainly for the same SSA_NAME, but even for different SSA_NAMEs, if everything is done in a single pass it can easily share temporaries (object sizes for SSA_NAMEs it uses), while if some __bdos is evaluate

Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-23 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 23, 2021 at 09:06:49PM +0530, Siddhesh Poyarekar wrote: > On 11/23/21 20:42, Jakub Jelinek wrote: > > On Wed, Nov 10, 2021 at 12:31:32AM +0530, Siddhesh Poyarekar wrote: > > > (object_sizes_execute): Don't insert min/max for dynamic sizes. > > > > I'm worried about this. > > I'd say

Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-23 Thread Siddhesh Poyarekar
On 11/23/21 21:06, Siddhesh Poyarekar wrote: On 11/23/21 20:42, Jakub Jelinek wrote: On Wed, Nov 10, 2021 at 12:31:32AM +0530, Siddhesh Poyarekar wrote: (object_sizes_execute): Don't insert min/max for dynamic sizes. I'm worried about this. I'd say what we might want to do is in the early

Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-23 Thread Siddhesh Poyarekar
On 11/23/21 20:42, Jakub Jelinek wrote: On Wed, Nov 10, 2021 at 12:31:32AM +0530, Siddhesh Poyarekar wrote: (object_sizes_execute): Don't insert min/max for dynamic sizes. I'm worried about this. I'd say what we might want to do is in the early pass for __bdos compute actually __bos (i

Re: [PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-23 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:31:32AM +0530, Siddhesh Poyarekar wrote: > (object_sizes_execute): Don't insert min/max for dynamic sizes. I'm worried about this. I'd say what we might want to do is in the early pass for __bdos compute actually __bos (i.e. the static one) and add MIN_EXPR/MAX_EXP

[PATCH 06/10] tree-object-size: Support dynamic sizes in conditions

2021-11-09 Thread Siddhesh Poyarekar
Handle GIMPLE_PHI and conditionals specially for dynamic objects, returning PHI/conditional expressions instead of just a MIN/MAX estimate. This makes the returned object size variable for loops and conditionals, so tests need to be adjusted to look for precise size in some cases. builtin-dynamic-