-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm][CodeGen] Update checking method of loop-carried phi in window scheduler #96288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
huaatian
merged 3 commits into
llvm:main
from
huaatian:update_loop_carried_checking_method
Jun 26, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# REQUIRES: asserts | ||
# RUN: llc --march=hexagon %s -run-pass=pipeliner -debug-only=pipeliner \ | ||
# RUN: -window-sched=force -filetype=null -verify-machineinstrs 2>&1 \ | ||
# RUN: | FileCheck %s | ||
|
||
# CHECK: Loop carried phis are not supported yet! | ||
# CHECK: The WindowScheduler failed to initialize! | ||
# CHECK-LABEL: body: | | ||
# CHECK: bb.3 (machine-block-address-taken): | ||
# CHECK: {{%[0-9]+}}:intregs = PHI {{%[0-9]+}}, %bb.1, [[REG:%[0-9]+]], %bb.3 | ||
# CHECK: [[REG]]:intregs = PHI {{%[0-9]+}}, %bb.1, {{%[0-9]+}}, %bb.3 | ||
|
||
--- | ||
name: relu | ||
tracksRegLiveness: true | ||
body: | | ||
bb.0: | ||
successors: %bb.2(0x30000000), %bb.1(0x50000000) | ||
liveins: $r0, $r1, $r2 | ||
|
||
%0:intregs = COPY $r2 | ||
%1:intregs = COPY $r1 | ||
%2:intregs = COPY $r0 | ||
%3:predregs = C2_cmpeqi %2, 0 | ||
J2_jumpt killed %3, %bb.2, implicit-def dead $pc | ||
J2_jump %bb.1, implicit-def dead $pc | ||
|
||
bb.1: | ||
successors: %bb.3(0x80000000) | ||
|
||
%4:hvxvr = V6_vd0 | ||
%5:intregs = A2_addi %2, 31 | ||
%6:intregs = S2_lsr_i_r %5, 5 | ||
%7:intregs = COPY %6 | ||
J2_loop0r %bb.3, %7, implicit-def $lc0, implicit-def $sa0, implicit-def $usr | ||
J2_jump %bb.3, implicit-def dead $pc | ||
|
||
bb.2: | ||
PS_jmpret $r31, implicit-def dead $pc | ||
|
||
bb.3 (machine-block-address-taken): | ||
successors: %bb.3(0x7c000000), %bb.2(0x04000000) | ||
|
||
%8:intregs = PHI %0, %bb.1, %9, %bb.3 | ||
%9:intregs = PHI %1, %bb.1, %10, %bb.3 | ||
%11:hvxvr, %10:intregs = V6_vL32b_pi %9, 128 | ||
%12:hvxvr = V6_vmaxw killed %11, %4 | ||
%13:intregs = V6_vS32b_pi %8, 128, killed %12 | ||
ENDLOOP0 %bb.3, implicit-def $pc, implicit-def $lc0, implicit $sa0, implicit $lc0 | ||
J2_jump %bb.2, implicit-def dead $pc | ||
|
||
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These sets aren't used outside of the lambda. Just make the lambda a helper function with these used locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These sets are used to record the defs and uses of phis that have already been checked in the current MBB.
They need to be initialized and retain register information across multiple calls to the lambda.
Therefore, wouldn't it be better to place these sets outside the lambda?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok