Skip to content

Commit

Permalink
8250914: Matcher::stack_direction() is unused
Browse files Browse the repository at this point in the history
Remove unused Matcher::stack_direction() together with related ADL entries and
ADLC support.

Reviewed-by: vlivanov, thartmann
  • Loading branch information
robcasloz authored and TobiHartmann committed Sep 11, 2020
1 parent 9687dca commit 040c8f5
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 44 deletions.
3 changes: 0 additions & 3 deletions src/hotspot/cpu/aarch64/aarch64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -4043,9 +4043,6 @@ encode %{
// SP meets the minimum alignment.

frame %{
// What direction does stack grow in (assumed to be same for C & Java)
stack_direction(TOWARDS_LOW);

// These three registers define part of the calling convention
// between compiled code and the interpreter.

Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/arm/arm.ad
Original file line number Diff line number Diff line change
Expand Up @@ -1664,9 +1664,6 @@ encode %{
// the region from SP to FP meets the minimum stack alignment.

frame %{
// What direction does stack grow in (assumed to be same for native & Java)
stack_direction(TOWARDS_LOW);

// These two registers define part of the calling convention
// between compiled code and the interpreter.
inline_cache_reg(R_Ricklass); // Inline Cache Register or Method* for I2C
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/ppc/ppc.ad
Original file line number Diff line number Diff line change
Expand Up @@ -4118,9 +4118,6 @@ encode %{
// Definition of frame structure and management information.

frame %{
// What direction does stack grow in (assumed to be same for native & Java).
stack_direction(TOWARDS_LOW);

// These two registers define part of the calling convention between
// compiled code and the interpreter.

Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/s390/s390.ad
Original file line number Diff line number Diff line change
Expand Up @@ -2456,9 +2456,6 @@ source %{
// Definition of frame structure and management information.

frame %{
// What direction does stack grow in (assumed to be same for native & Java).
stack_direction(TOWARDS_LOW);

// These two registers define part of the calling convention between
// compiled code and the interpreter.

Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/x86/x86_32.ad
Original file line number Diff line number Diff line change
Expand Up @@ -3191,9 +3191,6 @@ encode %{
// the region from SP to FP meets the minimum stack alignment.

frame %{
// What direction does stack grow in (assumed to be same for C & Java)
stack_direction(TOWARDS_LOW);

// These three registers define part of the calling convention
// between compiled code and the interpreter.
inline_cache_reg(EAX); // Inline Cache Register
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/x86/x86_64.ad
Original file line number Diff line number Diff line change
Expand Up @@ -2740,9 +2740,6 @@ encode %{

frame
%{
// What direction does stack grow in (assumed to be same for C & Java)
stack_direction(TOWARDS_LOW);

// These three registers define part of the calling convention
// between compiled code and the interpreter.
inline_cache_reg(RAX); // Inline Cache Register
Expand Down
18 changes: 0 additions & 18 deletions src/hotspot/share/adlc/adlparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,6 @@ void ADLParser::frame_parse(void) {
parse_err(SYNERR, "missing identifier inside frame block.\n");
return;
}
if (strcmp(token,"stack_direction")==0) {
stack_dir_parse(frame);
}
if (strcmp(token,"sync_stack_slots")==0) {
sync_stack_slots_parse(frame);
}
Expand Down Expand Up @@ -1109,21 +1106,6 @@ void ADLParser::frame_parse(void) {
// skipws();
}

//------------------------------stack_dir_parse--------------------------------
void ADLParser::stack_dir_parse(FrameForm *frame) {
char *direction = parse_one_arg("stack direction entry");
if (strcmp(direction, "TOWARDS_LOW") == 0) {
frame->_direction = false;
}
else if (strcmp(direction, "TOWARDS_HIGH") == 0) {
frame->_direction = true;
}
else {
parse_err(SYNERR, "invalid value inside stack direction entry.\n");
return;
}
}

//------------------------------sync_stack_slots_parse-------------------------
void ADLParser::sync_stack_slots_parse(FrameForm *frame) {
// Assign value into frame form
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/adlc/adlparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ class ADLParser {
void enc_class_parse_block(EncClass* encoding, char* ec_name);

// Parse the components of the frame section
void stack_dir_parse(FrameForm *frame); // Parse the stack direction entry
void sync_stack_slots_parse(FrameForm *frame);
void frame_pointer_parse(FrameForm *frame, bool native);
void interpreter_frame_pointer_parse(FrameForm *frame, bool native);
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/adlc/formsopt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ class FrameForm : public Form {

public:
// Public Data
bool _direction; // Direction of stack growth
char *_sync_stack_slots;
char *_inline_cache_reg;
char *_interpreter_method_oop_reg;
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/adlc/output_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4143,9 +4143,6 @@ void ArchDesc::buildInstructMatchCheck(FILE *fp_cpp) const {
// Output the methods to Matcher which specify frame behavior
void ArchDesc::buildFrameMethods(FILE *fp_cpp) {
fprintf(fp_cpp,"\n\n");
// Stack Direction
fprintf(fp_cpp,"bool Matcher::stack_direction() const { return %s; }\n\n",
_frame->_direction ? "true" : "false");
// Sync Stack Slots
fprintf(fp_cpp,"int Compile::sync_stack_slots() const { return %s; }\n\n",
_frame->_sync_stack_slots);
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/opto/matcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,6 @@ class Matcher : public PhaseTransform {

// These calls are all generated by the ADLC

// TRUE - grows up, FALSE - grows down (Intel)
virtual bool stack_direction() const;

// Java-Java calling convention
// (what you use when Java calls Java)

Expand Down

1 comment on commit 040c8f5

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 040c8f5 Sep 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.