[Statepoint] Improve two asserts, fix some style (NFC)
authorRamkumar Ramachandra <artagnon@gmail.com>
Mon, 9 Feb 2015 23:02:10 +0000 (23:02 +0000)
committerRamkumar Ramachandra <artagnon@gmail.com>
Mon, 9 Feb 2015 23:02:10 +0000 (23:02 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228626 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/IRBuilder.h
lib/IR/IRBuilder.cpp
lib/Transforms/Scalar/PlaceSafepoints.cpp

index 1e019581045ce8dc6275e6abed803faf796c1556..31b0470239521fc17d038f0d235af41477959428 100644 (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
index dd29e7ae24fc307ca2df2fa5b63b842907fbfeb8..194f01e26ae5a74fa798f3b724cb0f54b4fa08cc 100644 (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 TwineName) {
+                                            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()) &&
index 517c4c95aa7224c0c3a41c9a33e1a5331d5d3eb9..7b10d543736dcdf7b443c9e7ae5fa2c91623b208 100644 (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