-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[llvm][CodeGen] Fix failure in window scheduler caused by phi #95900
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
[llvm][CodeGen] Fix failure in window scheduler caused by phi #95900
Conversation
In certain cases, the register passed with the kernel MBB in phi are not defined within the kernel MBB. The window algorithm currently does not support such scenarios, so a check is performed during initialization.
Could you please review this code? Thank you~ @nathanchance @arsenm @dtcxzyw |
llvm/lib/CodeGen/WindowScheduler.cpp
Outdated
if (Register AntiReg = getAntiRegister(&MI)) | ||
// Register with Kernel in phi is not defined within the Kernel itself. | ||
if (MRI->getVRegDef(AntiReg)->getParent() != MBB) { | ||
LLVM_DEBUG(dbgs() << "Special phi structure is not supported!\n"); |
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.
It's not really special. Why is this difficult to handle? It should behave like any other live in value
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.
Yes, you are right. We only need to add some checks.
Updated.
…5900) In certain cases, the register passed with the kernel MBB in phi are not defined within the kernel MBB. This patch adds the corresponding handling.
In certain cases, the register passed with the kernel MBB in phi are not defined
within the kernel MBB. This patch adds the corresponding handling.