diff options
author | chriseth <chris@ethereum.org> | 2018-10-17 23:22:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 23:22:46 +0800 |
commit | c6a6e9ac5d91a0b45eafa4a6ac10fa3e8b3c6ad2 (patch) | |
tree | f5550eb185d22fce5027d76496396163420c88bc /libyul/optimiser/Metrics.cpp | |
parent | fb0ec1c562d1b23f20c76d2d0f818db4e89199c3 (diff) | |
parent | 9fb5feed0513012aed38d45ccdb421e5b8d96838 (diff) | |
download | dexon-solidity-c6a6e9ac5d91a0b45eafa4a6ac10fa3e8b3c6ad2.tar.gz dexon-solidity-c6a6e9ac5d91a0b45eafa4a6ac10fa3e8b3c6ad2.tar.zst dexon-solidity-c6a6e9ac5d91a0b45eafa4a6ac10fa3e8b3c6ad2.zip |
Merge pull request #5232 from ethereum/inlineHeuristic
[Yul] Add simple inlining heuristic
Diffstat (limited to 'libyul/optimiser/Metrics.cpp')
-rw-r--r-- | libyul/optimiser/Metrics.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libyul/optimiser/Metrics.cpp b/libyul/optimiser/Metrics.cpp index eb2d39e8..066c6b58 100644 --- a/libyul/optimiser/Metrics.cpp +++ b/libyul/optimiser/Metrics.cpp @@ -39,6 +39,13 @@ size_t CodeSize::codeSize(Expression const& _expression) return cs.m_size; } +size_t CodeSize::codeSize(Block const& _block) +{ + CodeSize cs; + cs(_block); + return cs.m_size; +} + void CodeSize::visit(Statement const& _statement) { ++m_size; |