CFG: force the creation of a predecessor entry for all basic block.
authorVictor Lomuller <victor@codeplay.com>
Thu, 18 Jan 2018 08:51:12 +0000 (08:51 +0000)
committerDavid Neto <dneto@google.com>
Thu, 18 Jan 2018 15:22:00 +0000 (10:22 -0500)
commit0b1372a8cac7ef5d86d91ecef2a9c3de91d9fabd
tree2640f1f11030a17d8cf4d5ec567eb150fa1a6c50
parent3604c0b71d1a5845895935502ebe663be3fd2b63
CFG: force the creation of a predecessor entry for all basic block.

This ensure that all basic blocks in a function have a valid entry the CFG object.

The entry block has no predecessors but remains a valid basic block
for which we might want to query the number of predecessors.
Some unreachable basic blocks may not have predecessors as well.
source/opt/cfg.cpp