RFR: 8345287: C2: live in computation is broken
Roland Westrelin
roland at openjdk.org
Mon Dec 2 09:08:55 UTC 2024
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.
-------------
Commit messages:
- fix
Changes: https://git.openjdk.org/jdk/pull/22473/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22473&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8345287
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/22473.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22473/head:pull/22473
PR: https://git.openjdk.org/jdk/pull/22473
More information about the hotspot-compiler-dev
mailing list