forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't force inliner in case of ref type function args (FuelLabs#4823)
This was required previously, but after the IR refactoring (FuelLabs#4336), this is no longer required, and actually worsens things. Fixes FuelLabs#4747. For the two tests mentioned there, (both based on https://github.com/hashcloak/fuel-crypto/) the compile time now comes down from 1. 30m -> 16s 2. 180m -> 31s Also fixes two bugs uncovered: 1. Bug in DCE - Fixes FuelLabs#4763. (FuelLabs@1b512b8) 2. Bug in interaction b/w asm gen and reg alloc spiller (FuelLabs@7a40496). --------- Co-authored-by: IGI-111 <[email protected]>
- Loading branch information
1 parent
303a7a3
commit 5318edd
Showing
16 changed files
with
101 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
script { | ||
entry fn main() -> bool { | ||
local mut u64 state | ||
|
||
entry(): | ||
v0 = get_local ptr u64, state | ||
v1 = const u64 0 | ||
store v1 to v0 | ||
v2 = get_local ptr u64, state | ||
v3 = call function_0(v2) | ||
v4 = get_local ptr u64, state | ||
v5 = load v4 | ||
v6 = const u64 42 | ||
v7 = cmp eq v5 v6 | ||
v8 = const bool false | ||
v9 = cmp eq v7 v8 | ||
cbr v9, assert_1_block0(), assert_1_block1() | ||
|
||
assert_1_block0(): | ||
v10 = const u64 18446744073709486084 | ||
revert v10 | ||
|
||
assert_1_block1(): | ||
v11 = const bool true | ||
ret bool v11 | ||
} | ||
|
||
// check: function_0 | ||
fn function_0(state: ptr u64) -> () { | ||
entry(state: ptr u64): | ||
v0 = const u64 42 | ||
// check: store | ||
store v0 to state | ||
v1 = const unit () | ||
// not: add | ||
v2 = add v0, v0 | ||
ret () v1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters