IrLoader gracefully handles incomplete blocks and functions
authorDavid Neto <dneto@google.com>
Thu, 25 Aug 2016 20:42:36 +0000 (16:42 -0400)
committerDavid Neto <dneto@google.com>
Fri, 26 Aug 2016 14:15:15 +0000 (10:15 -0400)
commitcc60caba1d2fc8c0594f7e09c5176022d08ba695
treead0546146ff9288f631fd93f09a93144ff01a8ea
parent53013cc816328f1e3ce8370f46635f832993948e
IrLoader gracefully handles incomplete blocks and functions

This lets us write smaller test cases with the IrLoader, avoiding
boilerplate for function begin/end, and basic block begin/end.

Also ForEachInst is more forgiving of cases where a basic block
doesn't have a label, and when a function doesn't have a defining
or end instruction.
source/opt/basic_block.h
source/opt/function.cpp
source/opt/ir_loader.cpp
source/opt/ir_loader.h
test/opt/test_ir_loader.cpp