[DTrace-devel] [PATCH 03/10] Exclude %r0 from automatic register allocation
Eugene Loh
eugene.loh at oracle.com
Fri Mar 18 23:30:03 UTC 2022
On 3/18/22 7:11 PM, Kris Van Hees wrote:
> On Fri, Mar 18, 2022 at 05:06:10PM -0400, Eugene Loh via DTrace-devel wrote:
>> On 3/18/22 3:04 PM, Kris Van Hees via DTrace-devel wrote:
>>> be allocated when dt_regset_alloc() is called.
>> So this patch should also:
>> *) in dt_cg.c, remove those dozens of dt_regset_xalloc() calls along with
>> their corresponding frees
>> *) in dt_regset.h, remove dt_regset_xalloc()
>> *) in dt_regset.c, make dt_regset_xalloc() static
> No, no, and no :) We still want to be able to alloc and free %r0 explicitly.
Why?
Or e.g. why do we use BPF_REG_0 explicitly in dt_cg_ternary_op() without
xalloc'ing it?
> But perhaps I should add an explicit check to ensure that we do not alloc %r0
> when it is already in use. I will do that.
>
>>> This patch also offers a minor improvement in the regset debugging
>>> output, reporting in-use registers by number rather than with a 'x'
>>> in the register list.
>> Well, this change unnecessarily throws away active/spill info.
> Ah bah, that is true. I'll fix that (possibly by printing two lists).
Or make it wider with an annotations next to spilled regs? E.g.
*2
or something. Up to you I guess. I suspect there are not many users of
this functionality.
More information about the DTrace-devel
mailing list