[compiler-rt] r253483 - [PGO] Runtime support for value profiling.

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 14:28:26 PST 2015


On Fri, Dec 4, 2015 at 2:15 PM, Chris Bieneman <beanz at apple.com> wrote:

> There is no equivalent to LLVM_HAS_ATOMICS in compiler-rt, and compiler-rt
> by design has no explicit dependencies on LLVM or Clang, so you can’t just
> use LLVM_HAS_ATOMICS.
>

 Right -- we had that discussion in another thread



> Probably the best thing to do would be to implement a similar check in
> compiler-rt and populate a variable COMPILER_RT_HAS_ATOMICS.
>
>
This seems working. Patch will be sent you way for review.

thanks,

David



> -Chris
>
> On Dec 4, 2015, at 1:55 PM, Xinliang David Li <xinliangli at gmail.com>
> wrote:
>
> Loop in Chris for advice.
>
> Chris, I need a way to enable/disable use of atomic operations for profile
> library build. The cmake currently defines variable LLVM_HAS_ATOMICS which
> is set via 'CHECK_CXX_SOURCE_COMPILES(..)' call.  Can this variable be used
> in library CMakeLists file or is it for host compilation only? If not, what
> is the best alternatives? I am hesitant  to manually check each one of the
> arch variants ...
>
> thanks,
>
> David
>
>
> On Thu, Dec 3, 2015 at 3:55 PM, Xinliang David Li <xinliangli at gmail.com>
> wrote:
>
>> I have a pending patch to remove the need for sync_fetch_add operation.
>> After that gets in, I will do more cleanups to make the problem go away.
>>
>> David
>>
>>
>> On Thu, Dec 3, 2015 at 3:38 PM, Joerg Sonnenberger via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>> On Wed, Nov 18, 2015 at 06:12:35PM -0000, Betul Buyukkurt via
>>> llvm-commits wrote:
>>> > Author: betulb
>>> > Date: Wed Nov 18 12:12:35 2015
>>> > New Revision: 253483
>>> >
>>> > URL: http://llvm.org/viewvc/llvm-project?rev=253483&view=rev
>>> > Log:
>>> > [PGO] Runtime support for value profiling.
>>> >
>>> > This change adds extends the data structures and adds in the routines
>>> > for handling runtime calls for value profiling. The profile data format
>>> > is modified and the version number is incremented.
>>>
>>> This revision has introduced a serious portability regression. Now the
>>> instruction profiling code requires the present of 64bit atomics, which
>>> simple don't exist on many platforms.
>>>
>>> Joerg
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151204/9e448350/attachment.html>


More information about the llvm-commits mailing list