llvm/lib
David Majnemer 2dacece9e2 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245029 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-14 05:09:07 +00:00
..
Analysis [IR] Add token types 2015-08-14 05:09:07 +00:00
AsmParser [IR] Add token types 2015-08-14 05:09:07 +00:00
Bitcode [IR] Add token types 2015-08-14 05:09:07 +00:00
CodeGen [PM/AA] Hoist the interface to TBAA into a dedicated header along with 2015-08-14 03:33:48 +00:00
DebugInfo Fix some comment typos. 2015-08-08 18:27:36 +00:00
ExecutionEngine Remove and forbid raw_svector_ostream::flush() calls. 2015-08-13 18:12:56 +00:00
Fuzzer Fix missing space in libfuzzer's help text. 2015-08-12 20:00:10 +00:00
IR [IR] Add token types 2015-08-14 05:09:07 +00:00
IRReader
LibDriver There is only one saver of strings. 2015-08-13 01:07:02 +00:00
LineEditor
Linker Linker: Move distinct MDNodes instead of cloning 2015-08-03 17:09:38 +00:00
LTO Remove access to the DataLayout in the TargetMachine 2015-07-24 16:04:22 +00:00
MC Remove and forbid raw_svector_ostream::flush() calls. 2015-08-13 18:12:56 +00:00
Object Convert getSymbolSection to return an ErrorOr. 2015-08-07 23:27:14 +00:00
Option Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier. 2015-07-29 17:34:41 +00:00
Passes
ProfileData
Support Fix GCC warning: extra `;' [-Wpedantic]. 2015-08-13 18:10:19 +00:00
TableGen TableGen: Support folding casts from bits to int 2015-07-31 01:12:06 +00:00
Target [IR] Add token types 2015-08-14 05:09:07 +00:00
Transforms [IR] Add token types 2015-08-14 05:09:07 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile