[PATCH] D79203: Handle indirect calls in preallocated verification
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 14:32:58 PDT 2020
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
One thing you may have noticed is that LLVM has strange behavior for looking at attributes at the call site. Doing that can sometimes look at attributes on the callee if the call is direct. This makes sense for optimization hints (readonly, argmemonly etc), but not so much for ABI attributes.
================
Comment at: llvm/test/Verifier/preallocated-valid.ll:21
+ %y = bitcast i8* %x to i32*
+ %f = bitcast void (i32*)* @foo1 to void (i32*)*
+ call void %f(i32* preallocated(i32) %y) ["preallocated"(token %cs)]
----------------
This could be fragile to optimizations. I would probably take this as a parameter:
```
define void @preallocated_indirect(void (i32*)* %f) {
...
```
It's a bit arbitrary, but I like it when the IR looks like a plausible program.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79203/new/
https://reviews.llvm.org/D79203
More information about the llvm-commits
mailing list