Commit 34a2d65
[hlsl][ir] Skip promoting lets to lets
In the `PromoteInitializers` transform, if a let is used as a value, we
may determine that the value needs to be hoisted to a new let. But, this
ends up just creating a let of a let. Skip creating the duplicate let in
this case.
Bug: 369450791
Change-Id: I45178ec0029b13019314ab189df8073781a9dd9b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/211817
Reviewed-by: James Price <[email protected]>
Commit-Queue: dan sinclair <[email protected]>
Reviewed-by: Antonio Maiorano <[email protected]>1 parent e1fd66b commit 34a2d65
File tree
4,669 files changed
+10477
-19895
lines changed- src/tint/lang/hlsl/writer
- raise
- test/tint
- array
- buffer
- storage
- dynamic_index
- static_index
- types
- uniform
- dynamic_index
- static_index
- std140/array
- mat2x2_f32
- mat2x3_f16
- mat2x3_f32
- mat2x4_f16
- mat2x4_f32
- mat3x3_f32
- mat3x4_f32
- mat4x2_f16
- mat4x2_f32
- mat4x3_f16
- mat4x3_f32
- mat4x4_f16
- mat4x4_f32
- types
- bug
- chromium
- dawn
- fxc/indexed_assign_to_array_in_struct
- tint
- builtins
- frexp
- scalar
- vector
- gen
- literal
- abs
- acosh
- acos
- all
- any
- arrayLength
- asinh
- asin
- atan2
- atanh
- atan
- bitcast
- ceil
- clamp
- cosh
- cos
- countLeadingZeros
- countOneBits
- countTrailingZeros
- cross
- degrees
- determinant
- distance
- dot4I8Packed
- dot4U8Packed
- dot
- exp2
- exp
- extractBits
- faceForward
- firstLeadingBit
- firstTrailingBit
- floor
- fma
- fract
- insertBits
- inverseSqrt
- ldexp
- length
- log2
- log
- max
- min
- mix
- normalize
- pack2x16float
- pack2x16snorm
- pack2x16unorm
- pack4x8snorm
- pack4x8unorm
- pack4xI8Clamp
- pack4xI8
- pack4xU8Clamp
- pack4xU8
- pow
- quantizeToF16
- radians
- reflect
- refract
- reverseBits
- round
- saturate
- select
- sign
- sinh
- sin
- smoothstep
- sqrt
- step
- tanh
- tan
- textureDimensions
- textureGatherCompare
- textureGather
- textureLoad
- textureNumLayers
- textureNumLevels
- textureNumSamples
- textureSampleBaseClampToEdge
- textureSampleCompareLevel
- textureSampleGrad
- textureSampleLevel
- transpose
- trunc
- unpack2x16float
- unpack2x16snorm
- unpack2x16unorm
- unpack4x8snorm
- unpack4x8unorm
- unpack4xI8
- unpack4xU8
- var
- abs
- acosh
- acos
- all
- any
- arrayLength
- asinh
- asin
- atan2
- atanh
- atan
- bitcast
- ceil
- clamp
- cosh
- cos
- countLeadingZeros
- countOneBits
- countTrailingZeros
- cross
- degrees
- determinant
- distance
- dot4I8Packed
- dot4U8Packed
- dot
- exp2
- exp
- extractBits
- faceForward
- firstLeadingBit
- firstTrailingBit
- floor
- fma
- fract
- insertBits
- inverseSqrt
- ldexp
- length
- log2
- log
- max
- min
- mix
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
4,669 files changed
+10477
-19895
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1903 | 1903 | | |
1904 | 1904 | | |
1905 | 1905 | | |
1906 | | - | |
1907 | | - | |
| 1906 | + | |
1908 | 1907 | | |
1909 | 1908 | | |
1910 | 1909 | | |
| |||
2061 | 2060 | | |
2062 | 2061 | | |
2063 | 2062 | | |
2064 | | - | |
2065 | | - | |
| 2063 | + | |
2066 | 2064 | | |
2067 | 2065 | | |
2068 | 2066 | | |
| |||
2157 | 2155 | | |
2158 | 2156 | | |
2159 | 2157 | | |
2160 | | - | |
2161 | | - | |
| 2158 | + | |
2162 | 2159 | | |
2163 | 2160 | | |
2164 | 2161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 312 | + | |
| 313 | + | |
317 | 314 | | |
318 | 315 | | |
319 | 316 | | |
320 | | - | |
321 | | - | |
| 317 | + | |
| 318 | + | |
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
Lines changed: 110 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
756 | 866 | | |
757 | 867 | | |
Lines changed: 19 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
81 | 80 | | |
82 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
93 | | - | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
104 | | - | |
| 102 | + | |
| 103 | + | |
105 | 104 | | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
108 | 107 | | |
109 | 108 | | |
110 | | - | |
| 109 | + | |
111 | 110 | | |
112 | | - | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
118 | | - | |
119 | | - | |
| 117 | + | |
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
| |||
Lines changed: 19 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
81 | 80 | | |
82 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
93 | | - | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
104 | | - | |
| 102 | + | |
| 103 | + | |
105 | 104 | | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
108 | 107 | | |
109 | 108 | | |
110 | | - | |
| 109 | + | |
111 | 110 | | |
112 | | - | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
118 | | - | |
119 | | - | |
| 117 | + | |
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
| |||
Lines changed: 19 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | | - | |
| 93 | + | |
93 | 94 | | |
94 | | - | |
95 | | - | |
96 | 95 | | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
104 | | - | |
| 102 | + | |
| 103 | + | |
105 | 104 | | |
106 | | - | |
107 | | - | |
| 105 | + | |
| 106 | + | |
108 | 107 | | |
109 | 108 | | |
110 | | - | |
| 109 | + | |
111 | 110 | | |
112 | | - | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
118 | | - | |
119 | | - | |
| 117 | + | |
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
| |||
0 commit comments