This is an archive of the discontinued LLVM Phabricator instance.

[CallSite removal] Move the rest of IR implementation code away from `CallSite`.
ClosedPublic

Authored by chandlerc on Dec 31 2018, 11:57 PM.

Details

Summary

With this change, the remaining CallSite usages are just for
implementing the wrapper type itself.

This does update the C API but leaves the names of that API alone and
only updates their implementation.

Diff Detail

Event Timeline

chandlerc created this revision.Dec 31 2018, 11:57 PM
chandlerc updated this revision to Diff 179829.Jan 2 2019, 3:02 AM

Rebase and ping!

compnerd accepted this revision.Jan 6 2019, 10:47 PM
compnerd added a subscriber: compnerd.
compnerd added inline comments.
llvm/include/llvm/IR/PatternMatch.h
1489

Would be nicer as:

if (const auto *CI = dyn_cast<CallInst>(V))
  if (Val.match(CI->getArgOperand(OpI))
    return true;
return false;

I wish there was more context as to why an invoke is being ignored.

llvm/lib/IR/Function.cpp
1294

I think this would be nicer as:

if (const auto *Call = dyn_cast<CallBase>(&*I))
  if (Call->hasFnAttr(Attribute::ReturnsTwice))
    return true;
This revision is now accepted and ready to land.Jan 6 2019, 10:47 PM

Addressed with analogous edits to what was requested, and landing. Thanks again for the review!

This revision was automatically updated to reflect the committed changes.