8345801: C2: Clean up include statements to speed up compilation when touching type.hpp

Reviewed-by: kvn, dlong, jwaters
This commit is contained in:
Christian Hagedorn 2024-12-16 09:53:38 +00:00
parent 92860186ec
commit 32c8195c3a
31 changed files with 17 additions and 71 deletions

View File

@ -25,7 +25,6 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "c2_intelJccErratum_x86.hpp"
#include "opto/cfgnode.hpp"
#include "opto/compile.hpp"
#include "opto/machnode.hpp"
#include "opto/node.hpp"

View File

@ -30,8 +30,6 @@
#include "code/exceptionHandlerTable.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
#include "compiler/compilerDirectives.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/deoptimization.hpp"
class CompilationFailureInfo;

View File

@ -25,13 +25,11 @@
#ifndef SHARE_C1_C1_FRAMEMAP_HPP
#define SHARE_C1_C1_FRAMEMAP_HPP
#include "asm/macroAssembler.hpp"
#include "c1/c1_Defs.hpp"
#include "c1/c1_LIR.hpp"
#include "code/vmreg.hpp"
#include "memory/allocation.hpp"
#include "runtime/frame.hpp"
#include "runtime/synchronizer.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"

View File

@ -41,12 +41,8 @@
#include "interpreter/bytecode.hpp"
#include "jfr/jfrEvents.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/vm_version.hpp"
#include "utilities/bitMap.inline.hpp"
#include "utilities/checkedCast.hpp"
#include "utilities/powerOfTwo.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_JFR
#include "jfr/jfr.hpp"

View File

@ -27,8 +27,6 @@
#include "c1/c1_Instruction.hpp"
#include "ci/ciExceptionHandler.hpp"
#include "ci/ciMethod.hpp"
#include "ci/ciStreams.hpp"
#include "memory/allocation.hpp"
// An XHandler is a C1 internal description for an exception handler

View File

@ -30,7 +30,6 @@
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_ValueStack.hpp"
#include "ci/ciInstance.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
#include "compiler/oopMap.hpp"
#include "runtime/os.hpp"

View File

@ -28,9 +28,7 @@
#include "c1/c1_Decorators.hpp"
#include "c1/c1_Instruction.hpp"
#include "c1/c1_LIR.hpp"
#include "ci/ciMethodData.hpp"
#include "gc/shared/barrierSet.hpp"
#include "jfr/support/jfrIntrinsics.hpp"
#include "utilities/macros.hpp"
#include "utilities/sizes.hpp"

View File

@ -23,9 +23,7 @@
*/
#include "precompiled.hpp"
#include "c1/c1_Canonicalizer.hpp"
#include "c1/c1_Optimizer.hpp"
#include "c1/c1_ValueMap.hpp"
#include "c1/c1_ValueSet.hpp"
#include "c1/c1_ValueStack.hpp"
#include "memory/resourceArea.hpp"

View File

@ -26,13 +26,9 @@
#include "c1/c1_ValueStack.hpp"
#include "c1/c1_RangeCheckElimination.hpp"
#include "c1/c1_IR.hpp"
#include "c1/c1_Canonicalizer.hpp"
#include "c1/c1_ValueMap.hpp"
#include "ci/ciMethodData.hpp"
#include "runtime/deoptimization.hpp"
#ifdef ASSERT
#include "utilities/bitMap.inline.hpp"
#endif
// Macros for the Trace and the Assertion flag
#ifdef ASSERT

View File

@ -26,7 +26,6 @@
#include "asm/codeBuffer.hpp"
#include "c1/c1_CodeStubs.hpp"
#include "c1/c1_Defs.hpp"
#include "c1/c1_FrameMap.hpp"
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
@ -35,7 +34,6 @@
#include "classfile/vmSymbols.hpp"
#include "code/codeBlob.hpp"
#include "code/compiledIC.hpp"
#include "code/pcDesc.hpp"
#include "code/scopeDesc.hpp"
#include "code/vtableStubs.hpp"
#include "compiler/compilationPolicy.hpp"
@ -48,12 +46,10 @@
#include "interpreter/interpreter.hpp"
#include "jfr/support/jfrIntrinsics.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/access.inline.hpp"
#include "oops/klass.inline.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp"
@ -67,7 +63,6 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/stackWatermarkSet.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/threadCritical.hpp"
#include "runtime/vframe.inline.hpp"
#include "runtime/vframeArray.hpp"
#include "runtime/vm_version.hpp"

View File

@ -29,7 +29,6 @@
#include "code/stubs.hpp"
#include "interpreter/interpreter.hpp"
#include "memory/allStatic.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/stubDeclarations.hpp"
class StubAssembler;

View File

@ -23,11 +23,11 @@
*/
#include "precompiled.hpp"
#include "c1/c1_Canonicalizer.hpp"
#include "c1/c1_IR.hpp"
#include "c1/c1_ValueMap.hpp"
#include "c1/c1_ValueSet.hpp"
#include "c1/c1_ValueStack.hpp"
#include "utilities/bitMap.inline.hpp"
#ifndef PRODUCT

View File

@ -26,9 +26,7 @@
#define SHARE_C1_C1_VALUESET_HPP
#include "c1/c1_Instruction.hpp"
#include "memory/allocation.hpp"
#include "utilities/bitMap.hpp"
#include "utilities/bitMap.inline.hpp"
// A ValueSet is a simple abstraction on top of a BitMap representing
// a set of Instructions. Currently it assumes that the number of

View File

@ -26,8 +26,6 @@
#define SHARE_C1_C1_VALUETYPE_HPP
#include "c1/c1_Compilation.hpp"
#include "ci/ciConstant.hpp"
#include "ci/ciMethodData.hpp"
// type hierarchy
class ValueType;

View File

@ -38,7 +38,6 @@
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "opto/compile.hpp"
#include "opto/node.hpp"
#include "runtime/deoptimization.hpp"
#include "utilities/growableArray.hpp"

View File

@ -28,10 +28,12 @@
#include "compiler/compilerDirectives.hpp"
#include "jvm_constants.h"
#include "jvm_io.h"
#ifdef COMPILER2
#include "opto/c2_globals.hpp"
#endif
#include "runtime/vm_version.hpp"
#include "utilities/checkedCast.hpp"
#include "utilities/tribool.hpp"
#include "utilities/xmlstream.hpp"
// These are flag-matching functions:
inline bool match_F_R(jshort flags) {

View File

@ -28,7 +28,6 @@
#include "code/nativeInst.hpp"
#include "interpreter/linkResolver.hpp"
#include "runtime/safepointVerifiers.hpp"
#include "opto/c2_MacroAssembler.hpp"
//-----------------------------------------------------------------------------
// The CompiledIC represents a compiled inline cache.

View File

@ -40,9 +40,6 @@
#include "runtime/sharedRuntime.hpp"
#include "utilities/align.hpp"
#include "utilities/powerOfTwo.hpp"
#ifdef COMPILER2
#include "opto/matcher.hpp"
#endif
// -----------------------------------------------------------------------------------------
// Implementation of VtableStub

View File

@ -32,9 +32,7 @@
#include "opto/c2compiler.hpp"
#endif
#include "compiler/compilerDefinitions.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/compilerDefinitions.hpp"
#include "runtime/arguments.hpp"
inline bool CompilerConfig::is_interpreter_only() {

View File

@ -26,9 +26,7 @@
#define SHARE_COMPILER_COMPILERDIRECTIVES_HPP
#include "classfile/vmIntrinsics.hpp"
#include "ci/ciMetadata.hpp"
#include "ci/ciMethod.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/methodMatcher.hpp"
#include "opto/phasetype.hpp"
#include "utilities/bitMap.hpp"

View File

@ -77,9 +77,6 @@
#include "utilities/checkedCast.hpp"
#include "utilities/copy.hpp"
#include "utilities/events.hpp"
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
// Helper class to access current interpreter state
class LastFrameAccessor : public StackObj {

View File

@ -26,7 +26,12 @@
#define SHARE_OPTO_C2COMPILER_HPP
#include "compiler/abstractCompiler.hpp"
#include "opto/output.hpp"
// Define the initial sizes for allocation of the resizable code buffer
enum {
initial_const_capacity = 4 * 1024
};
class C2Compiler : public AbstractCompiler {
private:

View File

@ -946,11 +946,9 @@ private:
Node_Notes* default_node_notes() const { return _default_node_notes; }
void set_default_node_notes(Node_Notes* n) { _default_node_notes = n; }
Node_Notes* node_notes_at(int idx) {
return locate_node_notes(_node_note_array, idx, false);
}
inline bool set_node_notes_at(int idx, Node_Notes* value);
Node_Notes* node_notes_at(int idx);
inline bool set_node_notes_at(int idx, Node_Notes* value);
// Copy notes from source to dest, if they exist.
// Overwrite dest only if source provides something.
// Return true if information was moved.

View File

@ -50,6 +50,7 @@
#include "opto/runtime.hpp"
#include "opto/rootnode.hpp"
#include "opto/subnode.hpp"
#include "opto/vectornode.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "prims/unsafe.hpp"

View File

@ -25,11 +25,8 @@
#ifndef SHARE_OPTO_MATHEXACTNODE_HPP
#define SHARE_OPTO_MATHEXACTNODE_HPP
#include "opto/multnode.hpp"
#include "opto/node.hpp"
#include "opto/addnode.hpp"
#include "opto/subnode.hpp"
#include "opto/type.hpp"
class PhaseGVN;

View File

@ -1999,6 +1999,10 @@ Compile::locate_node_notes(GrowableArray<Node_Notes*>* arr,
return arr->at(block_idx) + (idx & (_node_notes_block_size-1));
}
inline Node_Notes* Compile::node_notes_at(int idx) {
return locate_node_notes(_node_note_array, idx, false);
}
inline bool
Compile::set_node_notes_at(int idx, Node_Notes* value) {
if (value == nullptr || value->is_clear())

View File

@ -24,7 +24,6 @@
#include "precompiled.hpp"
#include "asm/assembler.inline.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/compiledIC.hpp"
#include "code/debugInfo.hpp"
#include "code/debugInfoRec.hpp"
@ -34,7 +33,6 @@
#include "compiler/oopMap.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/c2/barrierSetC2.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/allocation.hpp"
#include "opto/ad.hpp"
#include "opto/block.hpp"
@ -48,10 +46,7 @@
#include "opto/optoreg.hpp"
#include "opto/output.hpp"
#include "opto/regalloc.hpp"
#include "opto/runtime.hpp"
#include "opto/subnode.hpp"
#include "opto/type.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "utilities/macros.hpp"
#include "utilities/powerOfTwo.hpp"

View File

@ -54,11 +54,6 @@ class PhaseCFG;
#define DEBUG_ARG(x)
#endif
// Define the initial sizes for allocation of the resizable code buffer
enum {
initial_const_capacity = 4 * 1024
};
class BufferSizingData {
public:
int _stub;

View File

@ -28,8 +28,6 @@
#include "code/codeBlob.hpp"
#include "opto/machnode.hpp"
#include "opto/optoreg.hpp"
#include "opto/type.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/stubDeclarations.hpp"
#include "runtime/vframe.hpp"

View File

@ -43,9 +43,6 @@
#include "runtime/vframe_hp.hpp"
#include "utilities/copy.hpp"
#include "utilities/events.hpp"
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
int vframeArrayElement:: bci(void) const { return (_bci == SynchronizationEntryBCI ? 0 : _bci); }

View File

@ -45,10 +45,6 @@
#include "runtime/stubRoutines.hpp"
#include "runtime/vframeArray.hpp"
#include "runtime/vframe_hp.hpp"
#ifdef COMPILER2
#include "opto/matcher.hpp"
#endif
// ------------- compiledVFrame --------------