[PATCH] D52894: Clarify definition of "indirect call" in CallSite

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 14:24:04 PST 2018


efriedma added a comment.

> Is CallSite being superceded by CallBase?

Oh, oops, wasn't looking that closely.  Eventually, yes, as part of the terminator cleanup, so we should probably try to make the two agree in the meantime so the transition is straightforward.

> Also, from the linked patch it seems like my assumption that getCalledValue() cannot return null is invalid? Is this true for both CallSite and CallBase?

Well, for "valid" IR (that's accepted by the verifier), getCalledValue() is never null.  But some passes temporarily null out operands as part of certain algorithms, like erasing dead code, and a small subset of IR APIs work for IR in that state.  Not sure getCalledValue()/getCalledFunction() should be in that subset, but it doesn't matter much either way.


https://reviews.llvm.org/D52894





More information about the llvm-commits mailing list