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

@@ -546,120 +546,6 @@ ERROR: node is still EOpNull!
0:69 0.028000
0:69 0.500000
0:69 1.000000
0:78 Function Definition: foo( (global void)
0:78 Function Parameters:
0:? Sequence
0:81 move second child to first child (temp float)
0:81 direct index (temp float)
0:81 'a' (temp 3-element array of float)
0:81 Constant:
0:81 0 (const int)
0:81 Constant:
0:81 7.000000
0:82 Constant:
0:82 2 (const int)
0:83 Constant:
0:83 2147483647 (const int)
0:84 Constant:
0:84 inf
0:88 Constant:
0:88 2 (const uint)
0:88 3 (const uint)
0:89 Constant:
0:89 0 (const uint)
0:90 Constant:
0:90 6 (const uint)
0:90 7 (const uint)
0:103 Function Definition: foo2( (global void)
0:103 Function Parameters:
0:105 Sequence
0:105 direct index (temp float)
0:105 'a1' (global 1-element array of float)
0:105 Constant:
0:105 0 (const int)
0:106 direct index (temp float)
0:106 'a2' (global 2-element array of float)
0:106 Constant:
0:106 0 (const int)
0:107 direct index (temp float)
0:107 'a3' (global 4-element array of float)
0:107 Constant:
0:107 0 (const int)
0:108 direct index (temp float)
0:108 'a4' (global 2-element array of float)
0:108 Constant:
0:108 0 (const int)
0:109 Constant:
0:109 1.000000
0:110 Constant:
0:110 5.000000
0:111 Constant:
0:111 2.000000
0:112 Constant:
0:112 3.000000
0:113 Constant:
0:113 0.000000
0:114 Constant:
0:114 0.000000
0:116 move second child to first child (temp int)
0:116 'p' (temp int)
0:116 Constant:
0:116 2147483647 (const int)
0:117 move second child to first child (temp int)
0:117 'p' (temp int)
0:117 Constant:
0:117 -2147483648 (const int)
0:118 move second child to first child (temp int)
0:118 'p' (temp int)
0:118 Constant:
0:118 -2147483647 (const int)
0:119 Sequence
0:119 move second child to first child (temp float)
0:119 'f' (temp float)
0:119 Constant:
0:119 1.444000
0:120 move second child to first child (temp float)
0:120 'f' (temp float)
0:120 direct index (temp float)
0:120 Construct vec4 (temp 4-component vector of float)
0:120 Test condition and select (temp float)
0:120 Condition
0:120 Compare Less Than (temp bool)
0:120 direct index (temp float)
0:120 'inv' (smooth in 4-component vector of float)
0:120 Constant:
0:120 0 (const int)
0:120 Constant:
0:120 2.400000
0:120 true case
0:120 Constant:
0:120 -1.000000
0:120 false case
0:120 Constant:
0:120 1.000000
0:120 Constant:
0:120 3 (const int)
0:126 Function Definition: foo3( (global void)
0:126 Function Parameters:
0:128 Sequence
0:128 Sequence
0:128 move second child to first child (temp 3X2 matrix of float)
0:128 'r32' (temp 3X2 matrix of float)
0:128 Constant:
0:128 43.000000
0:128 64.000000
0:128 51.000000
0:128 76.000000
0:128 59.000000
0:128 88.000000
0:138 Function Definition: foo4( (global void)
0:138 Function Parameters:
0:140 Sequence
0:140 Sequence
0:140 move second child to first child (temp int)
0:140 'a' (temp int)
0:140 Constant:
0:140 9 (const int)
0:? Linker Objects
0:? 'a' (const int)
0:? 1 (const int)