• Show log

    Commit

  • Hash : 1593390b
    Author : Roman Lavrov
    Date : 2025-04-07T11:22:21

    Increase ANGLE_LIKELY/UNLIKELY probability to 99.99%
    
    I can't find the exact value for clang, but according to GCC docs
    __builtin_expect probability is assumed to be only 90%. When we actually
    bother to use ANGLE_LIKELY we mean "almost always", so this value can
    be much higher. Setting to 99.99% because lower values don't seem to
    trigger the optimization below (at least 99.9% doesn't)
    
    __builtin_expect already enables some optimizations such as moving
    unlikely branches (e.g. cold function calls) out of the primary flow.
    Increasing the probability enables more aggressive optimizations such as
    making those function calls store/load registers only in the rare
    cases when this call is made - which allows the rest of the caller to be
    made more efficient by not having to handle these register changes.
    Example:
    
    stur w4, [x29, #-0xc]
    stur x8, [x29, #-0x8]
    str x3, [sp, #0x8]
    stp w2, w1, [x29, #0x18]
    bl 0x356fdc <_ZNK2gl7Context25getActiveLinkedProgramPPOEv>
    ldp w2, w1, [x29, #0x18]
    ldr x3, [sp, #0x8]
    ldur w4, [x29, #-0xc]
    ldur x8, [x29, #-0x8]
    
    Bug: b/383305597
    Change-Id: I077f4f2cb90cfb8282409d12adcb02c3302e7761
    Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6437572
    Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
    Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/angle.git
    Git SSH git@git.kmx.io:kc3-lang/angle.git
    Public access ? public
    Description

    A conformant OpenGL ES implementation for Windows, Mac, Linux, iOS and Android.

    Homepage

    Github

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg thodg_l
    Tags