Commit graph

16 commits

Author SHA1 Message Date
965496b231 Optimizer - Fixed input handling 2017-12-23 17:29:52 +01:00
94b01e62b4 Optimizer - Started work on function inlining
For now:
* Option that triggers inlining
* Compute list of inline-able functions
2017-12-17 15:59:29 +01:00
ff50ba561a Optimizer - Dead store elimination
Works for variables and assets. Does not cover call arguments yet.
2017-12-17 09:33:45 +01:00
027d6a2f8d Optimizer - Removed unnecessary computations
The following computations will not be done if their results are cached:
* instruction numbering,
* control flow graph construction,
* use-define chains
2017-12-15 07:16:51 +01:00
cc519be077 Optimizer - UD chains - Function arguments
Function arguments are the simplest case for UD chains, as they are
immutable.
2017-12-10 15:25:51 +01:00
f37c0d0df3 Optimizer - Call bypass edges in CFG
It will make things simpler when walking the graph for locals.
2017-12-10 11:57:07 +01:00
cb42137592 Optimizer - Edge types in CFG
Control flow graph edges have been assigned a type, which may be either
FLOW (for normal edges), CALL (for edges that enter a function) or RET
(for edges that exit a function). In addition, call sites have an
additional FLOW edge that bypasses the function call.
2017-12-10 11:12:45 +01:00
ddad981055 Optimizer - Refactored CFG construction
Split the control flow graph construction function into multiple
functions. Doesn't add anything to the code, but makes it slightly less
unreadable.
2017-12-10 10:14:35 +01:00
61cd7719f1 Optimizer - WIP UD chain construction 2017-12-08 07:38:59 +01:00
f1ec2cf18c Optimizer - Gather variable/resource uses
First step to build the UD chains.
2017-12-03 23:15:44 +01:00
b6f9d06be0 Optimizer - Control flow graph construction 2017-12-03 18:35:56 +01:00
c7e4ccf67e Builder tool - Various, pre-constant propagation
+ Prepared flags for constant propagation
+ UI instructions removal in compiler
+ Various changes to test "demo"
2017-12-03 14:59:39 +01:00
3986bd5386 Builder tool - Logging 2017-12-02 12:18:31 +01:00
ffcf2917d5 Optimizer - Replace curve-less inputs with single default 2017-12-02 10:40:47 +01:00
f1b51f564d Optimizer - Errors when folding bad operations
Errors will be added to an array if the optimizer finds invalid
operations involving constants (e.g. (inv 0))
2017-12-02 10:07:14 +01:00
0175bed077 Optimizer - Began working on constant folding 2017-12-01 07:30:03 +01:00