Integrated: 8345287: C2: live in computation is broken
Roland Westrelin
roland at openjdk.org
Mon Dec 9 16:45:46 UTC 2024
On Mon, 2 Dec 2024 09:03:50 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> 8234003 (Improve IndexSet iteration) broke live in computation:
>
>
> @@ -273,23 +276,25 @@ void PhaseLive::add_liveout( Block *p, IndexSet *lo, VectorSet &first_pass ) {
> // Add a vector of live-in values to a given blocks live-in set.
> void PhaseLive::add_livein(Block *p, IndexSet *lo) {
> IndexSet *livein = &_livein[p->_pre_order-1];
> - IndexSetIterator elements(lo);
> - uint r;
> - while ((r = elements.next()) != 0) {
> - livein->insert(r); // Then add to live-in set
> + if (!livein->is_empty()) {
> + IndexSetIterator elements(lo);
> + uint r;
> + while ((r = elements.next()) != 0) {
> + livein->insert(r); // Then add to live-in set
> + }
> }
> }
>
>
> `livein` is initially empy and the patch above only adds element to it if:
>
>
> if (!livein->is_empty()) {
>
>
> which is never true.
>
> This doesn't affect correctness as live in sets are only used to drive
> scheduling.
This pull request has now been integrated.
Changeset: cc628a13
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/cc628a133e471e7edf07831ff386f0eaf57e9bff
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
8345287: C2: live in computation is broken
Reviewed-by: kvn, dlong, rcastanedalo
-------------
PR: https://git.openjdk.org/jdk/pull/22473
More information about the hotspot-compiler-dev
mailing list