Vern Paxson
9117ccab12
fix for more robustly finding BTests to assess for -O gen-C++
2025-05-31 12:50:14 -07:00
Vern Paxson
e165e64fa5
fix for -O gen-C++ dealing with type constants of unnamed compound types
2025-05-31 12:49:37 -07:00
Tim Wojtulewicz
c609d5c90a
Fix clang-tidy performance-inefficient-string-concatenation warnings
2025-05-30 08:12:29 -07:00
Tim Wojtulewicz
cb8c35748a
Fix clang-tidy performance-unnecessary-copy-initialization warnings
2025-05-30 08:12:29 -07:00
Tim Wojtulewicz
178d7f4cd0
Fix clang-tidy performance-faster-string-find warnings
2025-05-30 08:12:29 -07:00
Tim Wojtulewicz
d2045d1834
Fix clang-tidy bugprone-unused-local-non-trivial-variable warnings
2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
9e83759e83
Fix clang-tidy bugprone-macro-parentheses warnings
2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
dbecfb5a2a
Fix clang-tidy bugprone-branch-clone warnings
2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
92854e95d3
Fix clang-tidy bugprone-assignment-in-if-condition warnings
2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
12356a6393
Remove unnecessary #includes in script_opt
2025-05-19 10:25:05 -07:00
Tim Wojtulewicz
5c47533653
Avoid extra temporary strings in concatenation
2025-04-08 11:01:21 -07:00
Tim Wojtulewicz
f7495831a2
Use const auto references to avoid some copies
2025-04-08 11:01:21 -07:00
Tim Wojtulewicz
34ee136a3c
More std::move changes based on Coverity findings
2025-04-08 11:01:21 -07:00
Vern Paxson
e1a859c31b
-O gen-C++ support for pattern-to-pattern comparison
2025-03-07 10:32:15 -08:00
Vern Paxson
f48f3af79a
-O gen-C++ support for pattern vector comparisons
2025-03-07 09:55:15 -08:00
Vern Paxson
9f5fba7003
-O gen-C++ support for type expressions
2025-03-07 09:21:09 -08:00
Vern Paxson
a3b54b69a1
fixes for -O gen-standalone-C++ generation of lambdas
2025-01-14 17:02:12 -08:00
Vern Paxson
960931ba5c
support for record extensions when using -O gen-standalone-C++
2025-01-14 11:12:10 +01:00
Vern Paxson
3d58732cb3
fixes for initializing globals when using -O gen-standalone-C++
2025-01-01 13:26:58 -08:00
Vern Paxson
0a813a53c7
-O gen-standalone-C++ fixes for recent more aggressive AST profiling
2024-12-12 14:27:12 -08:00
Tim Wojtulewicz
6e75417032
Merge remote-tracking branch 'origin/topic/vern/CPP-streamlining'
...
* origin/topic/vern/CPP-streamlining:
BTest baseline updates for compile-to-C++
mark ZAM regression BTests as not suitable for compile-to-C++
fix for -O gen-C++ maintenance helper to skip BTest intermediary files
introduced simplified initialization for non-standalone -O gen-C++ code tied -O gen-standalone-C++ to use of --optimize-files
streamline generated -O C++ code by relying on per-function profiles rather than aggregate profile
when reporting available/unavailble C++ script bodies, flag those that are skipped
modified AST profiling to mark (and fully skip) non-optimizable functions
modified merge_types() to skip work if given identical types, which also preserves type names (useful for -O gen-C++)
2024-12-09 12:16:00 -07:00
Benjamin Bannier
97c0df29d4
Bump clang-format pre-commit hooks
...
This brings in slightly better formatting around uniform initialization,
and comments after blocks not surrounded by `{ .. }`.
2024-12-09 16:12:36 +01:00
Arne Welzel
0ebcd9608f
Merge remote-tracking branch 'origin/topic/vern/script-opt-uncompilable-AST'
...
* origin/topic/vern/script-opt-uncompilable-AST:
ScriptOpt: Fail compilation if known exprs/stmts is outdated
skip optimization of functions with AST nodes unknown to script optimization
2024-12-09 14:04:01 +01:00
Vern Paxson
de98f1c36c
fix for -O gen-C++ maintenance helper to skip BTest intermediary files
2024-12-06 16:26:48 -08:00
Vern Paxson
2e69a8870a
introduced simplified initialization for non-standalone -O gen-C++ code
...
tied -O gen-standalone-C++ to use of --optimize-files
2024-12-06 16:25:22 -08:00
Vern Paxson
612d99e751
streamline generated -O C++ code by relying on per-function profiles rather than aggregate profile
2024-12-06 16:23:32 -08:00
Vern Paxson
908e8a3a27
ZAM support for keeping "assert" statements
2024-12-03 10:37:38 -07:00
Vern Paxson
35e157a0ab
skip optimization of functions with AST nodes unknown to script optimization
2024-11-29 16:12:05 -08:00
Vern Paxson
519fec2592
switched CPPCompile::Canonicalize() to take std::string instead of const char*
2024-11-04 08:22:37 -08:00
Arne Welzel
821218e7b2
Merge remote-tracking branch 'origin/topic/vern/CPP-when-capture-naming'
...
* origin/topic/vern/CPP-when-capture-naming:
fixed "-O gen-C++" naming of "when" captures to avoid ambiguities due to inlining
Simplified & made more robust maintenance helper script for "-O gen-C++" testing
"-a cpp" baseline updates to reflect recent BTest changes
2024-10-29 13:50:56 +01:00
Vern Paxson
744628f115
factored CPP source's main header into collection of per-source-file headers
2024-10-18 17:37:33 -07:00
Vern Paxson
a2495d028e
renamed script optimization Attrs.h header to prepare for factoring large Compile.h
2024-10-18 17:37:33 -07:00
Vern Paxson
1f1200e5e8
fixed "-O gen-C++" naming of "when" captures to avoid ambiguities due to inlining
...
Previously there was logic for doing this, but it was ineffectual
due to the order in which canonicalization was done. This problem
manifested non-deterministically depending on order-of-generation
of "when" lambdas, which is why previous testing didn't catch it.
2024-10-11 08:16:59 -07:00
Vern Paxson
e18ab5be95
Simplified & made more robust maintenance helper script for "-O gen-C++" testing
2024-10-11 08:14:23 -07:00
Vern Paxson
32d254bd47
tweak to -O gen-C++ maintenance script to avoid treating plugins as BTests
2024-09-27 13:25:00 -07:00
Vern Paxson
5c38f7637d
-O gen-C++ fix for run-time warnings for "when" lambdas
2024-09-27 13:23:06 -07:00
Vern Paxson
d1c31927c4
fix to -O gen-C++ for recent AST profiling changes for identifying function parameters
2024-09-27 13:23:06 -07:00
Vern Paxson
2b64e3b05e
fix to -O gen-C++ for dealing with "hidden" parameters
2024-09-27 13:23:06 -07:00
Vern Paxson
8025ee74ef
tweak to prevent an incorrect warning for scripts compiled to C++
2024-09-27 13:23:06 -07:00
Vern Paxson
c165e05b83
remove unnecessary header include
2024-09-27 13:23:06 -07:00
Arne Welzel
71e9c8d436
script_opt: Use Func::GetName()
2024-09-27 15:11:17 +02:00
Benjamin Bannier
db42b2cfe5
Bump clang-format
...
This patch contains a bump of the configured clang-format version from
17.0.3 to 18.1.8 and automatically generated C++ source updates. The
main difference we are seeing from this is fixes for previously
incomplete reformats.
2024-09-02 16:46:59 +02:00
Arne Welzel
5e36709905
Func: Add SetCapturesVec()
...
Add an API to directly set captures_vec for use by C++ compilation. The
current code keys off or asserts on ZAM stmts, making it difficult to
leverage captures_vec in other contexts.
2024-08-15 10:10:00 +02:00
Vern Paxson
207b82ae4b
robustness improvements for -O gen-C++ generation of lambdas / "when"s
2024-08-13 14:45:33 -07:00
Vern Paxson
0ca2f9a8b2
speedups for compilation of initializers in -O gen-C++ generated code
2024-08-13 14:43:17 -07:00
Vern Paxson
6daf9d5b88
fixes for -O gen-C++ generation of floating point constants
2024-08-13 14:42:25 -07:00
Vern Paxson
a93a69ba62
-O gen-C++ fix for dealing with use of more than one module qualifier
2024-08-13 14:41:51 -07:00
Vern Paxson
77c34787f3
header tweaks to provide gen-C++ script optimization with more flexibility
2024-08-13 14:37:06 -07:00
Vern Paxson
769a3d958a
some minor tidying of -O gen-C++ sources
2024-08-13 14:29:26 -07:00
Tim Wojtulewicz
e2b03681d1
Remove EventRegistry::Used and EventRegistry::SetUsed
2024-08-07 11:58:21 -07:00