Jakob Stoklund Olesen
a9056f699e
Rename the 'cfg' module to 'flowgraph'.
...
The 'cfg' name was easy to confuse with 'configuration'.
2017-03-21 15:33:23 -07:00
Angus Holder
d383a41851
Verify that all predecessors to an EBB are valid branches, and have the EBB recorded as a successor.
2017-03-20 08:41:11 -07:00
Angus Holder
8b300a9efb
Verify that values are defined by an EBB/instruction that dominates the instruction that uses them.
2017-03-20 08:41:11 -07:00
Angus Holder
c50bf2aa68
Verify that values have a valid reference to either an instruction inserted in an EBB, or an EBB inserted in the layout.
2017-03-20 08:41:11 -07:00
Jakob Stoklund Olesen
010861d58e
Upgrade to rustfmt 0.8.0.
...
Lots of changes this time.
Worked around what looks like a rustfmt bug in parse_inst_operands where
a large match was nested inside Ok().
2017-03-14 10:48:05 -07:00
Angus Holder
477fb4d5da
Expanded instruction integrity checking in the verifier, now verifying result types and entity references.
2017-03-14 09:12:33 -07:00
rep-nop
b23f1fb347
Converts all try! macros to ? syntax.
...
Fixes #46
2017-02-26 07:50:55 -08:00
Angus Holder
e002011602
Removed the Opcode::NotAnOpcode variant, replaced its uses with Option<Opcode>, and used the NonZero optimization to maintain the small 1-byte size of an optional Opcode.
2017-02-22 10:22:08 -08:00
Jakob Stoklund Olesen
f8e4d4e839
Speling.
2017-02-03 12:49:40 -08:00
Jakob Stoklund Olesen
bdc0f53c91
Use PackedOption<Inst> in the Layout implementation.
...
This also revealed that the last_inst() method should return an Option.
2017-01-19 14:26:47 -08:00
Dominik Inführ
de0ea36942
remove old is_terminating function
...
for InstructionData. Use generated `is_terminator()` for `Opcode`
instead. `is_terminator`, `can_trap` and `is_branch` functions are now
public.
fix syntax error
2016-12-07 10:16:01 -10:00
Jakob Stoklund Olesen
80823b5fc4
Require documentation on cretonne public items.
2016-10-26 19:10:06 -07:00
Jakob Stoklund Olesen
846db00a21
Move library crates under 'lib/'.
...
Give these crates each a more standard directory layout with sources in
a 'src' sub-sirectory and Cargo.toml in the top lib/foo directory.
Add license and description fields to each.
The build script for the cretonne crate now lives in
'lib/cretonne/build.rs' separating it from the normal library sources
under 'lib/cretonne/src'.
2016-10-17 14:44:43 -07:00