Morgan Phillips
bdab73b0c7
Cargo-fmt fixes
2016-07-21 15:24:07 -07:00
Morgan Phillips
761fb54d8a
Add support for postorder traversal of the cfg.
2016-07-21 15:22:27 -07:00
Morgan Phillips
30eb25d013
Track predecessors as well as successors in the CFG
2016-07-21 12:36:51 -07:00
Morgan Phillips
2caa802f50
Use EntityMap instead of BTreeMap
2016-07-21 12:08:02 -07:00
Jakob Stoklund Olesen
89ba9626c7
Move IR modules under repr/.
...
Use the cretonne::repr module as a common namespace for sub-modules defining the
in-memory representation of Cretonn IL.
2016-07-19 14:10:30 -07:00
Jakob Stoklund Olesen
c1806d0ab0
Use DataFlowGraph in Function.
...
Replace the three tables instructions, extended_basic_blocks, and
extended_values with a single 'dfg' public member.
Clients using Function are changed to refer to func.layout and func.dfg
respectively.
2016-07-19 13:05:28 -07:00
Jakob Stoklund Olesen
8c58fe4631
Use EBB layout order almost everywhere.
...
The ebbs_numerically() function was a workaround for the unimplemented EBB layout
order.
2016-07-18 18:52:35 -07:00
Jakob Stoklund Olesen
e926674b4e
Replace inst_order with Layout in Function.
...
The Layout also handles EBB layout, so new append_ebb calls are necessary.
- Rewrite callers to use the public data member 'layout'.
- Implement Debug for Function in terms of the write module to avoid deriving
it.
2016-07-18 18:23:32 -07:00
Morgan Phillips
28c1eda4f6
Move test utility functions to their own module
2016-07-18 14:28:00 -07:00
Jakob Stoklund Olesen
99464bc29d
Implement EntityRef for most of the entities module.
...
The only exception is Value which has two dimensions.
2016-07-15 16:03:14 -07:00
Morgan Phillips
295a4eb03f
Replace Results with assertions in invariant cases.
...
It seems reasonable that certain non-recoverable errors during the building of the
CFG should crash.
2016-07-13 11:04:39 -07:00
Morgan Phillips
79c7ae6233
Remove misleading test comments
2016-07-12 14:46:24 -07:00
Morgan Phillips
180eae3bb5
Cargo-fmt fixes
2016-07-12 14:42:49 -07:00
Morgan Phillips
c6b1388fdc
Add a Control Flow Graph representation.
...
The CFG must be instantiated against an existing function but may be
modified after creation
2016-07-12 14:37:37 -07:00