mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8366971: C2: Remove unused nop_list from PhaseOutput::init_buffer
Reviewed-by: epeter, dlong
This commit is contained in:
parent
b653ae92d5
commit
cc6d34b2fa
11 changed files with 6 additions and 82 deletions
|
@ -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
|
||||
|
|
|
@ -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----------------------------------------------------------
|
||||
|
|
|
@ -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----------------------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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----------------------------------------------------------
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ? ',' : ' ');
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue