[PATCH] tree-optimization/108522 Use component_ref_field_offset

2023-01-25 Thread Siddhesh Poyarekar
Instead of using TREE_OPERAND (expr, 2) directly, use component_ref_field_offset instead, which does scaling for us. The function also substitutes PLACEHOLDER_EXPRs, which is probably what we want anyway but I'm not sure if it's relevant for tree-object-size. gcc/ChangeLog: PR tree-optim

Re: [PATCH] tree-optimization/108522 Use component_ref_field_offset

2023-01-25 Thread Richard Biener via Gcc-patches
On Thu, Jan 26, 2023 at 4:32 AM Siddhesh Poyarekar wrote: > > Instead of using TREE_OPERAND (expr, 2) directly, use > component_ref_field_offset instead, which does scaling for us. The > function also substitutes PLACEHOLDER_EXPRs, which is probably what we > want anyway but I'm not sure if it's

Re: [PATCH] tree-optimization/108522 Use component_ref_field_offset

2023-01-27 Thread Eric Botcazou via Gcc-patches
> OK. PLACEHOLDER_EXPR are only relevant pre simplification. I presume you mean "pre gimplification" here? -- Eric Botcazou

Re: [PATCH] tree-optimization/108522 Use component_ref_field_offset

2023-01-27 Thread Richard Biener via Gcc-patches
On Fri, Jan 27, 2023 at 12:05 PM Eric Botcazou wrote: > > > OK. PLACEHOLDER_EXPR are only relevant pre simplification. > > I presume you mean "pre gimplification" here? Eh, yes. Spell-checkers ... > -- > Eric Botcazou > > >

Re: [PATCH] tree-optimization/108522 Use component_ref_field_offset

2023-02-07 Thread Siddhesh Poyarekar
On 2023-01-25 22:32, Siddhesh Poyarekar wrote: Instead of using TREE_OPERAND (expr, 2) directly, use component_ref_field_offset instead, which does scaling for us. The function also substitutes PLACEHOLDER_EXPRs, which is probably what we want anyway but I'm not sure if it's relevant for tree