nevillegrech / gigahorse-toolchain

A binary lifter and analysis framework for Ethereum smart contracts
Other
295 stars 61 forks source link

Small fixes to improve results for bytecode generated using the `--via-ir` pipeline #66

Closed sifislag closed 1 year ago

sifislag commented 1 year ago

The --via-ir pipeline allows for much deeper optimizations to be performed, it will require a lot of work to improve our output for it. This PR includes a couple of small improvements:

I benchmarked the changes on a dataset of 372 smart contracts compiled with solc 0.8.17 using --via-ir:

ANALYTIC: Analytics_NonModeledMSTORE
config1: 38985
config2: 24964
config1(both): 38347
config2(both): 24454

ANALYTIC: Analytics_NonModeledSSTORE
config1: 3166
config2: 1842
config1(both): 2882
config2(both): 1634

ANALYTIC: Analytics_PublicFunctionArrayArg
config1: 1275
config2: 1627
config1(both): 1233
config2(both): 1585

ANALYTIC: Analytics_NonModeledMLOAD
config1: 17944
config2: 13625
config1(both): 17484
config2(both): 13165

ANALYTIC: Analytics_NonModeledSLOAD
config1: 5839
config2: 2768
config1(both): 5520
config2(both): 2528

ANALYTIC: Analytics_PublicFunctionArg
config1: 10247
config2: 10861
config1(both): 10058
config2(both): 10672