llvm-project/llvm/include/llvm-c
David Majnemer b611e3f50e [IR] Add token types
This introduces the basic functionality to support "token types".
The motivation stems from the need to perform operations on a Value
whose provenance cannot be obscured.

There are several applications for such a type but my immediate
motivation stems from WinEH.  Our personality routine enforces a
single-entry - single-exit regime for cleanups.  After several rounds of
optimizations, we may be left with a terminator whose "cleanup-entry
block" is not entirely clear because control flow has merged two
cleanups together.  We have experimented with using labels as operands
inside of instructions which are not terminators to indicate where we
came from but found that LLVM does not expect such exotic uses of
BasicBlocks.

Instead, we can use this new type to clearly associate the "entry point"
and "exit point" of our cleanup.  This is done by having the cleanuppad
yield a Token and consuming it at the cleanupret.
The token type makes it impossible to obscure or otherwise hide the
Value, making it trivial to track the relationship between the two
points.

What is the burden to the optimizer?  Well, it turns out we have already
paid down this cost by accepting that there are certain calls that we
are not permitted to duplicate, optimizations have to watch out for
such instructions anyway.  There are additional places in the optimizer
that we will probably have to update but early examination has given me
the impression that this will not be heroic.

Differential Revision: http://reviews.llvm.org/D11861

llvm-svn: 245029
2015-08-14 05:09:07 +00:00
..
Transforms [BDCE] Add a bit-tracking DCE pass 2015-02-17 01:36:59 +00:00
Analysis.h
BitReader.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
BitWriter.h Introduce LLVMWriteBitcodeToMemoryBuffer C API function. 2014-10-14 00:30:59 +00:00
Core.h [IR] Add token types 2015-08-14 05:09:07 +00:00
Disassembler.h Extend C disassembler API to allow specifying target features 2014-09-30 16:31:40 +00:00
ExecutionEngine.h [C API] Expose LLVMGetGlobalValueAddress and LLVMGetFunctionAddress. 2014-12-22 18:53:11 +00:00
IRReader.h Fix known typos 2014-01-24 17:20:08 +00:00
Initialization.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LinkTimeOptimizer.h include/llvm-c: Whitespace. 2013-10-23 17:56:29 +00:00
Linker.h Restore LLVMLinkModules C API until it is properly deprecated. 2015-03-02 18:59:38 +00:00
Object.h Remove getRelocationAddress. 2015-07-06 14:55:37 +00:00
Support.h Add more wrappers for symbol APIs to the C API. 2015-06-09 15:57:30 +00:00
Target.h [llvm-c] Remove dead typedef 2013-11-11 14:47:01 +00:00
TargetMachine.h Add target analysis passes to the codegen pipeline for MCJIT. 2014-01-23 19:23:28 +00:00
lto.h LTO: expose LTO_SYMBOL_ALIAS, which indicates that the symbol is an alias. 2015-07-04 03:42:35 +00:00
module.modulemap [modules] The LLVM C API does not require C++! 2014-06-12 22:09:39 +00:00