Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiments with jumpdest analysis #826

Draft
wants to merge 73 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
823dcbe
bench: Add internal benchmarks for jumpdest map build
chfast Nov 11, 2020
4e3a489
test: Add evmone:experimental library
chfast Nov 13, 2020
fc034e2
test: Add procedure to find PUSHn in 8 bytes at once
chfast Nov 13, 2020
8af82b5
test: Add jumpdest analysis differential test
chfast Nov 13, 2020
6ae6a4f
test: Add experimental jumpdest analysis
chfast Nov 13, 2020
56ca120
test: Add experimental optimized jumpdest analysis
chfast Nov 13, 2020
34fcda4
fuzz: Add jumpdest analysis fuzzer
chfast Nov 13, 2020
7869863
experimental: Add internal code form of jumpdest map
chfast Nov 13, 2020
0dc6a97
experimental: Different implementation
chfast Nov 13, 2020
16b704c
experimental: Fix find_first_push procedures
chfast Nov 13, 2020
bdd6811
experimental: Rework build_internal_code_v2
chfast Nov 13, 2020
37c50aa
experimental: Search PUSHes by 8 bytes
chfast Nov 13, 2020
f692997
experimental: Add new impl
chfast Nov 14, 2020
7f55396
Analyze PUSH distribution
chfast Apr 13, 2021
f2ea730
SIMD1 analysis prototype
chfast Apr 19, 2021
458c801
"vectorize" by 32
chfast Apr 20, 2021
46e09bb
Use bitset
chfast Apr 20, 2021
8624d1c
Use AVX2 to find JUMPDESTs
chfast Apr 20, 2021
c9186a3
Fixup tail
chfast Apr 20, 2021
0022e20
Use bitset32
chfast Apr 20, 2021
8b28451
Clear pushdata by words
chfast Apr 20, 2021
1cc2537
Duplicate SIMD1 -> SIMD2
chfast Apr 20, 2021
8c37948
Change SIMD2
chfast Apr 20, 2021
71e83c4
SIMD: use aligned load (unsafe)
chfast Apr 21, 2021
5ac869d
SIMD2: Alternative push find
chfast Apr 21, 2021
89ae8ea
SIMD2: Alternative push find
chfast Apr 21, 2021
d50a1a1
Move to SIMD3
chfast Apr 21, 2021
c61a7fb
Change is_push
chfast Apr 21, 2021
50501ca
JUMPDEST unlikely
chfast Apr 21, 2021
1553376
Add new vec version
chfast Apr 22, 2021
9a0f8ef
First version of STTNI version
chfast Apr 26, 2021
08d9cbc
Add new str_avx2 impl
chfast Apr 27, 2021
31e2fca
Add new by byte optimized impl
chfast Apr 27, 2021
05d3127
Improve str implementation
chfast Apr 27, 2021
e94c202
New impl: process whole mask (32 bits)
chfast Apr 27, 2021
234cfbf
ver 2
chfast Apr 27, 2021
e0f7328
ver 3
chfast Apr 27, 2021
3f03ae6
mask2 version
chfast Apr 28, 2021
9a9d29a
Add 2 more contracts to the internal bench
chfast Apr 28, 2021
09d6c61
mask2 impl
chfast Apr 28, 2021
f5b1166
opt build_pushdata_mask
chfast Apr 28, 2021
cc19009
opt build_pushdata_mask
chfast Apr 28, 2021
bd26d54
cmake: remove files
chfast Feb 28, 2024
f78852b
fix build
chfast Feb 28, 2024
28e7564
add missing evmc
chfast Feb 28, 2024
1a54eda
move code
chfast Feb 28, 2024
a776a61
build fixes
chfast Feb 28, 2024
e643354
bench: add bytes rate
chfast Feb 28, 2024
24e2e46
simd4
chfast Feb 28, 2024
da4ee97
test
chfast Feb 28, 2024
fac5682
fuzz
chfast Feb 28, 2024
1530adc
bench
chfast Feb 28, 2024
239c6d3
fix simd4
chfast Feb 29, 2024
75328c2
avx2_mask_v2
chfast Feb 29, 2024
a10f88f
fix gcc build
chfast Feb 29, 2024
66ec0f1
precompute dl with avx
chfast Feb 29, 2024
a6f7a91
precompute more
chfast Feb 29, 2024
8ba767d
fix build
chfast Oct 9, 2024
b3f9b6a
add baseline analysis
chfast Oct 11, 2024
b9065e4
type tests
chfast Oct 11, 2024
75adf91
wrap official
chfast Oct 11, 2024
04fab22
rework benchmarks
chfast Oct 11, 2024
8b8dae5
remove reduntant impls
chfast Oct 11, 2024
f68c1be
rename jda reference
chfast Oct 12, 2024
5391e0b
clean up tests
chfast Oct 12, 2024
0d8165d
speculate jda
chfast Oct 12, 2024
ca77b35
bench
chfast Oct 12, 2024
8528a4a
add more bench cases
chfast Oct 12, 2024
bfa0669
add test bytecodes
chfast Oct 12, 2024
680b6d9
clean up bench bytecodes
chfast Oct 12, 2024
f594350
10 bytecodes
chfast Oct 12, 2024
138632b
cleanups
chfast Oct 13, 2024
1d2b9b6
cleanups
chfast Oct 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/evmone/instructions_opcodes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace evmone
///
/// This is not enum class because we want implicit conversion to integers,
/// e.g. for usage as an array index.
enum Opcode : uint8_t
enum Opcode : unsigned char
{
OP_STOP = 0x00,
OP_ADD = 0x01,
Expand Down
3 changes: 2 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ add_subdirectory(utils)
add_subdirectory(bench)
add_subdirectory(blockchaintest)
add_subdirectory(eofparse)
add_subdirectory(experimental)
add_subdirectory(integration)
add_subdirectory(internal_benchmarks)
add_subdirectory(precompiles_bench)
Expand All @@ -34,7 +35,7 @@ set(targets evmone-bench evmone-bench-internal evmone-eofparse evmone-blockchain
if(EVMONE_FUZZING)
add_subdirectory(eofparsefuzz)
add_subdirectory(fuzzer)
list(APPEND targets evmone-eofparsefuzz evmone-fuzzer)
list(APPEND targets evmone-eofparsefuzz evmone-fuzzer jumpdest-fuzzer)
endif()

set_target_properties(
Expand Down
15 changes: 15 additions & 0 deletions test/experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# evmone: Fast Ethereum Virtual Machine implementation
# Copyright 2020 The evmone Authors.
# SPDX-License-Identifier: Apache-2.0

add_library(evmone-experimental STATIC)
add_library(evmone::experimental ALIAS evmone-experimental)

target_include_directories(evmone-experimental PUBLIC ${PROJECT_SOURCE_DIR} ${evmone_private_include_dir})
target_link_libraries(evmone-experimental PRIVATE evmone evmc::instructions)
target_compile_options(evmone-experimental PUBLIC -mavx -mavx2 -msse4)
target_sources(
evmone-experimental PRIVATE
jumpdest_analysis.cpp
opcode_manip.hpp
)
Loading