RFR: 8253002: Remove the unused SafePointNode::_oop_map field

Aleksey Shipilev shade at openjdk.java.net
Mon Sep 14 13:22:16 UTC 2020


On Thu, 10 Sep 2020 10:17:42 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Hi,
> 
> I've been looking a lot at the code for generating oop maps for call nodes lately, and noticed that SafePointNode had
> an oopMap field that was unused (which led to some confusion as to where the oop map was actually set).
> The oop map is instead generated and set in buildOopMap OopFlow::compute_reach after matching:
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/buildOopMap.cpp#L122 So the field on the ideal node
> is unused.  This patch removes the field and cleans up related code. I've left a comment in SafePointNode to point
> people looking for the oop map at buildOopMap.cpp
> Thanks,
> Jorn
> 
> Testing: local build + tier1,tier2,tier3

There is also a forward declaration of `class OopMap;` in `callnode.hpp`, do we still need it?

src/hotspot/share/opto/callnode.hpp line 339:

> 337:
> 338:   // There is no OopMap field, the oop map is set after matching in
> 339:   // OopFlow::compute_reach on the MachSafePointNode. (See buildOopMap.cpp)

I don't think we need this comment. I think it would bitrot eventually. It seems the code to construct `OopMap` is
easily discoverable already.

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

Changes requested by shade (Reviewer).

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


More information about the hotspot-compiler-dev mailing list