diff options
| author | Sang-Heon Jeon <ekffu200098@gmail.com> | 2026-07-25 20:32:41 +0900 |
|---|---|---|
| committer | Julia Lawall <Julia.Lawall@inria.fr> | 2026-08-23 22:12:09 +0200 |
| commit | b32cf68d78a1f2a05797ec2a969b80a9472f45a7 (patch) | |
| tree | 6f8f2e4008be0874e367db5c8b86b3404dbdd943 /tools/perf/scripts/python/task-analyzer.py | |
| parent | bf2fe566a8cbd3671b816223eec8fadd18ec8d77 (diff) | |
coccinelle: misc: minmax: improve performance when no candidate exists
The rules that report an opencoded min() or max() search every
function body, even when the file contains nothing to find.
To avoid this, collect the candidates first and run the search only
when one exists. A candidate is any conditional expression whose
condition is a comparison.
Every opencoded min() or max() is also a candidate, so the same
opportunities are reported as before and the output does not
change. A report-mode run over every .c file in the tree produces
identical output.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
