[all-commits] [llvm/llvm-project] 3ddf56: [Statepoint] Use default attributes for some GC in...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue Nov 8 00:32:47 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3ddf56fd37b863bd778a63339e7c1ad9eca789d9
https://github.com/llvm/llvm-project/commit/3ddf56fd37b863bd778a63339e7c1ad9eca789d9
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-11-08 (Tue, 08 Nov 2022)
Changed paths:
M llvm/include/llvm/IR/Intrinsics.td
M llvm/test/Transforms/RewriteStatepointsForGC/statepoint-attrs.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list