From: "Jørgen Kvalsvik" <j@lambda.is>
To: gcc-patches@gcc.gnu.org
Cc: hjl.tools@gmail.com, rguenther@suse.de, hubicka@ucw.cz,
sam@gentoo.org, "Jørgen Kvalsvik" <j@lambda.is>
Subject: [PATCH 0/2] More condition coverage fixes
Date: Mon, 8 Apr 2024 16:18:13 +0200 [thread overview]
Message-ID: <20240408141815.127984-1-j@lambda.is> (raw)
Here are two more patches for the condition coverage.
Inlined conditions are actually counted this time, as the recorded
expression mapping uses the new, deep-copied gconds as keys and not the
pointers from the source function.
The reported UB is gone when the number of conditions are exactly 64
(sizeof uint64_t), by slightly restructuring the loop generating
constants.
This passes check-gcc RUNTESTFLAGS=gcov.exp in my ubsan instrumented
build:
configure --enable-languages=c,c++ --enable-host-shared
--enable-checking=release --disable-multilib
--with-build-config=bootstrap-ubsan
Jørgen Kvalsvik (2):
Add tree-inlined gconds to caller cond->expr map
Generate constant at start of loop, without UB
gcc/testsuite/gcc.misc-tests/gcov-19.c | 37 ++++++++++++++++++++++
gcc/tree-inline.cc | 43 ++++++++++++++------------
gcc/tree-profile.cc | 20 +++++++++---
3 files changed, 76 insertions(+), 24 deletions(-)
--
2.30.2
next reply other threads:[~2024-04-08 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 14:18 Jørgen Kvalsvik [this message]
2024-04-08 14:18 ` [PATCH 1/2] Add tree-inlined gconds to caller cond->expr map Jørgen Kvalsvik
2024-04-09 7:40 ` Richard Biener
2024-04-08 14:18 ` [PATCH 2/2] Generate constant at start of loop, without UB Jørgen Kvalsvik
2024-04-09 7:40 ` Richard Biener
2024-04-09 7:58 ` Jørgen Kvalsvik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240408141815.127984-1-j@lambda.is \
--to=j@lambda.is \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=hubicka@ucw.cz \
--cc=rguenther@suse.de \
--cc=sam@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).