diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad index 33466453b76..e0459716122 100644 --- a/src/hotspot/cpu/aarch64/aarch64.ad +++ b/src/hotspot/cpu/aarch64/aarch64.ad @@ -5965,9 +5965,6 @@ attributes %{ instruction_unit_size = 4; // An instruction is 4 bytes long instruction_fetch_unit_size = 64; // The processor fetches one line instruction_fetch_units = 1; // of 64 bytes - - // List of nop instructions - nops( MachNop ); %} // We don't use an actual pipeline model so don't care about resources diff --git a/src/hotspot/cpu/arm/arm.ad b/src/hotspot/cpu/arm/arm.ad index 3b6faa6c81a..45d51aaac57 100644 --- a/src/hotspot/cpu/arm/arm.ad +++ b/src/hotspot/cpu/arm/arm.ad @@ -2638,9 +2638,6 @@ attributes %{ instruction_unit_size = 4; // An instruction is 4 bytes long instruction_fetch_unit_size = 16; // The processor fetches one line instruction_fetch_units = 1; // of 16 bytes - - // List of nop instructions - nops( Nop_A0, Nop_A1, Nop_MS, Nop_FA, Nop_BR ); %} //----------RESOURCES---------------------------------------------------------- diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad index cd71e298b7d..290369360fc 100644 --- a/src/hotspot/cpu/ppc/ppc.ad +++ b/src/hotspot/cpu/ppc/ppc.ad @@ -4920,10 +4920,6 @@ attributes %{ // ...in one line instruction_fetch_units = 1 - - // Unused, list one so that array generated by adlc is not empty. - // Aix compiler chokes if _nop_count = 0. - nops(fxNop); %} //----------RESOURCES---------------------------------------------------------- diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad index eab19e74f93..0c4dd7b71e2 100644 --- a/src/hotspot/cpu/riscv/riscv.ad +++ b/src/hotspot/cpu/riscv/riscv.ad @@ -3845,9 +3845,6 @@ attributes %{ // ...in one line. instruction_fetch_units = 1; - - // List of nop instructions - nops( MachNop ); %} // We don't use an actual pipeline model so don't care about resources diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad index 932dc9e1ca7..0914bea82a1 100644 --- a/src/hotspot/cpu/x86/x86_64.ad +++ b/src/hotspot/cpu/x86/x86_64.ad @@ -3429,9 +3429,6 @@ attributes %{ instruction_unit_size = 1; // An instruction is 1 bytes long instruction_fetch_unit_size = 16; // The processor fetches one line instruction_fetch_units = 1; // of 16 bytes - - // List of nop instructions - nops( MachNop ); %} //----------RESOURCES---------------------------------------------------------- diff --git a/src/hotspot/share/adlc/adlparse.cpp b/src/hotspot/share/adlc/adlparse.cpp index 033e8d26ca7..15dbf070674 100644 --- a/src/hotspot/share/adlc/adlparse.cpp +++ b/src/hotspot/share/adlc/adlparse.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1507,36 +1507,8 @@ void ADLParser::pipe_parse(void) { } if (!strcmp(ident, "nops")) { + parse_err(WARN, "Using obsolete token, nops"); skipws(); - if (_curchar != '(') { - parse_err(SYNERR, "expected `(`, found '%c'\n", _curchar); - break; - } - - next_char(); skipws(); - - while (_curchar != ')') { - ident = get_ident(); - if (ident == nullptr) { - parse_err(SYNERR, "expected identifier for nop instruction, found '%c'\n", _curchar); - break; - } - - pipeline->_noplist.addName(ident); - pipeline->_nopcnt++; - skipws(); - - if (_curchar == ',') { - next_char(); skipws(); - } - } - - next_char(); skipws(); - - if (_curchar == ';') { - next_char(); skipws(); - } - continue; } diff --git a/src/hotspot/share/adlc/formsopt.cpp b/src/hotspot/share/adlc/formsopt.cpp index 5de8974e2c0..01fe6288c53 100644 --- a/src/hotspot/share/adlc/formsopt.cpp +++ b/src/hotspot/share/adlc/formsopt.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -511,8 +511,6 @@ PipelineForm::PipelineForm() , _stagecnt (0) , _classlist () , _classcnt (0) - , _noplist () - , _nopcnt (0) , _variableSizeInstrs (false) , _branchHasDelaySlot (false) , _maxInstrsPerBundle (0) @@ -533,7 +531,6 @@ void PipelineForm::output(FILE *fp) { // Write info to output files const char *res; const char *stage; const char *cls; - const char *nop; int count = 0; fprintf(fp,"\nPipeline:"); @@ -574,9 +571,6 @@ void PipelineForm::output(FILE *fp) { // Write info to output files for ( _classlist.reset(); (cls = _classlist.iter()) != nullptr; ) _classdict[cls]->is_pipeclass()->output(fp); - fprintf(fp,"\nNop Instructions:"); - for ( _noplist.reset(); (nop = _noplist.iter()) != nullptr; ) - fprintf(fp, " \"%s\"", nop); fprintf(fp,"\n"); } diff --git a/src/hotspot/share/adlc/formsopt.hpp b/src/hotspot/share/adlc/formsopt.hpp index d183a46b875..db7b9dbd8d8 100644 --- a/src/hotspot/share/adlc/formsopt.hpp +++ b/src/hotspot/share/adlc/formsopt.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -386,9 +386,6 @@ public: FormDict _classdict; // Class Name -> PipeClassForm mapping int _classcnt; // Number of classes - NameList _noplist; // List of NOP instructions - int _nopcnt; // Number of nop instructions - bool _variableSizeInstrs; // Indicates if this architecture has variable sized instructions bool _branchHasDelaySlot; // Indicates that branches have delay slot instructions int _maxInstrsPerBundle; // Indicates the maximum number of instructions for ILP diff --git a/src/hotspot/share/adlc/output_c.cpp b/src/hotspot/share/adlc/output_c.cpp index 0620f2f4496..abebf39a2b2 100644 --- a/src/hotspot/share/adlc/output_c.cpp +++ b/src/hotspot/share/adlc/output_c.cpp @@ -977,18 +977,6 @@ void ArchDesc::build_pipe_classes(FILE *fp_cpp) { } fprintf(fp_cpp, "}\n\n"); - // Output the list of nop nodes - fprintf(fp_cpp, "// Descriptions for emitting different functional unit nops\n"); - const char *nop; - int nopcnt = 0; - for ( _pipeline->_noplist.reset(); (nop = _pipeline->_noplist.iter()) != nullptr; nopcnt++ ); - - fprintf(fp_cpp, "void Bundle::initialize_nops(MachNode * nop_list[%d]) {\n", nopcnt); - int i = 0; - for ( _pipeline->_noplist.reset(); (nop = _pipeline->_noplist.iter()) != nullptr; i++ ) { - fprintf(fp_cpp, " nop_list[%d] = (MachNode *) new %sNode();\n", i, nop); - } - fprintf(fp_cpp, "};\n\n"); fprintf(fp_cpp, "#ifndef PRODUCT\n"); fprintf(fp_cpp, "void Bundle::dump(outputStream *st) const {\n"); fprintf(fp_cpp, " static const char * bundle_flags[] = {\n"); @@ -1004,7 +992,7 @@ void ArchDesc::build_pipe_classes(FILE *fp_cpp) { fprintf(fp_cpp, " static const char *resource_names[%d] = {", _pipeline->_rescount); // Don't add compound resources to the list of resource names const char* resource; - i = 0; + int i = 0; for (_pipeline->_reslist.reset(); (resource = _pipeline->_reslist.iter()) != nullptr;) { if (_pipeline->_resdict[resource]->is_resource()->is_discrete()) { fprintf(fp_cpp, " \"%s\"%c", resource, i < _pipeline->_rescount - 1 ? ',' : ' '); diff --git a/src/hotspot/share/adlc/output_h.cpp b/src/hotspot/share/adlc/output_h.cpp index cbcc00efa3b..78cf5ea7988 100644 --- a/src/hotspot/share/adlc/output_h.cpp +++ b/src/hotspot/share/adlc/output_h.cpp @@ -1115,12 +1115,6 @@ void ArchDesc::declare_pipe_classes(FILE *fp_hpp) { fprintf(fp_hpp, " bool use_delay() { return ((_flags & _use_delay) != 0); }\n"); fprintf(fp_hpp, " bool used_in_delay() { return ((_flags & _used_in_delay) != 0); }\n\n"); - fprintf(fp_hpp, " enum {\n"); - fprintf(fp_hpp, " _nop_count = %d\n", - _pipeline->_nopcnt); - fprintf(fp_hpp, " };\n\n"); - fprintf(fp_hpp, " static void initialize_nops(MachNode *nop_list[%d]);\n\n", - _pipeline->_nopcnt); fprintf(fp_hpp, "#ifndef PRODUCT\n"); fprintf(fp_hpp, " void dump(outputStream *st = tty) const;\n"); fprintf(fp_hpp, "#endif\n"); diff --git a/src/hotspot/share/opto/output.cpp b/src/hotspot/share/opto/output.cpp index 124b00a6549..9a6970ebf20 100644 --- a/src/hotspot/share/opto/output.cpp +++ b/src/hotspot/share/opto/output.cpp @@ -1399,10 +1399,6 @@ CodeBuffer* PhaseOutput::init_buffer() { cb->initialize_stubs_size(stub_req); cb->initialize_oop_recorder(C->env()->oop_recorder()); - // fill in the nop array for bundling computations - MachNode *_nop_list[Bundle::_nop_count]; - Bundle::initialize_nops(_nop_list); - return cb; } @@ -2062,8 +2058,7 @@ Scheduling::Scheduling(Arena *arena, Compile &compile) // Create a MachNopNode _nop = new MachNopNode(); - // Now that the nops are in the array, save the count - // (but allow entries for the nops) + // Save the count _node_bundling_limit = compile.unique(); uint node_max = _regalloc->node_regs_max_index();