Skip to content

Commit 11cbfe1

Browse files
committed
Address PR feedback
1 parent 216c451 commit 11cbfe1

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

llvm/lib/Target/DirectX/DXILShaderFlags.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ void ModuleShaderFlags::initialize(Module &M, DXILResourceTypeMap &DRTM,
153153
MMDI.EntryPropertyVec[0].Entry->hasFnAttribute(
154154
llvm::Attribute::OptimizeNone);
155155
// Ensure all entry functions have the same optimization attribute
156-
for (auto EF : MMDI.EntryPropertyVec)
156+
for (const auto &EntryFunProps : MMDI.EntryPropertyVec)
157157
if (CombinedSFMask.DisableOptimizations !=
158-
EF.Entry->hasFnAttribute(llvm::Attribute::OptimizeNone))
159-
EF.Entry->getContext().diagnose(DiagnosticInfoUnsupported(
160-
*(EF.Entry), "Inconsistent optnone attribute "));
158+
EntryFunProps.Entry->hasFnAttribute(llvm::Attribute::OptimizeNone))
159+
EntryFunProps.Entry->getContext().diagnose(DiagnosticInfoUnsupported(
160+
*(EntryFunProps.Entry), "Inconsistent optnone attribute "));
161161
}
162162
}
163163

llvm/test/CodeGen/DirectX/ShaderFlags/disable-opt-cs.ll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
; void main() {}
1717
; EOF
1818

19-
; ModuleID = '-'
20-
source_filename = "-"
21-
target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
2219
target triple = "dxilv1.0-pc-shadermodel6.0-compute"
2320

2421
; Function Attrs: convergent noinline norecurse optnone
@@ -35,9 +32,3 @@ entry:
3532

3633
attributes #0 = { convergent noinline norecurse optnone "approx-func-fp-math"="true" "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
3734
attributes #1 = { alwaysinline convergent mustprogress norecurse nounwind "approx-func-fp-math"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
38-
39-
!llvm.module.flags = !{!0}
40-
!dx.valver = !{!1}
41-
42-
!0 = !{i32 1, !"wchar_size", i32 4}
43-
!1 = !{i32 1, i32 8}

llvm/test/CodeGen/DirectX/ShaderFlags/disable-opt-lib.ll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
; int foo() {return 0;}
2020
; EOF
2121

22-
; ModuleID = '-'
23-
source_filename = "-"
24-
target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
2522
target triple = "dxilv1.3-pc-shadermodel6.3-library"
2623

2724
; Function Attrs: convergent mustprogress noinline norecurse nounwind optnone
@@ -45,9 +42,3 @@ entry:
4542

4643
attributes #0 = { convergent mustprogress noinline norecurse nounwind optnone "approx-func-fp-math"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
4744
attributes #1 = { convergent noinline norecurse optnone "approx-func-fp-math"="true" "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
48-
49-
!llvm.module.flags = !{!0}
50-
!dx.valver = !{!1}
51-
52-
!0 = !{i32 1, !"wchar_size", i32 4}
53-
!1 = !{i32 1, i32 8}

0 commit comments

Comments
 (0)