diff options
author | John Hodge <tpg@mutabah.net> | 2016-08-20 14:31:27 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-08-20 14:31:27 +0800 |
commit | 2d10f135e8c6455feab799dedc38e2b3b70fe89c (patch) | |
tree | 3786928de068ce3f0788e764708b39a58c71cbea /src/mir/from_hir.cpp | |
parent | cdd3562534e16e8e6678f841958cdcf0c26b267c (diff) | |
download | mrust-2d10f135e8c6455feab799dedc38e2b3b70fe89c.tar.gz |
MIR Gen - Add logging
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r-- | src/mir/from_hir.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp index 800398b7..f54ead5a 100644 --- a/src/mir/from_hir.cpp +++ b/src/mir/from_hir.cpp @@ -1348,6 +1348,7 @@ void MirBuilder::set_cur_block(unsigned int new_block) if( m_block_active ) { BUG(Span(), "Updating block when previous is active"); } + DEBUG("BB" << new_block << " START"); m_current_block = new_block; m_block_active = true; } @@ -1356,6 +1357,7 @@ void MirBuilder::end_block(::MIR::Terminator term) if( !m_block_active ) { BUG(Span(), "Terminating block when none active"); } + DEBUG("BB" << m_current_block << " END -> " << term); m_output.blocks.at(m_current_block).terminator = mv$(term); m_block_active = false; m_current_block = 0; @@ -1365,12 +1367,14 @@ void MirBuilder::pause_cur_block() if( !m_block_active ) { BUG(Span(), "Pausing block when none active"); } + DEBUG("BB" << m_current_block << " PAUSE"); m_block_active = false; m_current_block = 0; } ::MIR::BasicBlockId MirBuilder::new_bb_linked() { auto rv = new_bb_unlinked(); + DEBUG("BB" << rv); end_block( ::MIR::Terminator::make_Goto(rv) ); set_cur_block(rv); return rv; @@ -1378,6 +1382,7 @@ void MirBuilder::pause_cur_block() ::MIR::BasicBlockId MirBuilder::new_bb_unlinked() { auto rv = m_output.blocks.size(); + DEBUG("BB" << rv); m_output.blocks.push_back({}); return rv; } |