llvm/lib/AsmParser
Sean Fertile 509132b368 Represent runtime preemption in the IR.
Currently we do not represent runtime preemption in the IR, which has several
drawbacks:

  1) The semantics of GlobalValues differ depending on the object file format
     you are targeting (as well as the relocation-model and -fPIE value).
  2) We have no way of disabling inlining of run time interposable functions,
     since in the IR we only know if a function is link-time interposable.
     Because of this llvm cannot support elf-interposition semantics.
  3) In LTO builds of executables we will have extra knowledge that a symbol
     resolved to a local definition and can't be preemptable, but have no way to
     propagate that knowledge through the compiler.

This patch adds preemptability specifiers to the IR with the following meaning:

dso_local --> means the compiler may assume the symbol will resolve to a
 definition within the current linkage unit and the symbol may be accessed
 directly even if the definition is not within this compilation unit.

dso_preemptable --> means that the compiler must assume the GlobalValue may be
replaced with a definition from outside the current linkage unit at runtime.

To ease transitioning dso_preemptable is treated as a 'default' in that
low-level codegen will still do the same checks it did previously to see if a
symbol should be accessed indirectly. Eventually when IR producers emit the
specifiers on all Globalvalues we can change dso_preemptable to mean 'always
access indirectly', and remove the current logic.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316668 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-26 15:00:26 +00:00
..
CMakeLists.txt
LLLexer.cpp Represent runtime preemption in the IR. 2017-10-26 15:00:26 +00:00
LLLexer.h
LLParser.cpp Represent runtime preemption in the IR. 2017-10-26 15:00:26 +00:00
LLParser.h Represent runtime preemption in the IR. 2017-10-26 15:00:26 +00:00
LLToken.h Represent runtime preemption in the IR. 2017-10-26 15:00:26 +00:00
LLVMBuild.txt Add dependency from AsmParser to BinaryFormat. 2017-06-07 04:24:33 +00:00
Parser.cpp Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00