[all-commits] [llvm/llvm-project] e96df3: [Passes] Add relative lookup table converter pass

gulfemsavrun via All-commits all-commits at lists.llvm.org
Mon Apr 12 18:30:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e96df3e531f506eea75da0f13d0f8aa9a267f975
      https://github.com/llvm/llvm-project/commit/e96df3e531f506eea75da0f13d0f8aa9a267f975
  Author: Gulfem Savrun Yeniceri <gulfem at google.com>
  Date:   2021-04-13 (Tue, 13 Apr 2021)

  Changed paths:
    M llvm/docs/Passes.rst
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    A llvm/include/llvm/Transforms/Utils/RelLookupTableConverter.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/Utils/CMakeLists.txt
    A llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp
    M llvm/test/Other/new-pm-defaults.ll
    M llvm/test/Other/new-pm-thinlto-defaults.ll
    M llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
    M llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
    A llvm/test/Transforms/RelLookupTableConverter/X86/no_relative_lookup_table.ll
    A llvm/test/Transforms/RelLookupTableConverter/X86/relative_lookup_table.ll

  Log Message:
  -----------
  [Passes] Add relative lookup table converter pass

Lookup tables generate non PIC-friendly code, which requires dynamic relocation as described in:
https://bugs.llvm.org/show_bug.cgi?id=45244

This patch adds a new pass that converts lookup tables to relative lookup tables to make them PIC-friendly.

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




More information about the All-commits mailing list