summaryrefslogtreecommitdiff
path: root/src/jib/jib_optimize.mli
AgeCommit message (Collapse)Author
2019-10-25Refactor Jib IR pretty printerAlasdair Armstrong
2019-04-16SMT: Fix inlining issuesAlasdair Armstrong
2019-04-09SMT: Refactor Jib values to make inlining workAlasdair Armstrong
Had to change the hundreds and hundreds of places such values were used. However this now lets us automatically prove cheri-concentrate properties. Such as showing function prop_cap_round_trip(cap: bits(128)) -> bool = { let cap_rt = capToBits(capBitsToCapability(true, cap)); cap == cap_rt } is always true.
2019-03-19C: Inlining supportAlasdair Armstrong
Add a function Jib_optimize.inline which can inline functions. To make this more efficient, we can make identifiers unique on a per-function basis.
2019-03-13C: Improve Jib IR, add SSA representationAlasdair Armstrong
Add a CL_void l-expression so we don't have redundant unit-typed variables everywhere, and add an optimization in Jib_optimize called optimize_unit which introduces these. Remove the basic control-flow graph in Jib_util and add a new mutable control-flow graph type in Jib_ssa which allows the IR to be converted into SSA form. The mutable graph allows for more efficient updates, and includes both back and forwards references making it much more convenient to traverse. Having an SSA representation should make some optimizations much simpler, and is also probably more natural for SMT generation where variables have to be defined once using declare-const anyway. Debug option -ddump_flow_graphs now outputs SSA'd graphs of the functions in a specification.