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/function-abi.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/function-abi.h')
-rw-r--r-- | gcc/function-abi.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/function-abi.h b/gcc/function-abi.h index edf83c1..6cb552f 100644 --- a/gcc/function-abi.h +++ b/gcc/function-abi.h @@ -99,6 +99,39 @@ public: return m_full_and_partial_reg_clobbers; } + /* Return the set of registers that a function call is allowed to alter + partially but not fully; i.e. those in full_and_partial_reg_clobbers () + but not in full_reg_clobbers (). + + If a register X is in this set and if we don't know which parts of + X are live (typically because we don't bother to track X's mode), + then the conservative assumptions are: + + - to ignore the call when computing reaching definitions + - to treat X as clobbered when computing availability + + For example, if we have: + + A: X := Y + B: call that partially clobbers X + C: ... := ... X ... + + and don't track the mode of X when computing reaching definitions, + then the conservative assumption is that A's definition survives + until C. But if we have: + + A: X := Y + B: call that partially clobbers X + C: ... := ... Y ... + + and don't track the mode of X when computing availability, then the + conservative assumption is that Y is not available in X at C. */ + HARD_REG_SET + only_partial_reg_clobbers () const + { + return full_and_partial_reg_clobbers () & ~full_reg_clobbers (); + } + /* Return the set of registers that cannot be used to hold a value of mode MODE across a function call. That is: @@ -166,6 +199,12 @@ public: } HARD_REG_SET + only_partial_reg_clobbers () const + { + return m_mask & m_base_abi->only_partial_reg_clobbers (); + } + + HARD_REG_SET mode_clobbers (machine_mode mode) const { return m_mask & m_base_abi->mode_clobbers (mode); |