diff options
author | chriseth <c@ethdev.com> | 2015-05-05 23:45:58 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-05-06 18:55:18 +0800 |
commit | bebe76828a6c8ccfc3e61a066a43530f715aeee9 (patch) | |
tree | f585130864b832c2b1fedefe5eac3f1851854c3e /Assembly.cpp | |
parent | 85673ff00cc8c0c21209080fb327c7deda69883a (diff) | |
download | dexon-solidity-bebe76828a6c8ccfc3e61a066a43530f715aeee9.tar.gz dexon-solidity-bebe76828a6c8ccfc3e61a066a43530f715aeee9.tar.zst dexon-solidity-bebe76828a6c8ccfc3e61a066a43530f715aeee9.zip |
CFG returns vector of blocks instead of assembly items.
Diffstat (limited to 'Assembly.cpp')
-rw-r--r-- | Assembly.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Assembly.cpp b/Assembly.cpp index aec06aef..9530ded4 100644 --- a/Assembly.cpp +++ b/Assembly.cpp @@ -318,7 +318,10 @@ Assembly& Assembly::optimise(bool _enable) copt << "Performing control flow analysis..."; { ControlFlowGraph cfg(m_items); - AssemblyItems optItems = cfg.optimisedItems(); + AssemblyItems optItems; + for (BasicBlock const& block: cfg.optimisedBlocks()) + copy(m_items.begin() + block.begin, m_items.begin() + block.end, + back_inserter(optItems)); if (optItems.size() < m_items.size()) { copt << "Old size: " << m_items.size() << ", new size: " << optItems.size(); |