First cut at new loop codegen.

Change-Id: Id3bdf8b7a5606e7ce5d856ef225d5ddbe59a584b
This commit is contained in:
Dejan Mircevski 2016-01-10 12:15:13 -05:00
parent c92e370e87
commit 9c6734c8df
4 changed files with 93 additions and 52 deletions

View file

@ -1753,6 +1753,19 @@ void Builder::endSwitch(std::vector<Block*>& /*segmentBlock*/)
switchMerges.pop();
}
Block& Builder::makeNewBlock()
{
Function& function = buildPoint->getParent();
auto block = new Block(getUniqueId(), function);
function.addBlock(block);
return *block;
}
Builder::LoopBlocks Builder::makeNewLoop()
{
return {makeNewBlock(), makeNewBlock(), makeNewBlock()};
}
// Comments in header
void Builder::makeNewLoop(bool loopTestFirst)
{