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

Update to LLVM 17 #6

Merged
merged 6 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ rustflags = [
]

[env]
LLVM_SYS_150_PREFIX = { value = "./target-llvm/target-final/", relative = true, force = false }
RUST_BACKTRACE = { value = "full" }
LLVM_SYS_170_PREFIX = { value = "./target-llvm/target-final/", relative = true, force = false }
RUST_BACKTRACE = { value = "0" }
RUST_LOG = { value = "vm=trace" }

[tools.clippy]
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
- name: Define branches
run: |
if [ "${{ matrix.type }}" = "candidate" ]; then
echo "COMPILER_TESTER_BRANCH_NAME=${{ github.event.inputs.compiler_tester_candidate_branch || 'main' }}" >> $GITHUB_ENV
echo "COMPILER_TESTER_BRANCH_NAME=${{ github.event.inputs.compiler_tester_candidate_branch || github.head_ref }}" >> $GITHUB_ENV
else
echo "COMPILER_TESTER_BRANCH_NAME=${{ github.event.inputs.compiler_tester_reference_branch || 'main' }}" >> $GITHUB_ENV
echo "COMPILER_TESTER_BRANCH_NAME=${{ github.event.inputs.compiler_tester_reference_branch || github.event.repository.default_branch }}" >> $GITHUB_ENV
fi

- name: Checkout compiler-tester
Expand All @@ -64,10 +64,7 @@ jobs:
debug: ${{ github.event.inputs.llvm_build_type || 'release' }}

- name: Benchmark
env:
RUST_BACKTRACE: full
run: |
export LLVM_SYS_150_PREFIX="$(pwd)/target-llvm/target-final/"
cargo build --verbose --release --bin 'compiler-tester'
cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-solidity-*/*/Cargo.toml --target-dir './target-zksolc/'
cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-vyper-*/*/Cargo.toml --target-dir './target-zkvyper/'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:

- name: Run tests
run: |
export RUST_BACKTRACE='full'
export LLVM_SYS_150_PREFIX="$(pwd)/target-llvm/target-final/"
cargo build --verbose --release --bin 'compiler-tester'
cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-solidity-*/*/Cargo.toml --target-dir './target-zksolc/'
cargo build --verbose --release --manifest-path /usr/local/cargo/git/checkouts/era-compiler-vyper-*/*/Cargo.toml --target-dir './target-zkvyper/'
Expand Down
68 changes: 38 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ members = [
"solidity_adapter",
"coverage_watcher",
"benchmark_analyzer",
"fuzz"
"fuzzer"
]
resolver = "2"
4 changes: 2 additions & 2 deletions compiler_tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ features = ["blocking"]

[dependencies.inkwell]
git = "https://github.com/matter-labs-forks/inkwell"
branch = "llvm-15"
branch = "llvm-17"
default-features = false
features = ["llvm15-0", "no-libffi-linking", "target-eravm", "target-evm"]
features = ["llvm17-0", "no-libffi-linking", "target-eravm", "target-evm"]
File renamed without changes.
30 changes: 14 additions & 16 deletions fuzz/Cargo.toml → fuzzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@ edition = "2021"
[package.metadata]
cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.4"
era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }
zkevm-assembly = { git = "https://github.com/matter-labs/era-zkEVM-assembly", branch = "v1.4.1" }
zkevm_tester = { git = "https://github.com/matter-labs/era-zkevm_tester", branch = "v1.4.1" }
anyhow = "1.0"
semver = { version = "1.0", features = ["serde"] }

[dependencies.compiler-tester]
path = "../compiler_tester"

[dependencies.solidity-adapter]
path = "../solidity_adapter"


[[bin]]
name = "demo"
path = "fuzz_targets/demo.rs"
Expand All @@ -37,3 +21,17 @@ path = "fuzz_targets/optimizer_bug.rs"
test = false
doc = false
bench = false

[dependencies]
anyhow = "1.0"
semver = { version = "1.0", features = ["serde"] }
libfuzzer-sys = "0.4"

zkevm-assembly = { git = "https://github.com/matter-labs/era-zkEVM-assembly", branch = "v1.4.1" }
zkevm_tester = { git = "https://github.com/matter-labs/era-zkevm_tester", branch = "v1.4.1" }

era-compiler-llvm-context = { git = "https://github.com/matter-labs/era-compiler-llvm-context", branch = "main" }
era-compiler-solidity = { git = "https://github.com/matter-labs/era-compiler-solidity", branch = "main" }

compiler-tester = { path = "../compiler_tester" }
solidity-adapter = { path = "../solidity_adapter" }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion solidity
Submodule solidity updated 88 files
+1 −1 .circleci/config.yml
+1 −1 CODING_STYLE.md
+1 −1 Changelog.md
+17 −17 cmake/EthCompilerSettings.cmake
+3 −3 cmake/EthDependencies.cmake
+1 −1 docs/bugs_by_version.json
+2 −2 docs/grammar/SolidityParser.g4
+1 −1 libevmasm/AssemblyItem.cpp
+150 −150 libevmasm/Instruction.cpp
+167 −167 libevmasm/Instruction.h
+8 −8 liblangutil/Token.h
+1 −1 libsmtutil/CHCSmtLib2Interface.cpp
+1 −1 libsolc/libsolc.h
+1 −1 libsolidity/analysis/TypeChecker.cpp
+2 −2 libsolidity/ast/ASTAnnotations.h
+1 −1 libsolidity/ast/Types.cpp
+1 −1 libsolidity/codegen/ExpressionCompiler.cpp
+7 −8 libsolidity/experimental/codegen/IRGenerator.cpp
+2 −2 libsolidity/experimental/codegen/IRGenerator.h
+2 −2 libsolidity/formal/BMC.cpp
+1 −1 libsolidity/formal/SMTEncoder.h
+1 −1 libsolidity/interface/FileReader.cpp
+1 −1 libsolutil/FixedHash.h
+1 −1 libsolutil/Keccak256.cpp
+3 −3 libsolutil/Result.h
+1 −1 libyul/YulString.h
+1 −1 libyul/backends/evm/ControlFlowGraphBuilder.cpp
+18 −18 libyul/backends/evm/EVMDialect.cpp
+1 −1 libyul/backends/evm/StackLayoutGenerator.cpp
+3 −3 libyul/optimiser/ExpressionJoiner.h
+17 −17 libyul/optimiser/SSAReverser.h
+22 −0 scripts/common.sh
+11 −3 scripts/externalTests/common.sh
+21 −18 scripts/gas_diff_stats.py
+2 −2 scripts/release_ppa.sh
+1 −1 test/EVMHost.cpp
+21 −21 test/InteractiveTests.h
+44 −25 test/benchmarks/run.sh
+6 −6 test/cmdlineTests/model_checker_contracts_all/err
+3 −3 test/cmdlineTests/model_checker_contracts_all/input.sol
+2 −2 test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/input.json
+97 −97 test/cmdlineTests/standard_debug_info_in_evm_asm_via_ir_location/output.json
+2 −2 test/cmdlineTests/standard_debug_info_in_yul_location/input.json
+156 −156 test/cmdlineTests/standard_debug_info_in_yul_location/output.json
+14 −14 test/cmdlineTests/standard_optimizer_yulDetails_optimiserSteps_with_empty_sequence_no_yul/input.json
+7 −7 test/cmdlineTests/standard_wrong_key_metadata/input.json
+7 −7 test/cmdlineTests/standard_wrong_key_optimizer/input.json
+20 −20 test/cmdlineTests/standard_wrong_key_settings/input.json
+1 −1 test/externalTests/prb-math.py
+2 −2 test/libevmasm/Optimiser.cpp
+1 −1 test/libsolidity/AnalysisFramework.h
+1 −1 test/libsolidity/SemanticTest.cpp
+18 −18 test/libsolidity/SolidityEndToEndTest.cpp
+2 −2 test/libsolidity/SolidityOptimizer.cpp
+1 −1 test/libsolidity/StandardCompiler.cpp
+3 −3 test/libsolidity/natspecJSON/dev_multiple_params_mixed_whitespace.sol
+1 −1 test/libsolidity/smtCheckerTests/functions/functions_library_internal.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/do_while_bmc_iterations_break_6.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/do_while_bmc_iterations_break_7.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/do_while_bmc_iterations_break_continue_1.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/do_while_bmc_iterations_break_continue_2.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/for_loop_bmc_iterations_break_2.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/for_loop_bmc_iterations_break_8.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/for_loop_bmc_iterations_break_9.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/for_loop_bmc_iterations_break_continue_1.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/for_loop_bmc_iterations_break_continue_2.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/for_loop_bmc_iterations_break_continue_3.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/for_loop_bmc_iterations_continue_3.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/while_bmc_iterations_8.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/while_bmc_iterations_break_4.sol
+1 −1 test/libsolidity/smtCheckerTests/loops/while_bmc_iterations_break_6.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/while_bmc_iterations_break_7.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/while_bmc_iterations_break_continue_1.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/while_bmc_iterations_break_continue_2.sol
+2 −2 test/libsolidity/smtCheckerTests/loops/while_bmc_iterations_semantics_2.sol
+4 −4 test/libsolidity/smtCheckerTests/operators/delete_multid_array.sol
+1 −1 test/libsolidity/util/TestFunctionCallTests.cpp
+4 −4 test/libyul/Parser.cpp
+12 −12 test/libyul/StackShufflingTest.cpp
+1 −1 test/libyul/YulOptimizerTestCommon.cpp
+4 −4 test/libyul/yulOptimizerTests/circularReferencesPruner/nested_different_names.yul
+4 −4 test/libyul/yulOptimizerTests/circularReferencesPruner/nested_same_name.yul
+1 −1 test/libyul/yulOptimizerTests/expressionSimplifier/return_vars_zero.yul
+4 −4 test/libyul/yulOptimizerTests/fullSuite/static_array_slot_computation.yul
+1 −1 test/libyul/yulOptimizerTests/unusedAssignEliminator/for_continue.yul
+3 −3 test/tools/ossfuzz/protoToAbiV2.cpp
+100 −100 test/tools/ossfuzz/protoToAbiV2.h
+4 −4 test/tools/ossfuzz/protoToYul.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ pub enum Alignment {
Default,
}

impl Default for Alignment {
fn default() -> Self {
Self::Default
}
}

impl Alignment {
///
/// A shortcut constructor.
Expand All @@ -29,11 +35,4 @@ impl Alignment {
pub fn right() -> Self {
Self::Right
}

///
/// A shortcut constructor.
///
pub fn default() -> Self {
Self::Default
}
}
Loading