public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-1879] analyzer: expand the comment in region.h
Date: Thu, 28 Jul 2022 21:25:43 +0000 (GMT)	[thread overview]
Message-ID: <20220728212543.3D79D3857BB9@sourceware.org> (raw)

https://gcc.gnu.org/g:9cac6811cf0d6c1437426aaf13ea52c16c16fc80

commit r13-1879-g9cac6811cf0d6c1437426aaf13ea52c16c16fc80
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Jul 28 17:21:28 2022 -0400

    analyzer: expand the comment in region.h
    
    gcc/analyzer/ChangeLog:
            * region.h: Add notes to the comment describing the region
            class hierarchy.
    
    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

Diff:
---
 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 1067748a7cd..a5b30299ec6 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.


                 reply	other threads:[~2022-07-28 21:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220728212543.3D79D3857BB9@sourceware.org \
    --to=dmalcolm@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.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).