[zeek/spicy] acc706: Implement optimizer pass to `move` last uses.

0 views
Skip to first unread message

Evan Typanski

unread,
Jul 15, 2026, 10:49:13 AM (11 days ago) Jul 15
to spicy-...@zeek.org
Branch: refs/heads/topic/etyp/move-last-uses
Home: https://github.com/zeek/spicy
Commit: acc7066b4cd20fae3027b494f442e0d80721a204
https://github.com/zeek/spicy/commit/acc7066b4cd20fae3027b494f442e0d80721a204
Author: Evan Typanski <evan.t...@corelight.com>
Date: 2026-07-15 (Wed, 15 Jul 2026)

Changed paths:
M hilti/toolchain/CMakeLists.txt
M hilti/toolchain/include/compiler/detail/optimizer/pass-id.h
A hilti/toolchain/src/compiler/optimizer/passes/move-last-uses.cc
M tests/Baseline/hilti.cfg.dead-write-shadowed/output
M tests/Baseline/hilti.cfg.local-struct-value/output
M tests/Baseline/hilti.cfg.unreachable-return/output
M tests/Baseline/hilti.optimization.dataflow-unreachable/output
M tests/Baseline/hilti.optimization.unimplemented_hook/log
M tests/Baseline/hilti.optimization.unreachable-code/log
M tests/Baseline/hilti.optimization.unused-init/output
M tests/Baseline/hilti.optimization.unused_function/log
M tests/Baseline/hilti.types.struct.on-heap/output
M tests/Baseline/spicy.optimization.default-parser-functions/log
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-types/log
A tests/hilti/output/optimization/move-last-uses.hlt

Log Message:
-----------
Implement optimizer pass to `move` last uses.

Closes #1960


Commit: 6d001001cba0afde1d2d09e3f14c299598f95308
https://github.com/zeek/spicy/commit/6d001001cba0afde1d2d09e3f14c299598f95308
Author: Evan Typanski <evan.t...@corelight.com>
Date: 2026-07-15 (Wed, 15 Jul 2026)

Changed paths:
M hilti/toolchain/include/ast/type.h
M hilti/toolchain/include/ast/types/address.h
M hilti/toolchain/include/ast/types/bool.h
M hilti/toolchain/include/ast/types/enum.h
M hilti/toolchain/include/ast/types/integer.h
M hilti/toolchain/include/ast/types/interval.h
M hilti/toolchain/include/ast/types/network.h
M hilti/toolchain/include/ast/types/port.h
M hilti/toolchain/include/ast/types/real.h
M hilti/toolchain/include/ast/types/time.h
M hilti/toolchain/src/compiler/optimizer/passes/move-last-uses.cc

Log Message:
-----------
Let types determine if they're trivially-copyable

Since we shouldn't move trivially-copyable types, and there are a lot of
them, it seems better as a virtual method. This is pretty similar to
other ones on a type, but likely distinct enough that it's reasonable.

We still allow users to move out of trivially-copyable types, but we
should not generate moves from them ourselves.


Compare: https://github.com/zeek/spicy/compare/b2c4e661ffc6...6d001001cba0

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