microsoft / DirectXShaderCompiler
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 3,744 files with 1,466,640 lines of code.
    • 337 very long files (843,309 lines of code)
    • 337 long files (234,116 lines of code)
    • 705 medium size files (227,607 lines of codeclsfd_ftr_w_mp_ins)
    • 600 small files (86,621 lines of code)
    • 1,765 very small files (74,987 lines of code)
57% | 15% | 15% | 5% | 5%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
cpp64% | 15% | 13% | 4% | 2%
h36% | 17% | 21% | 11% | 12%
c84% | 4% | 5% | <1% | 5%
cs60% | 18% | 13% | 4% | 2%
py40% | 12% | 23% | 12% | 11%
cc49% | 31% | 14% | 0% | 4%
cmake0% | 46% | 14% | 11% | 27%
inc0% | 30% | 54% | 3% | 11%
hpp0% | 100% | 0% | 0% | 0%
js0% | 87% | 0% | 0% | 12%
cmd0% | 26% | 53% | 6% | 12%
inl0% | 0% | 100% | 0% | 0%
natvis0% | 0% | 100% | 0% | 0%
hlsl0% | 0% | 37% | 32% | 30%
in0% | 0% | 46% | 12% | 40%
pl0% | 0% | 65% | 0% | 34%
man0% | 0% | 58% | 41% | 0%
el0% | 0% | 58% | 41% | 0%
yml0% | 0% | 0% | 50% | 49%
TXT0% | 0% | 0% | 0% | 100%
targets0% | 0% | 0% | 0% | 100%
hlsli0% | 0% | 0% | 0% | 100%
applescript0% | 0% | 0% | 0% | 100%
cfg0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
tools/clang69% | 11% | 10% | 4% | 3%
lib/CodeGen56% | 20% | 14% | 5% | 2%
lib/Transforms55% | 24% | 13% | 4% | 2%
lib/HLSL68% | 11% | 13% | 3% | 2%
utils/unittest63% | 25% | 6% | 2% | 2%
lib/Analysis50% | 17% | 21% | 7% | 3%
lib/IR57% | 24% | 10% | 4% | 2%
utils/TableGen53% | 23% | 16% | 4% | 2%
include/llvm11% | 18% | 36% | 16% | 16%
projects/dxilconv77% | 14% | 3% | 1% | 3%
lib/Support35% | 23% | 23% | 7% | 10%
include/dxc41% | 19% | 20% | 8% | 9%
tools/llvm-objdump93% | 0% | 4% | 0% | 1%
lib/Miniz99% | 0% | 0% | 0% | <1%
lib/Bitcode83% | 7% | 5% | 1% | 1%
lib/MC31% | 43% | 11% | 5% | 7%
lib/DXIL50% | 19% | 24% | 3% | 2%
lib/AsmParser75% | 12% | 6% | 3% | 1%
lib/ExecutionEngine36% | 11% | 27% | 16% | 8%
utils/hct44% | 20% | 22% | 5% | 7%
lib/TableGen75% | 0% | 13% | 3% | 7%
lib/DxrFallback59% | 23% | 8% | 6% | 2%
lib/Object50% | 11% | 23% | 4% | 9%
unittests/Support35% | 7% | 27% | 16% | 12%
tools/llvm-readobj41% | 27% | 21% | 1% | 6%
unittests/ADT23% | 29% | 27% | 10% | 9%
unittests/IR32% | 0% | 53% | 5% | 7%
lib/DxilDia24% | 17% | 35% | 11% | 10%
tools/dsymutil71% | 0% | 0% | 20% | 8%
lib/DxilContainer83% | 0% | 0% | 8% | 8%
lib/DxcSupport41% | 29% | 24% | 0% | 4%
lib/Linker100% | 0% | 0% | 0% | 0%
tools/llvm-nm100% | 0% | 0% | 0% | 0%
lib/DxilPIXPasses0% | 55% | 28% | 11% | 4%
lib/DebugInfo0% | 34% | 31% | 8% | 25%
cmake/modules0% | 47% | 7% | 13% | 31%
include/llvm-c0% | 51% | 0% | 21% | 26%
utils/FileCheck0% | 100% | 0% | 0% | 0%
lib/DxilRootSignature0% | 43% | 46% | 8% | 1%
include/miniz0% | 100% | 0% | 0% | 0%
tools/llvm-size0% | 100% | 0% | 0% | 0%
tools/llvm-bcanalyzer0% | 100% | 0% | 0% | 0%
unittests/Analysis0% | 45% | 27% | 13% | 13%
utils/llvm-build0% | 60% | 34% | 0% | 4%
tools/llvm-stress0% | 100% | 0% | 0% | 0%
cmake0% | 100% | 0% | 0% | 0%
unittests/CodeGen0% | 100% | 0% | 0% | 0%
lib/ProfileData0% | 0% | 77% | 12% | 10%
utils/lit0% | 0% | 45% | 35% | 19%
lib/LTO0% | 0% | 100% | 0% | 0%
tools/yaml2obj0% | 0% | 91% | 0% | 8%
lib/Fuzzer0% | 0% | 60% | 19% | 20%
tools/lli0% | 0% | 47% | 31% | 20%
lib/Option0% | 0% | 69% | 20% | 9%
tools/llvm-cov0% | 0% | 41% | 27% | 30%
tools/obj2yaml0% | 0% | 85% | 0% | 14%
utils0% | 0% | 41% | 22% | 36%
tools/llvm-cxxdump0% | 0% | 89% | 0% | 10%
tools/llvm-rtdyld0% | 0% | 100% | 0% | 0%
tools/llvm-diff0% | 0% | 54% | 18% | 27%
lib/MSSupport0% | 0% | 100% | 0% | 0%
tools/llvm-symbolizer0% | 0% | 66% | 33% | 0%
tools/opt0% | 0% | 59% | 0% | 40%
tools/llvm-pdbdump0% | 0% | 30% | 27% | 42%
tools/llvm-mc0% | 0% | 71% | 24% | 3%
tools/verify-uselistorder0% | 0% | 100% | 0% | 0%
utils/KillTheDoctor0% | 0% | 100% | 0% | 0%
lib/Target0% | 0% | 48% | 34% | 16%
utils/PerfectShuffle0% | 0% | 100% | 0% | 0%
lib/DxcBindingTable0% | 0% | 100% | 0% | 0%
unittests/DebugInfo0% | 0% | 78% | 0% | 21%
tools/macho-dump0% | 0% | 100% | 0% | 0%
unittests/Transforms0% | 0% | 43% | 40% | 16%
tools/dxexp0% | 0% | 100% | 0% | 0%
lib/Passes0% | 0% | 100% | 0% | 0%
tools/llc0% | 0% | 100% | 0% | 0%
tools/llvm-config0% | 0% | 96% | 0% | 3%
tools/lto0% | 0% | 96% | 0% | 3%
unittests/ProfileData0% | 0% | 75% | 0% | 24%
tools/llvm-profdata0% | 0% | 100% | 0% | 0%
unittests/Bitcode0% | 0% | 85% | 0% | 14%
tools/llvm-extract0% | 0% | 100% | 0% | 0%
tools/llvm-lto0% | 0% | 100% | 0% | 0%
utils/yaml-bench0% | 0% | 0% | 100% | 0%
lib/PassPrinters0% | 0% | 0% | 100% | 0%
unittests/Option0% | 0% | 0% | 100% | 0%
tools/llvm-dis0% | 0% | 0% | 100% | 0%
unittests/Linker0% | 0% | 0% | 100% | 0%
projects/include0% | 0% | 0% | 100% | 0%
tools/llvm-mcmarkup0% | 0% | 0% | 100% | 0%
tools/llvm-link0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 49% | 50%
utils/release0% | 0% | 0% | 54% | 45%
tools/llvm-c-test0% | 0% | 0% | 23% | 76%
unittests/MC0% | 0% | 0% | 0% | 100%
utils/lint0% | 0% | 0% | 0% | 100%
tools/llvm-dwarfdump0% | 0% | 0% | 0% | 100%
utils/version0% | 0% | 0% | 0% | 100%
lib/IRReader0% | 0% | 0% | 0% | 100%
cmake/platforms0% | 0% | 0% | 0% | 100%
tools/llvm-as0% | 0% | 0% | 0% | 100%
tools/msbuild0% | 0% | 0% | 0% | 100%
utils/testgen0% | 0% | 0% | 0% | 100%
azure-pipelines0% | 0% | 0% | 0% | 100%
unittests/AsmParser0% | 0% | 0% | 0% | 100%
utils/not0% | 0% | 0% | 0% | 100%
utils/llvm-lit0% | 0% | 0% | 0% | 100%
utils/count0% | 0% | 0% | 0% | 100%
utils/fpcmp0% | 0% | 0% | 0% | 100%
cmake/caches0% | 0% | 0% | 0% | 100%
tools/llvm-shlib0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
SemaHLSL.cpp
in tools/clang/lib/Sema
11000 249
altivec.h
in tools/clang/lib/Headers
10642 1912
SemaExpr.cpp
in tools/clang/lib/Sema
10281 273
SemaDecl.cpp
in tools/clang/lib/Sema
9707 185
DAGCombiner.cpp
in lib/CodeGen/SelectionDAG
9643 201
SpirvEmitter.cpp
in tools/clang/lib/SPIRV
9396 82
FormatTest.cpp
in tools/clang/unittests/Format
9342 9
SemaDeclCXX.cpp
in tools/clang/lib/Sema
9240 200
SemaOverload.cpp
in tools/clang/lib/Sema
8395 153
TreeTransform.h
in tools/clang/lib/Sema
7979 210
ExecutionTest.cpp
in tools/clang/unittests/HLSL
7824 144
MachODump.cpp
in tools/llvm-objdump
7678 161
vecintrin.h
in tools/clang/lib/Headers
7210 -
Tools.cpp
in tools/clang/lib/Driver
7124 150
SemaChecking.cpp
in tools/clang/lib/Sema
7112 217
ExprConstant.cpp
in tools/clang/lib/AST
7103 366
HLOperationLower.cpp
in lib/HLSL
6797 72
ASTReader.cpp
in tools/clang/lib/Serialization
6629 218
ASTContext.cpp
in tools/clang/lib/AST
6483 199
CGBuiltin.cpp
in tools/clang/lib/CodeGen
6251 5
miniz.c
in lib/Miniz
6203 160
Targets.cpp
in tools/clang/lib/Basic
6169 279
RewriteModernObjC.cpp
in tools/clang/lib/Frontend/Rewrite
6008 134
SelectionDAGBuilder.cpp
in lib/CodeGen/SelectionDAG
5921 137
CIndex.cpp
in tools/clang/tools/libclang
5892 358
ScalarEvolution.cpp
in lib/Analysis
5784 102
DxbcConverter.cpp
in projects/dxilconv/lib/DxbcConverter
5684 68
SemaCodeComplete.cpp
in tools/clang/lib/Sema
5624 147
SemaInit.cpp
in tools/clang/lib/Sema
5544 96
SemaTemplate.cpp
in tools/clang/lib/Sema
5542 105
Sema.h
in tools/clang/include/clang/Sema
5505 80
DxilInstructions.h
in include/dxc/DXIL
5421 1603
SelectionDAG.cpp
in lib/CodeGen/SelectionDAG
5419 183
SemaOpenMP.cpp
in tools/clang/lib/Sema
5355 148
CGHLSLMS.cpp
in tools/clang/lib/CodeGen
5172 94
DxilValidation.cpp
in lib/HLSL
5152 114
SemaType.cpp
in tools/clang/lib/Sema
4947 132
ParseDecl.cpp
in tools/clang/lib/Parse
4914 80
TargetInfo.cpp
in tools/clang/lib/CodeGen
4828 171
ScalarReplAggregatesHLSL.cpp
in lib/Transforms/Scalar
4756 115
ASTImporter.cpp
in tools/clang/lib/AST
4649 80
CGObjCMac.cpp
in tools/clang/lib/CodeGen
4589 54
RewriteObjC.cpp
in tools/clang/lib/Frontend/Rewrite
4582 97
SemaExprCXX.cpp
in tools/clang/lib/Sema
4564 95
gtest-param-util-generated.h
in utils/unittest/googletest/include/gtest/internal
4562 105
ASTWriter.cpp
in tools/clang/lib/Serialization
4439 220
LLParser.cpp
in lib/AsmParser
4379 152
SemaDeclAttr.cpp
in tools/clang/lib/Sema
4319 184
BitcodeReader.cpp
in lib/Bitcode/Reader
4106 87
ASTMatchersTest.cpp
in tools/clang/unittests/ASTMatchers
4037 18
Files With Most Units (Top 20)
File# lines# units
altivec.h
in tools/clang/lib/Headers
10642 1912
DxilInstructions.h
in include/dxc/DXIL
5421 1603
Expr.h
in tools/clang/include/clang/AST
2960 599
Type.h
in tools/clang/include/clang/AST
3322 560
Core.cpp
in lib/IR
2307 437
ExprCXX.h
in tools/clang/include/clang/AST
2166 388
ExprConstant.cpp
in tools/clang/lib/AST
7103 366
CIndex.cpp
in tools/clang/tools/libclang
5892 358
Decl.h
in tools/clang/include/clang/AST
2118 356
Stmt.h
in tools/clang/include/clang/AST
1447 327
Instructions.h
in include/llvm/IR
2614 325
gmock-matchers.h
in utils/unittest/googlemock/include/gmock
2747 305
SpirvInstruction.h
in tools/clang/include/clang/SPIRV
1803 279
Targets.cpp
in tools/clang/lib/Basic
6169 279
SemaExpr.cpp
in tools/clang/lib/Sema
10281 273
DeclObjC.h
in tools/clang/include/clang/AST
1611 272
TypeLoc.h
in tools/clang/include/clang/AST
1487 272
gtest.cc
in utils/unittest/googletest/src
3440 257
d3dx12.h
in include/dxc/Support
3105 249
SemaHLSL.cpp
in tools/clang/lib/Sema
11000 249
Files With Long Lines (Top 20)

There are 241 files with lines longer than 120 characters. In total, there are 3225 long lines.

File# lines# units# long lines
hctdb.py
in utils/hct
2784 45 435
miniz.c
in lib/Miniz
6203 160 356
DxilOperations.cpp
in lib/DXIL
1315 30 254
runtime.h
in lib/DxrFallback
1740 77 245
ExecutionTest.cpp
in tools/clang/unittests/HLSL
7824 144 110
d3d12TokenizedProgramFormat.hpp
in include/dxc/Support
854 - 83
d3dx12.h
in include/dxc/Support
3105 249 77
SemaHLSL.cpp
in tools/clang/lib/Sema
11000 249 72
HLOperationLower.cpp
in lib/HLSL
6797 72 68
natvis
clang.natvis
in tools/clang/utils
375 - 66
DxilInstructions.h
in include/dxc/DXIL
5421 1603 62
ValidationTest.cpp
in tools/clang/unittests/HLSL
3533 52 57
HLSLRootSignature.cpp
in tools/clang/lib/Parse
1452 41 50
miniz.h
in include/miniz
709 - 47
DxilDiaSymbolManager.cpp
in lib/DxilDia
1819 114 47
DxilPatchShaderRecordBindings.cpp
in lib/HLSL
945 31 43
StateFunctionTransform.cpp
in lib/DxrFallback
1367 50 38
MSFileSystemBasic.cpp
in lib/Support
951 103 38
inl
DxilSigPoint.inl
in include/dxc/DXIL
208 4 37
ASTContextHLSL.cpp
in tools/clang/lib/AST
997 31 34