[zeek/spicy] 7f021f: Prevent removing switch statements which only have...

0 views
Skip to first unread message

Benjamin Bannier

unread,
Sep 2, 2025, 12:23:20 PM (7 days ago) Sep 2
to spicy-...@zeek.org
Branch: refs/heads/topic/bbannier/issue-2124
Home: https://github.com/zeek/spicy
Commit: 7f021f99d7788418e98628d97bb597bd317bebe5
https://github.com/zeek/spicy/commit/7f021f99d7788418e98628d97bb597bd317bebe5
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.switch/output

Log Message:
-----------
Prevent removing switch statements which only have a default case.


Commit: ded30b45d0eaf7d405994c08be537bc3e969fc8f
https://github.com/zeek/spicy/commit/ded30b45d0eaf7d405994c08be537bc3e969fc8f
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M hilti/toolchain/include/compiler/detail/cfg.h
M hilti/toolchain/src/compiler/cfg.cc
M hilti/toolchain/src/compiler/optimizer.cc
M tests/Baseline/hilti.cfg.assign/output
M tests/Baseline/hilti.cfg.dead-write-shadowed/output
M tests/Baseline/hilti.cfg.return/output
M tests/Baseline/hilti.cfg.switch/output
M tests/Baseline/hilti.optimization.dataflow-unreachable/output
M tests/Baseline/spicy.optimization.feature_requirements/log
M tests/Baseline/spicy.optimization.feature_requirements/opt.hlt
M tests/Baseline/spicy.optimization.unused-functions/log
M tests/Baseline/spicy.optimization.unused-functions/opt.hlt
M tests/Baseline/spicy.optimization.unused-types/log
M tests/Baseline/spicy.optimization.unused-types/opt.hlt
M tests/hilti/cfg/assign.hlt

Log Message:
-----------
Properly store declarations.


Commit: fb7e8427afe9750ff99d34ad5473069a038d5b5b
https://github.com/zeek/spicy/commit/fb7e8427afe9750ff99d34ad5473069a038d5b5b
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.assign/output
M tests/Baseline/hilti.cfg.dead-write-shadowed/output
M tests/Baseline/hilti.cfg.try/output
M tests/Baseline/hilti.cfg.unreachable-return/output
M tests/hilti/cfg/assign.hlt

Log Message:
-----------
Fix cfg handling of RHS assignments in variable declarations.


Commit: 041d6af57a389e8fe39fc56be6719f9e950039b7
https://github.com/zeek/spicy/commit/041d6af57a389e8fe39fc56be6719f9e950039b7
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M hilti/toolchain/include/compiler/detail/cfg.h
M hilti/toolchain/src/compiler/cfg.cc
M tests/Baseline/hilti.cfg.assign/output
A tests/Baseline/hilti.cfg.local-struct-value/output
M tests/Baseline/hilti.optimization.dataflow-unreachable/output
A tests/hilti/cfg/local-struct-value.hlt

Log Message:
-----------
Fix computation of aliasing and variable access in CFG.

We would previously not computing aliasing and variable reads correctly
which could lead to us incorrectly modifying code involving e.g., struct
values. This patch reworks how this is done.

To implement this correctly we also need to add function parameters to
the CFG.

Closes #2124.


Commit: e485bebe29ccce84bec584bdd0a8ad6ed69632bb
https://github.com/zeek/spicy/commit/e485bebe29ccce84bec584bdd0a8ad6ed69632bb
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M hilti/toolchain/src/compiler/optimizer.cc

Log Message:
-----------
Remove workaround for C++17.


Commit: 86b308c0b9250fdcaa5cfbf40636a8f1f0283f13
https://github.com/zeek/spicy/commit/86b308c0b9250fdcaa5cfbf40636a8f1f0283f13
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M .pre-commit-config.yaml

Log Message:
-----------
Bump pre-commit hooks.


Commit: 6e66a223e39121fe841cfb8da5a95e91fc669599
https://github.com/zeek/spicy/commit/6e66a223e39121fe841cfb8da5a95e91fc669599
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M .pre-commit-config.yaml

Log Message:
-----------
Use non-legacy ruff-check version for pre-commit.


Commit: c64ab406169ffda46bccbcb95c6ced7c49d8018e
https://github.com/zeek/spicy/commit/c64ab406169ffda46bccbcb95c6ced7c49d8018e
Author: Benjamin Bannier <benjamin...@corelight.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)

Changed paths:
M hilti/toolchain/src/compiler/cfg.cc

Log Message:
-----------
Rename variable for clarity.

This variable stopped referring to statements so its previous name
became potentially confusing. Rename it to a more generic identifier.


Compare: https://github.com/zeek/spicy/compare/89e1c9d82d2b...c64ab406169f

To unsubscribe from these emails, change your notification settings at https://github.com/zeek/spicy/settings/notifications
Reply all
Reply to author
Forward
0 new messages