From patchwork Thu Jul 28 21:32:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 56406 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 04312385AE7D for ; Thu, 28 Jul 2022 21:33:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04312385AE7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1659044011; bh=rU8DMVxWj20TMYdVI2iA7dGhRZY4IFwuIzN0aLLBkoc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OmNmElkWGQ9YG2pYECYIKMjwNZAbnaV901IyWe+LZNEAspgPbJ6MKFIylflHb/2KP aOYL0dUiMrVT6DnX83wucYqYI9wm24eiqpyEFc/4MTUSiDVE1tbjyH65OhouF8PX7Q ySEEYGwQn7y/XTn3STR+i4YbxprHOoqgiBuj1QtE= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 803B13857BA5 for ; Thu, 28 Jul 2022 21:32:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 803B13857BA5 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-492-lLU9IMmaMc2KZZCq8OX-qw-1; Thu, 28 Jul 2022 17:32:09 -0400 X-MC-Unique: lLU9IMmaMc2KZZCq8OX-qw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BA47285A585 for ; Thu, 28 Jul 2022 21:32:08 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.16.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id F33A4492C3B; Thu, 28 Jul 2022 21:32:07 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [committed] analyzer: expand the comment in region.h Date: Thu, 28 Jul 2022 17:32:06 -0400 Message-Id: <20220728213206.2267472-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 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, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-1879-g9cac6811cf0d6c. gcc/analyzer/ChangeLog: * region.h: Add notes to the comment describing the region class hierarchy. Signed-off-by: David Malcolm --- gcc/analyzer/region.h | 52 ++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/gcc/analyzer/region.h b/gcc/analyzer/region.h index fd0d4a05cc9..70f0f93111d 100644 --- a/gcc/analyzer/region.h +++ b/gcc/analyzer/region.h @@ -72,27 +72,37 @@ enum region_kind region space_region - frame_region (RK_FRAME) - globals_region (RK_GLOBALS) - code_region (RK_CODE) - stack_region (RK_STACK) - heap_region (RK_HEAP) - root_region (RK_ROOT) - function_region (RK_FUNCTION) - label_region (RK_LABEL) - symbolic_region (RK_SYMBOLIC) - decl_region (RK_DECL), - field_region (RK_FIELD) - element_region (RK_ELEMENT) - offset_region (RK_OFFSET) - sized_region (RK_SIZED) - cast_region (RK_CAST) - heap_allocated_region (RK_HEAP_ALLOCATED) - alloca_region (RK_ALLOCA) - string_region (RK_STRING) - bit_range_region (RK_BIT_RANGE) - var_arg_region (RK_VAR_ARG) - unknown_region (RK_UNKNOWN). */ + frame_region (RK_FRAME): a function frame on the stack + globals_region (RK_GLOBALS): holds globals variables (data and bss) + code_region (RK_CODE): represents the code segment, containing functions + stack_region (RK_STACK): a stack, containing all stack frames + heap_region (RK_HEAP): the heap, containing heap_allocated_regions + root_region (RK_ROOT): the top-level region + function_region (RK_FUNCTION): the code for a particular function + label_region (RK_LABEL): a particular label within a function + symbolic_region (RK_SYMBOLIC): dereferencing a symbolic pointer + decl_region (RK_DECL): the memory occupied by a particular global, local, + or SSA name + field_region (RK_FIELD): the memory occupied by a field within a struct + or union + element_region (RK_ELEMENT): an element within an array + offset_region (RK_OFFSET): a byte-offset within another region, for + handling pointer arithmetic as a region + sized_region (RK_SIZED): a subregion of symbolic size (in bytes) + within its parent + cast_region (RK_CAST): a region that views another region using a + different type + heap_allocated_region (RK_HEAP_ALLOCATED): an untyped region dynamically + allocated on the heap via + "malloc" or similar + alloca_region (RK_ALLOCA): an untyped region dynamically allocated on the + stack via "alloca" + string_region (RK_STRING): a region for a STRING_CST + bit_range_region (RK_BIT_RANGE): a region for a specific range of bits + within another region + var_arg_region (RK_VAR_ARG): a region for the N-th vararg within a + frame_region for a variadic call + unknown_region (RK_UNKNOWN): for handling unimplemented tree codes. */ /* Abstract base class for representing ways of accessing chunks of memory.