Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate constant reference API to DoNotOptimize. #1493

Merged
merged 3 commits into from
Feb 6, 2023

Commits on Sep 28, 2022

  1. Deprecate constant reference API to DoNotOptimize.

    The compiler assume that a constant reference, even though escaped via asm
    volatile, is unchanged.  The const-ref interface is deprecated to discourage
    new uses of it, as subtle compiler optimizations (invariant hoisting, etc.) can
    occur.
    
    Within microbenchmarks for Abseil's hashtables, BM_FindMiss_Hot
    (https://github.com/google/fleetbench/blob/c0eaa90671d6cc99eb065864e74f0175bee24a5d/fleetbench/swissmap/hot_swissmap_benchmark.cc#L48)
    has a `const uint32_t key` is passed to to the lookup of a hashtable.
    With the `key` marked `const`, LLVM hoists part of the lookup
    calculation outside of the loop.
    
    With the `const` removed, this hoisting does not occur.
    ckennelly committed Sep 28, 2022
    Configuration menu
    Copy the full SHA
    55ca62a View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2022

  1. Configuration menu
    Copy the full SHA
    0f360ea View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Configuration menu
    Copy the full SHA
    cd9c582 View commit details
    Browse the repository at this point in the history