- Notifications
You must be signed in to change notification settings - Fork 805
[SER] MaybeReorderThread + Make(Nop|Miss) HLSL -> DXIL lowering and tests #7262
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
Conversation
- HLSL -> DXIL lowering - ast, hlsl->dxil, dxilgen, and ScalarReplAggregatesHLSL tests SER implementation tracker (microsoft#7214)
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.
All these test cases need reworking. It looks like many of the matches that you have in the tests would match on the input file so they aren't actually testing that the IR was changed.
tools/clang/test/DXC/Passes/ScalarReplHLSL/hitobject_make_scalarrepl.ll Outdated Show resolved Hide resolved
%tmp2 = alloca %dx.types.HitObject, align 4 | ||
%0 = bitcast %dx.types.HitObject* %hit to i8*, !dbg !23 ; line:42 col:3 | ||
call void @llvm.lifetime.start(i64 4, i8* %0) #0, !dbg !23 ; line:42 col:3 | ||
; CHECK: %{{[^ ]+}} = call %dx.types.HitObject* @"dx.hl.op..%dx.types.HitObject* (i32, %dx.types.HitObject*)"(i32 358, %dx.types.HitObject* %{{[^ ]+}}) |
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.
This match would succeed even if the IR is unchanged from with is in the test case now, so we probably need some more specific matches, maybe a variable match in order to verify that this IR is actually being transformed.
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.
That is because this call to HitObject_MakeNop
is not expected to change. SroaHLSL must only flatten the RayDesc
param in the DxHitObject_MakeMiss
call below and the test is checking for exactly that.
@llvm-beanz If that is not what we want, could you provide more specific guidance of what you want to see changed?
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.
If the goal is to make sure this doesn't get scalarized, we should have some variable matches to make sure that the values move as expected through the operations.
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.
Added explicit CHECK
s that RayDesc
gets scalarized and all other params remain in place. Also checking that the ptr from the default ctr remains unused.
@llvm-beanz does this resolve this request?
Co-authored-by: Chris B <beanz@abolishcrlf.org>
tools/clang/test/CodeGenDXIL/hlsl/objects/HitObject/hitobject_make.hlsl Outdated Show resolved Hide resolved
This reverts commit 57b5fdd.
…return is a Clang codegen artifact)
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.
LGTM.
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.
Minor comments. Could address later.
In the future, let's put AST tests under SemaHLSL
, not under CodeGenDXIL
.
SER implementation tracker (#7214)