[PATCH] [Statepoint] Improve two asserts, fix some style (NFC)
Ramkumar Ramachandra
artagnon at gmail.com
Mon Feb 9 15:04:10 PST 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7517
Files:
llvm/trunk/include/llvm/IR/IRBuilder.h
llvm/trunk/lib/IR/IRBuilder.cpp
llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
Index: llvm/trunk/include/llvm/IR/IRBuilder.h
===================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h
+++ llvm/trunk/include/llvm/IR/IRBuilder.h
@@ -442,9 +442,9 @@
/// \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
Index: llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
+++ llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
@@ -741,7 +741,8 @@
// 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
Index: llvm/trunk/lib/IR/IRBuilder.cpp
===================================================================
--- llvm/trunk/lib/IR/IRBuilder.cpp
+++ llvm/trunk/lib/IR/IRBuilder.cpp
@@ -231,10 +231,10 @@
}
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()) &&
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7517.19620.patch
Type: text/x-patch
Size: 2604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/e8f4fdca/attachment.bin>
More information about the llvm-commits
mailing list