[PATCH] D87978: [WIP][Attributor] Adds deduction for the MaxObjSize Attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 15:19:21 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3710-3711
+ : AAMaxObjSizeImpl(IRP, A) {}
+ using State = MaxObjState;
+
+ /// See AbstractAttribute::updateImpl(...).
----------------
Make it `StateType`
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3739
+
+ T.indicatePessimisticFixpoint();
+ T.ResizableState.indicateOptimisticFixpoint();
----------------
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3740
+ T.indicatePessimisticFixpoint();
+ T.ResizableState.indicateOptimisticFixpoint();
+ } else if (!CaptureAA.isKnownNoCapture()) {
----------------
`assert(T.isAtFixpoint() && "...");`
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3742
+ } else if (!CaptureAA.isKnownNoCapture()) {
+ T.ResizableState.indicatePessimisticFixpoint();
+ } else {
----------------
Resizable should be taken from `AA` not from nocapture. Nocapture is needed only if resizable is true. So if it is resizable and it maybe captured. Give up on it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87978/new/
https://reviews.llvm.org/D87978
More information about the llvm-commits
mailing list