[all-commits] [llvm/llvm-project] 3f1c21: [rs4gc] Strip memory related attributes consistently
Philip Reames via All-commits
all-commits at lists.llvm.org
Fri May 14 07:58:22 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3f1c218318ed2e4f37d169f1bfbb39be657dc0b4
https://github.com/llvm/llvm-project/commit/3f1c218318ed2e4f37d169f1bfbb39be657dc0b4
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-05-14 (Fri, 14 May 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
M llvm/test/Transforms/RewriteStatepointsForGC/strip-invalid-attributes.ll
Log Message:
-----------
[rs4gc] Strip memory related attributes consistently
I noticed that rs4gc is not stripping a number of memory aliasing related attributes. We do strip some from call sites, but don't strip the same ones from declarations or parameters.
Why do we need to strip these? Two answers:
Safepoints conceptually read and write to the entire garbage collected heap in the physical model. We need this to preserve ordering of all loads and stores with respect to possible relocation.
We can infer other attributes from these. For instance, readnone can imply both nofree and nosync. Both of which don't hold after physical rewriting.
Note: This exposed a latent issue which was fixed a couple weeks back in 01801d5274.
Differential Revision: https://reviews.llvm.org/D99802
More information about the All-commits
mailing list