-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[HLSL] Analyze update counter usage #130356
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
Closed
Closed
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ee05b44
[HLSL] Analyze update counter usage
V-FEXrt 28e7369
format
V-FEXrt 9062182
Add Diag and tests
V-FEXrt 7c77771
format
V-FEXrt df79e62
Merge branch 'main' into hlsl-114130-counter-analysis
V-FEXrt 11c731e
Use Module Pass
V-FEXrt 955ce1b
comments
V-FEXrt 92f2a46
format
V-FEXrt 176b862
Add location to error message
V-FEXrt 5d1648a
format
V-FEXrt 67c76a0
Mark resources with invalid use in map
V-FEXrt ef30e9a
format
V-FEXrt 173dd50
Merge branch 'main' into hlsl-114130-counter-analysis
V-FEXrt b1a4f4d
Fix enum name
V-FEXrt a4d14d3
Merge branch 'main' into hlsl-114130-counter-analysis
V-FEXrt 1f011b7
address comments
V-FEXrt f7b82c0
address comments
V-FEXrt c82249d
address comments
V-FEXrt 61d371f
address comments
V-FEXrt 1202e86
address comments
V-FEXrt 940b928
Update llvm/include/llvm/Analysis/DXILResource.h
V-FEXrt 3366897
address comments
V-FEXrt 6de3c49
address comments
V-FEXrt f6a39c7
address comments
V-FEXrt 6ae40ec
Remove unnecessary functions
V-FEXrt 34a9b12
Raise error for each invalid use
V-FEXrt 649b5d4
stable_sort no longer needed
V-FEXrt cbe278b
remove some test boilerplate
V-FEXrt f210433
Pare back to analysis only
V-FEXrt 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
; RUN: not opt -S -passes='dxil-op-lower' -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s | ||
; CHECK: RWStructuredBuffers may increment or decrement their counters, but not both. | ||
|
||
define void @inc_and_dec() { | ||
entry: | ||
%handle = call target("dx.RawBuffer", float, 1, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_f32_1_0t(i32 1, i32 2, i32 3, i32 4, i1 false) | ||
call i32 @llvm.dx.resource.updatecounter.tdx.RawBuffer_f32_1_0t(target("dx.RawBuffer", float, 1, 0) %handle, i8 -1) | ||
call i32 @llvm.dx.resource.updatecounter.tdx.RawBuffer_f32_1_0t(target("dx.RawBuffer", float, 1, 0) %handle, i8 1) | ||
ret void | ||
} | ||
|
||
declare target("dx.RawBuffer", float, 1, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_f32_1_0t(i32, i32, i32, i32, i1) | ||
declare i32 @llvm.dx.resource.updatecounter.tdx.RawBuffer_f32_1_0t(target("dx.RawBuffer", float, 1, 0), i8) |
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.
Uh oh!
There was an error while loading. Please reload this page.