From patchwork Wed Apr 10 20:55:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 1922231 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=K6V4phIr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFFYt4Fzpz1yYB for ; Thu, 11 Apr 2024 06:59:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AF15838400CB for ; Wed, 10 Apr 2024 20:58:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 260163849ACD for ; Wed, 10 Apr 2024 20:56:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 260163849ACD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 260163849ACD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712782579; cv=none; b=fBHos0S6PjZ6LyPEjSL/3e08YZxzNcVz+L0JtfWqlkItIXGfsVjhFpx3nmVdQ7YuZV8zuVKhZRqtJzyXcrxs0yey93G+Bw8jMJq7XBBZ9zTV6jg3t5WS7HUDnfayhWDy5+2Wxt2xAY/shgLmWW+hdVVRmk8Awqf/vEK+e1j6pKA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712782579; c=relaxed/simple; bh=DOhulfTh68i1BRDiHDpTEy+t2m6TlgXArlLeixRd7hU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=cCBvIBtIytCjZ/XPGDh49RraZo5baSjf4KYcamY57TBu8ks0MUrmObDZ+wff5L8bDq3X2TZMPWQO28Vd8d3ZU2dQp77d3zzzLOdkDZ5Ch5cBCQDwqyw+4oNeEOqp+LmiKEa2envNQjsRfjqtenjtJBNDoUJd8Wvl4gRAC69Sb7M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712782567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PEi0PqsT1GoL7whnJtmt7zn1W7H7QWG6MVgyn2EDnJs=; b=K6V4phIrG6IsoybAGwA9MVGOXkxplh2fOE+NOLRmuGm8tj44W7cA8iGGCEyif3jgYdWG8L aDPI+RAdx8Q8fvVdeXB0BXRXG+IQKsXTUhDOtKI8bW+m8bSBCCt3WyEvQ3FELKcOPQj7DL St8bLyWBj+8/ur+IzYAuWbqNZqmnUtY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325-l6HleM3ZPmCQv2oeauACCw-1; Wed, 10 Apr 2024 16:56:01 -0400 X-MC-Unique: l6HleM3ZPmCQv2oeauACCw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ACE8829AA3B7 for ; Wed, 10 Apr 2024 20:56:00 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.22.33.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87CCE1121312; Wed, 10 Apr 2024 20:56:00 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [pushed] analyzer: fixes to internal docs Date: Wed, 10 Apr 2024 16:55:59 -0400 Message-Id: <20240410205559.335704-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-9897-g7f6599a201be2a. gcc/ChangeLog: * doc/analyzer.texi: Various tweaks. Signed-off-by: David Malcolm --- gcc/doc/analyzer.texi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/doc/analyzer.texi b/gcc/doc/analyzer.texi index 8eb40272cb71..b53096e7b7d9 100644 --- a/gcc/doc/analyzer.texi +++ b/gcc/doc/analyzer.texi @@ -21,6 +21,9 @@ @subsection Overview +At a high-level, we're doing coverage-guided symbolic execution of the +user's code. + The analyzer implementation works on the gimple-SSA representation. (I chose this in the hopes of making it easy to work with LTO to do whole-program analysis). @@ -55,7 +58,9 @@ Next is the heart of the analyzer: we use a worklist to explore state within the supergraph, building an "exploded graph". Nodes in the exploded graph correspond to pairs, as in "Precise Interprocedural Dataflow Analysis via Graph Reachability" - (Thomas Reps, Susan Horwitz and Mooly Sagiv). + (Thomas Reps, Susan Horwitz and Mooly Sagiv) - but note that +we're not using the algorithm described in that paper, just the +``exploded graph'' terminology. We reuse nodes for pairs we've already seen, and avoid tracking state too closely, so that (hopefully) we rapidly converge @@ -499,7 +504,8 @@ which dumps a @file{SRC.eg.txt} file containing the full @code{exploded_graph}. Assuming that you have the @uref{https://gcc-newbies-guide.readthedocs.io/en/latest/debugging.html,,python support scripts for gdb} -installed, you can use: +installed (which you should do, it makes debugging GCC much easier), +you can use: @smallexample (gdb) break-on-saved-diagnostic