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

@@ -446,71 +446,6 @@ ERROR: node is still EOpNull!
0:58 1 (const int)
0:58 Constant:
0:58 4 (const int)
0:68 Function Definition: foo( (global void)
0:68 Function Parameters:
0:? Sequence
0:71 move second child to first child (temp int)
0:71 direct index (temp int)
0:71 'uns' (temp 4-element array of int)
0:71 Constant:
0:71 3 (const int)
0:71 Constant:
0:71 40 (const int)
0:72 move second child to first child (temp int)
0:72 direct index (temp int)
0:72 'uns' (temp 4-element array of int)
0:72 Constant:
0:72 1 (const int)
0:72 Constant:
0:72 30 (const int)
0:73 move second child to first child (temp 3-component vector of float)
0:73 direct index (temp 3-component vector of float)
0:73 'guns' (global 8-element array of 3-component vector of float)
0:73 Constant:
0:73 2 (const int)
0:73 Constant:
0:73 2.400000
0:73 2.400000
0:73 2.400000
0:76 Constant:
0:76 0.000000
0:79 Function Definition: foo2( (global implicitly-sized array of float)
0:79 Function Parameters:
0:? Sequence
0:82 Branch: Return with expression
0:82 'f' (temp 1-element array of float)
0:84 Branch: Return with expression
0:84 'g' (temp 9-element array of float)
0:89 Function Definition: foo3( (global void)
0:89 Function Parameters:
0:? Sequence
0:92 move second child to first child (temp float)
0:92 direct index (temp float)
0:92 'resize1' (temp 3-element array of float)
0:92 Constant:
0:92 2 (const int)
0:92 Constant:
0:92 4.000000
0:93 Constant:
0:93 1 (const int)
0:95 Constant:
0:95 3 (const int)
0:98 move second child to first child (temp float)
0:98 direct index (temp float)
0:98 'resize2' (temp 5-element array of float)
0:98 Constant:
0:98 5 (const int)
0:98 Constant:
0:98 4.000000
0:100 Constant:
0:100 5 (const int)
0:101 move second child to first child (temp float)
0:101 direct index (temp float)
0:101 'resize2' (temp 5-element array of float)
0:101 Constant:
0:101 5 (const int)
0:101 Constant:
0:101 4.000000
0:106 Sequence
0:106 move second child to first child (temp float)
0:106 'b' (global float)