Linker: Eliminate uncalled functions, because they can be ill-defined.

Fixes issue #610. Also provides a testing option to keep uncalled functions.
This commit is contained in:
John Kessenich
2016-12-09 19:22:20 -07:00
parent bf6d7f43fd
commit 906cc21816
68 changed files with 101 additions and 7783 deletions

View File

@@ -0,0 +1,25 @@
hlsl.deadFunctionMissingBody.vert
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 13
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 9
Name 4 "main"
Name 9 "@entryPointOutput"
Decorate 9(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(@entryPointOutput): 8(ptr) Variable Output
10: 6(float) Constant 0
11: 7(fvec4) ConstantComposite 10 10 10 10
4(main): 2 Function None 3
5: Label
Store 9(@entryPointOutput) 11
Return
FunctionEnd