Skip to content

Commit

Permalink
fixup! Add optimizer pass detecting pure functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannier committed May 16, 2023
1 parent 8fa9a19 commit 8003436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/Baseline/spicy.optimization.feature_requirements/log
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@
[debug/optimizer] marking function '__register_foo_X1' as pure
[debug/optimizer] marking function '__register_foo_X2' as pure
[debug/optimizer] marking function '__register_foo_X3' as pure
[debug/optimizer] marking function 'foo::X0::__on_0x25_init' as pure
[debug/optimizer] marking function 'foo::X1::__on_0x25_init' as pure
[debug/optimizer] removing declaration for unused function foo::X0::__parse_foo_X0_stage2
[debug/optimizer] removing declaration for unused function foo::X0::__parse_stage1
[debug/optimizer] removing declaration for unused function foo::X0::parse1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ const bool __feat%foo__X6%supports_filters = False;
const bool __feat%foo__X6%supports_sinks = True;
const bool __feat%foo__X6%synchronization = False;

method hook void foo::X0::__on_0x25_init() {
method hook void foo::X0::__on_0x25_init() &pure {
self.__offset;
}

init function void __register_foo_X0() &pure {
}

method hook void foo::X1::__on_0x25_init() {
method hook void foo::X1::__on_0x25_init() &pure {
(*(self.__begin));
}

Expand Down

0 comments on commit 8003436

Please sign in to comment.