Skip to content

Commit 3edf74f

Browse files
committedFeb 9, 2015
[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
1 parent 2e4b9e0 commit 3edf74f

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed
 

‎llvm/include/llvm/IR/IRBuilder.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ class IRBuilderBase {
442442
/// \brief Create a call to the experimental.gc.statepoint intrinsic to
443443
/// start a new statepoint sequence.
444444
CallInst *CreateGCStatepoint(Value *ActualCallee,
445-
ArrayRef<Value*> CallArgs,
446-
ArrayRef<Value*> DeoptArgs,
447-
ArrayRef<Value*> GCArgs,
445+
ArrayRef<Value *> CallArgs,
446+
ArrayRef<Value *> DeoptArgs,
447+
ArrayRef<Value *> GCArgs,
448448
const Twine &Name = "");
449449

450450
/// \brief Create a call to the experimental.gc.result intrinsic to extract

‎llvm/lib/IR/IRBuilder.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ CallInst *IRBuilderBase::CreateMaskedIntrinsic(unsigned Id,
231231
}
232232

233233
CallInst *IRBuilderBase::CreateGCStatepoint(Value *ActualCallee,
234-
ArrayRef<Value*> CallArgs,
235-
ArrayRef<Value*> DeoptArgs,
236-
ArrayRef<Value*> GCArgs,
237-
const Twine& Name) {
234+
ArrayRef<Value *> CallArgs,
235+
ArrayRef<Value *> DeoptArgs,
236+
ArrayRef<Value *> GCArgs,
237+
const Twine &Name) {
238238
// Extract out the type of the callee.
239239
PointerType *FuncPtrType = cast<PointerType>(ActualCallee->getType());
240240
assert(isa<FunctionType>(FuncPtrType->getElementType()) &&

‎llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,8 @@ InsertSafepointPoll(DominatorTree &DT, Instruction *term,
741741
// different type inserted previously
742742
Function *F =
743743
dyn_cast<Function>(M->getOrInsertFunction("gc.safepoint_poll", ftype));
744-
assert(F && !F->empty() && "definition must exist");
744+
assert(F && "void @gc.safepoint_poll() must be defined");
745+
assert(!F->empty() && "gc.safepoint_poll must be a non-empty function");
745746
CallInst *poll = CallInst::Create(F, "", term);
746747

747748
// Record some information about the call site we're replacing

0 commit comments

Comments
 (0)
Please sign in to comment.