[rs4gc] Strip nofree and nosync attributes when lowering from abstract model
authorPhilip Reames <listmail@philipreames.com>
Fri, 2 Apr 2021 16:12:24 +0000 (09:12 -0700)
committerPhilip Reames <listmail@philipreames.com>
Fri, 2 Apr 2021 16:12:24 +0000 (09:12 -0700)
commita505801e2b7ba13b224e8f2015a64cbe03e62d35
tree739d3a7d726ea25cda173fd274f6dc1bbec017e2
parentd01653f827cc962734f464be9502eb16cd907a44
[rs4gc] Strip nofree and nosync attributes when lowering from abstract model

The safepoints being inserted exists to free memory, or coordinate with another thread to do so.  Thus, we must strip any inferred attributes and reinfer them after the lowering.

I'm not aware of any active miscompiles caused by this, but since I'm working on strengthening inference of both and leveraging them in the optimization decisions, I figured a bit of future proofing was warranted.
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
llvm/test/Transforms/RewriteStatepointsForGC/strip-invalid-attributes.ll