getCalledFunction() returns null for indirect function invocations.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
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.
llvm/test/Verifier/preallocated-valid.ll | ||
---|---|---|
21 | 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. |
This could be fragile to optimizations. I would probably take this as a parameter:
It's a bit arbitrary, but I like it when the IR looks like a plausible program.