RFR: 8255665: C2 should aggressively remove temporary hook nodes [v3]

Tobias Hartmann thartmann at openjdk.java.net
Wed Nov 4 07:08:06 UTC 2020


> C2 often creates temporary "hook" nodes to keep other nodes alive. Although dead, these are sometimes not removed because they don't end up on the IGVN worklist. JDK-8040213 added detection of modified nodes that are not re-processed by IGVN but currently ignores dead nodes.
> 
> This patch includes the following changes:
> - Adjust detection of modified nodes such that dead nodes are includes as well. This revealed several locations were dead nodes are not eagerly destructed (or not even added to the worklist for later removal). I've fixed all of these.
> - No need to yank node inputs before calling `destruct`.
> - `kill_dead_code` accidentally re-adds dead nodes to the `_modified_nodes` list. `Compile::remove_modified_node` should be called at the end to avoid this.
> - Some removal of dead code.
> 
> Tested with tier1-3, higher tiers are running.
> 
> JDK-8255670 will further improve detection.
> 
> Thanks,
> Tobias

Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:

  Pass PhaseValues to Node::destruct

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/994/files
  - new: https://git.openjdk.java.net/jdk/pull/994/files/e8899406..21a73e6d

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=994&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=994&range=01-02

  Stats: 41 lines in 12 files changed: 3 ins; 20 del; 18 mod
  Patch: https://git.openjdk.java.net/jdk/pull/994.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/994/head:pull/994

PR: https://git.openjdk.java.net/jdk/pull/994


More information about the shenandoah-dev mailing list