Skip to content

Commit

Permalink
Test suggested by Tobias
Browse files Browse the repository at this point in the history
  • Loading branch information
reinrich committed Jul 18, 2024
1 parent 5d2a19d commit b4797d8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions src/hotspot/share/opto/superword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ bool SuperWord::SLP_extract() {
DEBUG_ONLY(verify_packs();)
DEBUG_ONLY(verify_no_extract());

return schedule_and_apply();
return schedule_and_apply() && apply2();
}

// Find the "seed" memops pairs. These are pairs that we strongly suspect would lead to vectorization.
Expand Down Expand Up @@ -2127,16 +2127,23 @@ bool SuperWord::schedule_and_apply() {
}

// (4) Apply the vectorization, including re-ordering the memops.
return apply(memops_schedule);
apply(memops_schedule);

return true;
}

bool SuperWord::apply(Node_List& memops_schedule) {
void SuperWord::apply(Node_List& memops_schedule) {
Compile* C = phase()->C;
CountedLoopNode* cl = lpt()->_head->as_CountedLoop();
C->print_method(PHASE_AUTO_VECTORIZATION1_BEFORE_APPLY, 4, cl);

apply_memops_reordering_with_schedule(memops_schedule);
C->print_method(PHASE_AUTO_VECTORIZATION2_AFTER_REORDER, 4, cl);
}

bool SuperWord::apply2() {
Compile* C = phase()->C;
CountedLoopNode* cl = lpt()->_head->as_CountedLoop();

adjust_pre_loop_limit_to_align_main_loop_vectors();
C->print_method(PHASE_AUTO_VECTORIZATION3_AFTER_ADJUST_LIMIT, 4, cl);
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/opto/superword.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,8 @@ class SuperWord : public ResourceObj {
DEBUG_ONLY(void verify_packs() const;)

bool schedule_and_apply();
bool apply(Node_List& memops_schedule);
void apply(Node_List& memops_schedule);
bool apply2();
void apply_memops_reordering_with_schedule(Node_List& memops_schedule);
bool apply_vectorization();
// Create a vector operand for the nodes in pack p for operand: in(opd_idx)
Expand Down

0 comments on commit b4797d8

Please sign in to comment.