diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
commit | 071b4126c613881f4cb25b4e5c39032964827f88 (patch) | |
tree | 7ed805786566918630d1d617b1ed8f7310f5fd8e /gcc/rtl-ssa/accesses.h | |
parent | 845d23f3ea08ba873197c275a8857eee7edad996 (diff) | |
parent | caa1c2f42691d68af4d894a5c3e700ecd2dba080 (diff) | |
download | gcc-devel/gfortran-test.zip gcc-devel/gfortran-test.tar.gz gcc-devel/gfortran-test.tar.bz2 |
Merge branch 'master' into gfortran-testdevel/gfortran-test
Diffstat (limited to 'gcc/rtl-ssa/accesses.h')
-rw-r--r-- | gcc/rtl-ssa/accesses.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/rtl-ssa/accesses.h b/gcc/rtl-ssa/accesses.h index 98403f7..b3a31fb 100644 --- a/gcc/rtl-ssa/accesses.h +++ b/gcc/rtl-ssa/accesses.h @@ -1044,6 +1044,42 @@ public: int comparison; }; +// This class represents the result of looking for a use of a particular +// definition at a particular point, here referred to as point P. +// There are four states: +// +// - USE is null if the definition has no uses. +// +// - Otherwise, COMPARISON is 0 if we found a definition at P. USE then +// contains this use. +// +// - Otherwise, COMPARISON is greater than 0 if we found a use that precedes P. +// USE then contains this use. +// +// - Otherwise, COMPARISON is less than zero and we found a use that follows P. +// USE then contains this use. +class use_lookup +{ +public: + // If we found a use at P, return that use, otherwise return null. + use_info *matching_use () const; + + // If we found a use at P, return that use, otherwise return prev_use (). + use_info *matching_or_prev_use () const; + + // If we found a use at P, return that use, otherwise return next_use (). + use_info *matching_or_next_use () const; + + // Return the last use that occurs before P, or null if none. + use_info *prev_use () const; + + // Return the first use that occurs after P, or null if none. + use_info *next_use () const; + + use_info *use; + int comparison; +}; + void pp_resource (pretty_printer *, resource_info); void pp_access (pretty_printer *, const access_info *, unsigned int flags = PP_ACCESS_DEFAULT); |