summaryrefslogtreecommitdiff
path: root/src/ast/LocalGraph.cpp
Commit message (Collapse)AuthorAgeFilesLines
* notation change: AST => IR (#1245)Alon Zakai2017-10-241-273/+0
| | | The IR is indeed a tree, but not an "abstract syntax tree" since there is no language for which it is the syntax (except in the most trivial and meaningless sense).
* fix ssaify bug where we failed to update the location of values as we moved ↵Alon Zakai2017-10-111-0/+13
| | | | them around, causing us to zero out the wrong thing in another place and ensuing hilarity (#1212)
* precompute-propagate pass (#1179)Alon Zakai2017-09-121-0/+260
Implements #1172: this adds a variant of precompute, "precompute-propagate", which also does constant propagation. Precompute by itself just runs the interpreter on each expression and sees if it is in fact a constant; precompute-propagate also looks at the graph of connections between get and set locals, and propagates those constant values. This helps with cases as noticed in #1168 - while in most cases LLVM will do this already, it's important when inlining, e.g. inlining of the clamping math functions. This new pass is run when inlining, and otherwise only in -O3/-Oz, as it does increase compilation time noticeably if run on everything (and for almost no benefit if LLVM has run). Most of the code here is just refactoring out from the ssa pass the get/set graph computation, so it can now be used by both the ssa pass and precompute-propagate.