[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-compiler-dev
Subject:    Integrated: 8326135: Enhance adlc to report unused operands
From:       kuaiwei <duke () openjdk ! org>
Date:       2024-02-28 8:47:49
Message-ID: 91n3eQWvcXHlpeR6pfrUSgz7HV7Byytrr5d2R_rbdMQ=.ff825358-b5b3-4875-8bc1-1fcd6c1970a0 () github ! com
[Download RAW message or body]

On Mon, 19 Feb 2024 08:48:46 GMT, kuaiwei <duke@openjdk.org> wrote:

> Some operands are defined in adfile but no one used them. But it's hard to find \
> them manually. So I try to enhance adlc to report them after parsing the whole \
> adfile. 
> I added a helper Form::forms_do to recursively visit child forms. After parsing, \
> adlc will start from all instructions to mark all used forms. And report unvisited \
> operands as unused. By this way, I can find 44 unused operands for aarch64, 12 for \
> x86_64 and 4 for riscv64. The report is like 
> ...
> Warning: unused operand (vRegD_V28)
> Warning: unused operand (vRegD_V29)
> Warning: unused operand (vRegD_V30)
> Warning: unused operand (vRegD_V31)
> Warning: unused operand (lr_RegP)
> Warning: unused operand (indOffI)
> Warning: unused operand (indOffL)
> Warning: unused operand (thread_anchor_pc)
> -------Warning: total 44 unused operands
> 
> 
> I tested and find they can be safely removed.

This pull request has now been integrated.

Changeset: 1ab6bd43
Author:    Kuai Wei <kuaiwei.kw@alibaba-inc.com>
Committer: Julian Waters <jwaters@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1ab6bd434f560e0cc34a85079949e3839c59568f
                
Stats:     305 lines in 9 files changed: 297 ins; 0 del; 8 mod

8326135: Enhance adlc to report unused operands

Reviewed-by: kvn, vlivanov

-------------

PR: https://git.openjdk.org/jdk/pull/17910


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic