[all-commits] [llvm/llvm-project] fd09f1: Implement -fsemantic-interposition

serge-sans-paille via All-commits all-commits at lists.llvm.org
Fri Jan 31 05:02:57 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fd09f12f32f57564d619a28b8826d33ade47b12e
      https://github.com/llvm/llvm-project/commit/fd09f12f32f57564d619a28b8826d33ade47b12e
  Author: serge-sans-paille <sguelton at redhat.com>
  Date:   2020-01-31 (Fri, 31 Jan 2020)

  Changed paths:
    M clang/docs/ClangCommandLineReference.rst
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    A clang/test/CodeGen/semantic-interposition.c
    M clang/test/Driver/clang_f_opts.c
    M llvm/include/llvm/IR/GlobalValue.h
    M llvm/include/llvm/IR/Module.h
    M llvm/lib/IR/Globals.cpp
    M llvm/lib/IR/Module.cpp
    M llvm/lib/IR/Verifier.cpp
    A llvm/test/Transforms/Inline/inline-semantic-interposition.ll
    A llvm/test/Verifier/module-flags-semantic-interposition.ll

  Log Message:
  -----------
  Implement -fsemantic-interposition

First attempt at implementing -fsemantic-interposition.

Rely on GlobalValue::isInterposable that already captures most of the expected
behavior.

Rely on a ModuleFlag to state whether we should respect SemanticInterposition or
not. The default remains no.

So this should be a no-op if -fsemantic-interposition isn't used, and if it is,
isInterposable being already used in most optimisation, they should honor it
properly.

Note that it only impacts architecture compiled with -fPIC and no pie.

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




More information about the All-commits mailing list