[all-commits] [llvm/llvm-project] dacfa2: Delete 'llvm.asan.globals' for global metadata.

Mitch Phillips via All-commits all-commits at lists.llvm.org
Mon Jun 27 14:57:10 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dacfa24f75c328ae30b710ecadaa18e4ba10cdc6
      https://github.com/llvm/llvm-project/commit/dacfa24f75c328ae30b710ecadaa18e4ba10cdc6
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/CodeGen/SanitizerMetadata.cpp
    M clang/lib/CodeGen/SanitizerMetadata.h
    M clang/test/CodeGen/asan-globals.cpp
    M clang/test/CodeGen/hwasan-globals.cpp
    M clang/test/CodeGen/memtag-globals.cpp
    M clang/test/CodeGen/sanitize-init-order.cpp
    M compiler-rt/test/asan/TestCases/global-location-nodebug.cpp
    M compiler-rt/test/asan/TestCases/global-location.cpp
    M llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    M llvm/test/Instrumentation/AddressSanitizer/global_metadata.ll
    M llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll
    M llvm/test/Instrumentation/AddressSanitizer/global_with_comdat.ll
    M llvm/test/Instrumentation/AddressSanitizer/instrument_global.ll
    M llvm/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll
    M llvm/test/Instrumentation/AddressSanitizer/win-string-literal.ll
    M llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll
    M llvm/tools/opt/NewPMDriver.cpp

  Log Message:
  -----------
  Delete 'llvm.asan.globals' for global metadata.

Now that we have the sanitizer metadata that is actually on the global
variable, and now that we use debuginfo in order to do symbolization of
globals, we can delete the 'llvm.asan.globals' IR synthesis.

This patch deletes the 'location' part of the __asan_global that's
embedded in the binary as well, because it's unnecessary. This saves
about ~1.7% of the optimised non-debug with-asserts clang binary.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D127911




More information about the All-commits mailing list