-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[AMDGPU] Remove the AnnotateKernelFeatures pass #130198
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
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0b74453
[AMDGPU] Remove the AnnotateKernelFeatures pass
jwanggit86 4998a66
Fix formatting.
jwanggit86 4617a5b
Update test files.
jwanggit86 f5ab83c
Remove the pass from AMDGPUPassRegistry.def
jwanggit86 08fefc8
Update tests.
jwanggit86 655a383
Update tests.
jwanggit86 48f2ecf
Minor change based on review.
jwanggit86 ccef8f5
Formatting.
jwanggit86 7246b19
(1) remove useless code (2) update one test file.
jwanggit86 157e974
Trigger Build
jwanggit86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -601,12 +601,6 @@ GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(const Function &F, | |
const CallingConv::ID CC = F.getCallingConv(); | ||
const bool IsKernel = | ||
CC == CallingConv::AMDGPU_KERNEL || CC == CallingConv::SPIR_KERNEL; | ||
// FIXME: Should have analysis or something rather than attribute to detect | ||
// calls. | ||
const bool HasCalls = F.hasFnAttribute("amdgpu-calls"); | ||
// FIXME: This attribute is a hack, we just need an analysis on the function | ||
// to look for allocas. | ||
const bool HasStackObjects = F.hasFnAttribute("amdgpu-stack-objects"); | ||
|
||
if (IsKernel && (!F.arg_empty() || ST.getImplicitArgNumBytes(F) != 0)) | ||
KernargSegmentPtr = true; | ||
|
@@ -629,12 +623,13 @@ GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(const Function &F, | |
DispatchID = true; | ||
} | ||
|
||
// TODO: This could be refined a lot. The attribute is a poor way of | ||
// detecting calls or stack objects that may require it before argument | ||
// lowering. | ||
if (ST.hasFlatAddressSpace() && AMDGPU::isEntryFunctionCC(CC) && | ||
(IsAmdHsaOrMesa || ST.enableFlatScratch()) && | ||
(HasCalls || HasStackObjects || ST.enableFlatScratch()) && | ||
// FlatScratchInit cannot be true for graphics CC if enableFlatScratch() | ||
// is false. | ||
(ST.enableFlatScratch() || | ||
(!AMDGPU::isGraphics(CC) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checking on CC is moved to the front. |
||
!F.hasFnAttribute("amdgpu-no-flat-scratch-init"))) && | ||
!ST.flatScratchIsArchitected()) { | ||
FlatScratchInit = true; | ||
} | ||
|
Oops, something went wrong.
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.
Comment is updated.