[PATCH] Add function entry count metadata.

Diego Novillo dnovillo at google.com
Fri May 8 16:39:41 PDT 2015


Return Optional<uint64_t> from getEntryCount to indicate whether a count is available.

I'm getting several odd failures in the testsuite. Even though the new code
is only called from the unittest, I'm getting several related failures.
For example,

bin/opt -S test/Verifier/statepoint.ll -verify
----------------------------------------------

Exit Code: 2

Command Output (stderr):
------------------------

gc.statepoint mismatch in number of vararg call args

  %safepoint_token = call i32 (void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* undef, i32 0, i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 10, i32 0, i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg)

gc.statepoint mismatch in number of vararg call args

  %safepoint_token = call i32 (void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* undef, i32 0, i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 10, i32 0, i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg)

gc.statepoint mismatch in number of vararg call args

  %0 = invoke i32 (void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(void ()* undef, i32 0, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0, i8 addrspace(1)* %obj, i8 addrspace(1)* %obj1)
          to label %normal_dest unwind label %exceptional_return

It seems related to metadata, but I'm not sure how my patch could've triggered
this. Am I missing anything obvious?

Thanks.


http://reviews.llvm.org/D9628

Files:
  include/llvm/IR/Function.h
  include/llvm/IR/MDBuilder.h
  lib/IR/MDBuilder.cpp
  unittests/IR/MetadataTest.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9628.25390.patch
Type: text/x-patch
Size: 3572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150508/8db62f0e/attachment.bin>


More information about the llvm-commits mailing list