[PATCH] D87978: [Attributor] Adds deduction for the MaxObjSize Attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 18:22:44 PDT 2020
jdoerfert added a comment.
Can you add these examples too please:
void use(int *);
static void non_resizable(int *p) {
use(p);
use(p);
}
static void resizable(int *p) {
use(p);
use(p);
}
void non_resizable_caller1() {
int a;
non_resizable(&a);
}
int G;
void non_resizable_caller2() {
non_resizable(&G);
}
void resizable_caller1() {
int a;
resizable(&a);
}
void resizable_caller2(int *a) {
resizable(a);
}
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3742
+ if (!Stripped && this == &AA) {
+ if (AA.getState().FixedSizeState.getKnown()) {
+ MaxObjSize = V.getPointerMaxObjSizeBytes(DL);
----------------
Why not the assumed state?
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