RFR: 8265103: Remove unnecessary inclusion of oopMap.hpp

Stefan Karlsson stefank at openjdk.java.net
Tue Apr 13 07:06:00 UTC 2021


On Tue, 13 Apr 2021 01:55:13 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> oopMap.hpp is included by about 585 out of about 1000 .o files in HotSpot. In turn, it pulls in other complex headers such as vmreg.hpp, register.hpp and their cpu-dependent headers.
> 
> There are only 4 header files that include oopMap.hpp. All of these can be replaced for forward declarations.
> 
> According to https://github.com/iklam/tools/tree/main/headers
> 
> 
> [before]

Marked as reviewed by stefank (Reviewer).

src/hotspot/share/c1/c1_LinearScan.hpp line 34:

> 32: #include "c1/c1_LIR.hpp"
> 33: #include "c1/c1_LIRGenerator.hpp"
> 34: #include "compiler/oopMap.hpp"

The description states:
> There are only 4 header files that include oopMap.hpp. All of these can be replaced for forward declarations.

But this had to be added. Did you check how many files include c1_LinearScan.hpp?

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

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


More information about the shenandoah-dev mailing list