Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Hartmann <tobias.hartmann@oracle.com>
  • Loading branch information
chhagedorn and TobiHartmann authored Nov 20, 2024
1 parent 94abb68 commit 5ae3a4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/opto/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2115,15 +2115,15 @@ inline int Op_DivModIL(BasicType bt, bool is_unsigned) {
// a customized BFS.
class BFSActions : public StackObj {
public:
// Should a node's inputs further be visit in the BFS traversal? By default, we visit all data inputs. Override this
// method to provide a costum filter.
// Should a node's inputs further be visited in the BFS traversal? By default, we visit all data inputs. Override this
// method to provide a custom filter.
virtual bool should_visit(Node* node) const {
// By default, visit all inputs.
return true;
};

// Is the visited node a target node that we are looking for in the BFS traversal? We do not visit its inputs further
// but the BFS will continue to visited all unvisited nodes in the queue.
// but the BFS will continue to visit all unvisited nodes in the queue.
virtual bool is_target_node(Node* node) const = 0;

// Defines an action that should be taken when we visit a target node in the BFS traversal.
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/predicates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ class OpaqueLoopNodesVerifier : public BFSActions {

void target_node_action(Node* target_node) override {
if (target_node->is_OpaqueLoopInit()) {
assert(!_found_init, "can only found one OpaqueLoopInitNode");
assert(!_found_init, "should only find one OpaqueLoopInitNode");
_found_init = true;
} else {
assert(target_node->is_OpaqueLoopStride(), "unexpected Opaque1 node");
assert(!_found_stride, "can only found one OpaqueLoopStrideNode");
assert(!_found_stride, "should only find one OpaqueLoopStrideNode");
_found_stride = true;
}
}
Expand Down

0 comments on commit 5ae3a4f

Please sign in to comment.