Skip to content

Instantly share code, notes, and snippets.

@SaschaWillems
Created September 26, 2016 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaschaWillems/e1991b6f58ea24adbeadb40173c48244 to your computer and use it in GitHub Desktop.
Save SaschaWillems/e1991b6f58ea24adbeadb40173c48244 to your computer and use it in GitHub Desktop.
SPIR-V stats (https://github.com/sheredom/spirv-stats) for my examples
Totals: 23523 hits 410992 bytes
OpLoad[ 61] = 2729 hits (11.60%) 43664 bytes (10.62%)
0 hits with memory access 0.00%
OpName[ 5] = 2337 hits ( 9.93%) 40856 bytes ( 9.94%)
OpVariable[ 59] = 1874 hits ( 7.97%) 29984 bytes ( 7.30%)
0 hits with initializer 0.00%
OpStore[ 62] = 1496 hits ( 6.36%) 17952 bytes ( 4.37%)
0 hits with memory access 0.00%
OpDecorate[ 71] = 1408 hits ( 5.99%) 21700 bytes ( 5.28%)
207 hits with no literals 14.70%
1201 hits with 1 literal 85.30%
0 hits with 2+ literals 0.00%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
184 hits of decoration 2 13.07%
4 hits of decoration 3 0.28%
16 hits of decoration 6 1.14%
1 hits of decoration 8 0.07%
62 hits of decoration 11 4.40%
6 hits of decoration 14 0.43%
8 hits of decoration 15 0.57%
3 hits of decoration 24 0.21%
1 hits of decoration 25 0.07%
774 hits of decoration 30 54.97%
173 hits of decoration 33 12.29%
176 hits of decoration 34 12.50%
OpTypePointer[ 32] = 1370 hits ( 5.82%) 21920 bytes ( 5.33%)
OpConstant[ 43] = 1081 hits ( 4.60%) 17296 bytes ( 4.21%)
1081 hits have 1 literal 100.00%
0 hits have 2+ literals 0.00%
OpCompositeExtract[ 81] = 1066 hits ( 4.53%) 22904 bytes ( 5.57%)
0 hits with 0 literals 0.00%
670 hits with 1 literal 62.85%
396 hits with 2 literals 37.15%
0 hits with 3+ literals 15.48%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 hits with literal = 0 21.58%
220 hits with literal = 1 20.64%
202 hits with literal = 2 18.95%
18 hits with literal = 3 1.69%
0 hits with literal = 4 0.00%
OpAccessChain[ 65] = 1038 hits ( 4.41%) 21628 bytes ( 5.26%)
0 hits with 0 indices 0.00%
875 hits with 1 index 84.30%
120 hits with 2 indices 11.56%
32 hits with 3 indices 3.08%
11 hits with 4 indices 1.06%
0 hits with 5+ indices 0.00%
OpMemberDecorate[ 72] = 874 hits ( 3.72%) 16816 bytes ( 4.09%)
166 hits with no literals 18.99%
708 hits with 1 literal 81.01%
0 hits with 2+ literals 0.00%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166 hits of decoration 5 18.99%
163 hits of decoration 7 18.65%
221 hits of decoration 11 25.29%
20 hits of decoration 30 2.29%
304 hits of decoration 35 34.78%
OpMemberName[ 6] = 573 hits ( 2.44%) 13580 bytes ( 3.30%)
OpLabel[248] = 544 hits ( 2.31%) 4352 bytes ( 1.06%)
OpCompositeConstruct[ 80] = 516 hits ( 2.19%) 13056 bytes ( 3.18%)
0 hits with 0 literals 0.00%
36 hits with 1 literal 6.98%
276 hits with 2 literals 53.49%
204 hits with 3 literals 39.53%
0 hits with 4 literals 0.00%
0 hits with 5+ literals 0.00%
OpTypeVector[ 23] = 447 hits ( 1.90%) 7152 bytes ( 1.74%)
OpExtInst[ 12] = 370 hits ( 1.57%) 9812 bytes ( 2.39%)
OpSourceExtension[ 4] = 322 hits ( 1.37%) 11580 bytes ( 2.82%)
OpFAdd[129] = 228 hits ( 0.97%) 4560 bytes ( 1.11%)
OpCapability[ 17] = 225 hits ( 0.96%) 1800 bytes ( 0.44%)
OpVectorTimesScalar[142] = 224 hits ( 0.95%) 4480 bytes ( 1.09%)
OpBranch[249] = 222 hits ( 0.94%) 1776 bytes ( 0.43%)
OpTypeStruct[ 30] = 206 hits ( 0.88%) 3948 bytes ( 0.96%)
OpVectorShuffle[ 79] = 206 hits ( 0.88%) 6612 bytes ( 1.61%)
0 hits with 0 literals 0.00%
0 hits with 1 literal 0.00%
18 hits with 2 literals 8.74%
165 hits with 3 literals 80.10%
23 hits with 4 literals 11.17%
0 hits with 5+ literals 0.00%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 hits with undef literal 0.00%
183 hits with literals < 4 88.83%
23 hits with literals < 8 11.17%
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183 hits with same vector 88.83%
OpFunction[ 54] = 201 hits ( 0.85%) 4020 bytes ( 0.98%)
OpFunctionEnd[ 56] = 201 hits ( 0.85%) 804 bytes ( 0.20%)
OpTypeFunction[ 33] = 197 hits ( 0.84%) 2612 bytes ( 0.64%)
OpTypeInt[ 21] = 192 hits ( 0.82%) 3072 bytes ( 0.75%)
OpReturn[253] = 172 hits ( 0.73%) 688 bytes ( 0.17%)
OpMemoryModel[ 14] = 169 hits ( 0.72%) 2028 bytes ( 0.49%)
OpExtInstImport[ 11] = 169 hits ( 0.72%) 4056 bytes ( 0.99%)
OpTypeFloat[ 22] = 169 hits ( 0.72%) 2028 bytes ( 0.49%)
OpSource[ 3] = 169 hits ( 0.72%) 2028 bytes ( 0.49%)
OpTypeVoid[ 19] = 169 hits ( 0.72%) 1352 bytes ( 0.33%)
OpEntryPoint[ 15] = 169 hits ( 0.72%) 7100 bytes ( 1.73%)
OpMatrixTimesVector[145] = 168 hits ( 0.71%) 3360 bytes ( 0.82%)
OpFMul[133] = 146 hits ( 0.62%) 2920 bytes ( 0.71%)
OpConstantComposite[ 44] = 139 hits ( 0.59%) 3460 bytes ( 0.84%)
OpFSub[131] = 135 hits ( 0.57%) 2700 bytes ( 0.66%)
OpDot[148] = 115 hits ( 0.49%) 2300 bytes ( 0.56%)
OpBranchConditional[250] = 110 hits ( 0.47%) 1760 bytes ( 0.43%)
OpExecutionMode[ 16] = 110 hits ( 0.47%) 1432 bytes ( 0.35%)
OpTypeMatrix[ 24] = 105 hits ( 0.45%) 1680 bytes ( 0.41%)
OpTypeArray[ 28] = 103 hits ( 0.44%) 1648 bytes ( 0.40%)
OpMatrixTimesMatrix[146] = 84 hits ( 0.36%) 1680 bytes ( 0.41%)
OpImageSampleImplicitLod[ 87] = 82 hits ( 0.35%) 1672 bytes ( 0.41%)
OpSelectionMerge[247] = 77 hits ( 0.33%) 924 bytes ( 0.22%)
OpFNegate[127] = 70 hits ( 0.30%) 1120 bytes ( 0.27%)
OpFunctionParameter[ 55] = 69 hits ( 0.29%) 828 bytes ( 0.20%)
OpTypeImage[ 25] = 68 hits ( 0.29%) 2448 bytes ( 0.60%)
OpTypeSampledImage[ 27] = 64 hits ( 0.27%) 768 bytes ( 0.19%)
OpFDiv[136] = 58 hits ( 0.25%) 1160 bytes ( 0.28%)
OpFunctionCall[ 57] = 48 hits ( 0.20%) 1200 bytes ( 0.29%)
OpIAdd[128] = 44 hits ( 0.19%) 880 bytes ( 0.21%)
OpTypeBool[ 20] = 39 hits ( 0.17%) 312 bytes ( 0.08%)
OpReturnValue[254] = 39 hits ( 0.17%) 312 bytes ( 0.08%)
OpConvertSToF[111] = 36 hits ( 0.15%) 576 bytes ( 0.14%)
OpLoopMerge[246] = 33 hits ( 0.14%) 528 bytes ( 0.13%)
OpSLessThan[177] = 27 hits ( 0.11%) 540 bytes ( 0.13%)
OpFOrdLessThan[184] = 25 hits ( 0.11%) 500 bytes ( 0.12%)
OpBitcast[124] = 18 hits ( 0.08%) 288 bytes ( 0.07%)
OpFOrdGreaterThan[186] = 18 hits ( 0.08%) 360 bytes ( 0.09%)
OpPhi[245] = 18 hits ( 0.08%) 504 bytes ( 0.12%)
OpVectorTimesMatrix[144] = 13 hits ( 0.06%) 260 bytes ( 0.06%)
OpLogicalNot[168] = 13 hits ( 0.06%) 208 bytes ( 0.05%)
OpIEqual[170] = 13 hits ( 0.06%) 260 bytes ( 0.06%)
OpFOrdGreaterThanEqual[190] = 10 hits ( 0.04%) 200 bytes ( 0.05%)
OpBitwiseAnd[199] = 8 hits ( 0.03%) 160 bytes ( 0.04%)
OpTranspose[ 84] = 7 hits ( 0.03%) 112 bytes ( 0.03%)
OpSLessThanEqual[179] = 6 hits ( 0.03%) 120 bytes ( 0.03%)
OpArrayLength[ 68] = 5 hits ( 0.02%) 100 bytes ( 0.02%)
OpFOrdEqual[180] = 5 hits ( 0.02%) 100 bytes ( 0.02%)
OpEmitVertex[218] = 4 hits ( 0.02%) 16 bytes ( 0.00%)
OpSNegate[126] = 4 hits ( 0.02%) 64 bytes ( 0.02%)
OpImageSampleExplicitLod[ 88] = 4 hits ( 0.02%) 112 bytes ( 0.03%)
OpImage[100] = 4 hits ( 0.02%) 64 bytes ( 0.02%)
OpShiftLeftLogical[196] = 4 hits ( 0.02%) 80 bytes ( 0.02%)
OpTypeRuntimeArray[ 29] = 4 hits ( 0.02%) 48 bytes ( 0.01%)
OpMatrixTimesScalar[143] = 4 hits ( 0.02%) 80 bytes ( 0.02%)
OpImageQuerySizeLod[103] = 4 hits ( 0.02%) 80 bytes ( 0.02%)
OpImageWrite[ 99] = 4 hits ( 0.02%) 64 bytes ( 0.02%)
OpImageRead[ 98] = 3 hits ( 0.01%) 60 bytes ( 0.01%)
OpEndPrimitive[219] = 3 hits ( 0.01%) 12 bytes ( 0.00%)
OpLogicalAnd[167] = 3 hits ( 0.01%) 60 bytes ( 0.01%)
OpUGreaterThanEqual[174] = 2 hits ( 0.01%) 40 bytes ( 0.01%)
OpConstantTrue[ 41] = 2 hits ( 0.01%) 24 bytes ( 0.01%)
OpFOrdLessThanEqual[188] = 2 hits ( 0.01%) 40 bytes ( 0.01%)
OpSampledImage[ 86] = 1 hits ( 0.00%) 20 bytes ( 0.00%)
OpConstantFalse[ 42] = 1 hits ( 0.00%) 12 bytes ( 0.00%)
OpFwidth[209] = 1 hits ( 0.00%) 16 bytes ( 0.00%)
OpSGreaterThan[173] = 1 hits ( 0.00%) 20 bytes ( 0.00%)
OpTypeSampler[ 26] = 1 hits ( 0.00%) 8 bytes ( 0.00%)
OpImageQuerySize[104] = 1 hits ( 0.00%) 16 bytes ( 0.00%)
OpConvertFToS[110] = 1 hits ( 0.00%) 16 bytes ( 0.00%)
OpKill[252] = 1 hits ( 0.00%) 4 bytes ( 0.00%)
OpConvertUToF[112] = 1 hits ( 0.00%) 16 bytes ( 0.00%)
OpImageSparseSampleImplicitLod[305] = 1 hits ( 0.00%) 28 bytes ( 0.01%)
OpImageSparseTexelsResident[316] = 1 hits ( 0.00%) 16 bytes ( 0.00%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment