[Statepoint] Improve two asserts, fix some style (NFC)

Summary:
It's important that our users immediately know what gc.safepoint_poll
is. Also fix the style of the declaration of CreateGCStatepoint, in
preparation for another change that will wrap it.

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7517

llvm-svn: 228626
This commit is contained in:
Ramkumar Ramachandra 2015-02-09 23:02:10 +00:00
parent 2e4b9e0a37
commit 3edf74fe29
3 changed files with 9 additions and 8 deletions

View File

@ -442,9 +442,9 @@ public:
/// \brief Create a call to the experimental.gc.statepoint intrinsic to
/// start a new statepoint sequence.
CallInst *CreateGCStatepoint(Value *ActualCallee,
ArrayRef<Value*> CallArgs,
ArrayRef<Value*> DeoptArgs,
ArrayRef<Value*> GCArgs,
ArrayRef<Value *> CallArgs,
ArrayRef<Value *> DeoptArgs,
ArrayRef<Value *> GCArgs,
const Twine &Name = "");
/// \brief Create a call to the experimental.gc.result intrinsic to extract

View File

@ -231,10 +231,10 @@ CallInst *IRBuilderBase::CreateMaskedIntrinsic(unsigned Id,
}
CallInst *IRBuilderBase::CreateGCStatepoint(Value *ActualCallee,
ArrayRef<Value*> CallArgs,
ArrayRef<Value*> DeoptArgs,
ArrayRef<Value*> GCArgs,
const Twine& Name) {
ArrayRef<Value *> CallArgs,
ArrayRef<Value *> DeoptArgs,
ArrayRef<Value *> GCArgs,
const Twine &Name) {
// Extract out the type of the callee.
PointerType *FuncPtrType = cast<PointerType>(ActualCallee->getType());
assert(isa<FunctionType>(FuncPtrType->getElementType()) &&

View File

@ -741,7 +741,8 @@ InsertSafepointPoll(DominatorTree &DT, Instruction *term,
// different type inserted previously
Function *F =
dyn_cast<Function>(M->getOrInsertFunction("gc.safepoint_poll", ftype));
assert(F && !F->empty() && "definition must exist");
assert(F && "void @gc.safepoint_poll() must be defined");
assert(!F->empty() && "gc.safepoint_poll must be a non-empty function");
CallInst *poll = CallInst::Create(F, "", term);
// Record some information about the call site we're replacing