[llvm] 09c3eeb - [Attributor] Use sensible initialization in AANoCaptureCallSiteReturned
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 3 22:36:25 PST 2021
Author: Johannes Doerfert
Date: 2021-03-04T00:35:51-06:00
New Revision: 09c3eebf5fd647895e20617a11d898c66f96d22a
URL: https://github.com/llvm/llvm-project/commit/09c3eebf5fd647895e20617a11d898c66f96d22a
DIFF: https://github.com/llvm/llvm-project/commit/09c3eebf5fd647895e20617a11d898c66f96d22a.diff
LOG: [Attributor] Use sensible initialization in AANoCaptureCallSiteReturned
Added:
Modified:
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index d6127a8df628..77c34a108671 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -4478,6 +4478,13 @@ struct AANoCaptureCallSiteReturned final : AANoCaptureImpl {
AANoCaptureCallSiteReturned(const IRPosition &IRP, Attributor &A)
: AANoCaptureImpl(IRP, A) {}
+ /// See AbstractAttribute::initialize(...).
+ void initialize(Attributor &A) override {
+ const Function *F = getAnchorScope();
+ // Check what state the associated function can actually capture.
+ determineFunctionCaptureCapabilities(getIRPosition(), *F, *this);
+ }
+
/// See AbstractAttribute::trackStatistics()
void trackStatistics() const override {
STATS_DECLTRACK_CSRET_ATTR(nocapture)
More information about the llvm-commits
mailing list