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

BlockHasher: Do not hash literal kind #15231

Merged
merged 1 commit into from
Jul 1, 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
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Compiler Features:
* EVM: Support for the EVM version "Prague".
* SMTChecker: Add CHC engine check for underflow and overflow in unary minus operation.
* SMTChecker: Replace CVC4 as a possible BMC backend with cvc5.
* Yul Optimizer: The optimizer now treats some previously unrecognized identical literals as identical.


Bugfixes:
Expand Down
1 change: 0 additions & 1 deletion libyul/optimiser/BlockHasher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ void ASTHasherBase::hashLiteral(solidity::yul::Literal const& _literal)
else
hash64(std::hash<std::string>{}(_literal.value.builtinStringLiteralValue()));
hash64(_literal.type.hash());
hash8(static_cast<uint8_t>(_literal.kind));
hash8(_literal.value.unlimited());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ contract C {
}
// ----
// test() -> 0x20, 0x14, "[a called][b called]"
// gas irOptimized: 116530
// gas irOptimized: 116531
ekpyron marked this conversation as resolved.
Show resolved Hide resolved
// gas legacy: 118845
// gas legacyOptimized: 116844
// test2() -> 0x20, 0x14, "[b called][a called]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// {
// f()
// f()
// h()
// f()
// function f()
// {
// mstore(29400335157912315244266070412362164103369332044010299463143527189509193072640, mload(0x00))
Expand Down
2 changes: 1 addition & 1 deletion test/libyul/yulOptimizerTests/fullSuite/devcon_example.yul
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// let sum := 0
// let length := calldataload(_1)
// let i := 0
// for { } true { i := add(i, 1) }
// for { } 1 { i := add(i, 1) }
// {
// let _2 := iszero(lt(i, length))
// if _2 { break }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// let length := calldataload(_1)
// let i := 0
// let _2 := calldataload(7)
// for { } true { i := add(i, 1) }
// for { } 1 { i := add(i, 1) }
ekpyron marked this conversation as resolved.
Show resolved Hide resolved
// {
// let _3 := iszero(lt(i, length))
// if _3 { break }
Expand Down