[PATCH] D74935: [LangRef][AliasAnalysis] Clarify `noalias` affects only modified objects
Nuno Lopes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 03:23:28 PST 2020
nlopes added a comment.
I agree with @aqjune that stating clearly the definition of object in this context.
See this example in the C spec:
For example, the second call of f in g has undefined behavior because each of d[1] through d[49] is accessed through both p and q.
void g(void) {
extern int d[100];
f(50, d + 50, d); // valid
f(50, d + 1, d); // undefined behavior
}
Restrict just guarantees that accesses are to disjoint memory locations, not that they point at different objects (in the sense of they were allocated separately).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74935/new/
https://reviews.llvm.org/D74935
More information about the cfe-commits
mailing list