Skip to content
Commit 3ddf56fd authored by Nikita Popov's avatar Nikita Popov
Browse files

[Statepoint] Use default attributes for some GC intrinsics

This adds the default intrinsic attributes (nosync, nofree, nocallback,
willreturn) to the gc.result, gc.relocate, gc.pointer.base and
gc.pointer.offset intrinsics. As far as I understand, all of these
are supposed to be pure. Some quotes from LangRef:

> A gc.result is modeled as a ‘readnone’ pure function. It has no
> side effects since it is just a projection of the return value of
> the previous call represented by the gc.statepoint.

> A gc.relocate is modeled as a readnone pure function. It has no
> side effects since it is just a way to extract information about
> work done during the actual call modeled by the gc.statepoint.

Having willreturn in particular will be important to avoid
optimization regressions in the future.

Differential Revision: https://reviews.llvm.org/D136929
parent 3705e038
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment