1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/lib/CodeGen/AsmPrinter
Joseph Tremoulet 32b4746b64 [WinEH] Update CoreCLR EH state numbering
Summary:
Fix the CLR state numbering to generate correct tables, and update the lit
test to verify them.

The CLR numbering assigns one state number to each catchpad and
cleanuppad.

It also computes two tree-like relations over states:
 1) Each state has a "HandlerParentState", which is the state of the next
    outer handler enclosing this state's handler (same as nearest ancestor
    per the ParentPad linkage on EH pads, but skipping over catchswitches).
 2) Each state has a "TryParentState", which:
    a) for a catchpad that's not the last handler on its catchswitch, is
       the state of the next catchpad on that catchswitch.
    b) for all other pads, is the state of the pad whose try region is the
       next outer try region enclosing this state's try region.  The "try
       regions are not present as such in the IR, but will be inferred
       based on the placement of invokes and pads which reach each other
       by exceptional exits.

Catchswitches do not get their own states, but each gets mapped to the
state of its first catchpad.

Table generation requires each state's "unwind dest" state to have a lower
state number than the given state.

Since HandlerParentState can be computed as a function of a pad's
ParentPad, and TryParentState can be computed as a function of its unwind
dest and the TryParentStates of its children, the CLR state numbering
algorithm first computes HandlerParentState in a top-down pass, then
computes TryParentState in a bottom-up pass.

Also reword some comments/names in the CLR EH table generation to make the
distinction between the different kinds of "parent" clear.


Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: AndyAyers, llvm-commits

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

llvm-svn: 256760
2016-01-04 16:16:01 +00:00
..
AddressPool.cpp
AddressPool.h
ARMException.cpp [EH] Handle non-Function personalities like unknown personalities 2015-08-31 20:02:16 +00:00
AsmPrinter.cpp [CodeGen] Use generic printAsOperand machinery instead of hand rolling it 2015-12-25 09:37:26 +00:00
AsmPrinterDwarf.cpp Generalize ownership/passing semantics to allow dsymutil to own abbreviations via unique_ptr 2015-11-18 00:34:10 +00:00
AsmPrinterHandler.h [WinEH] Teach AsmPrinter about funclets 2015-09-29 20:12:33 +00:00
AsmPrinterInlineAsm.cpp Reduce the size of MCRelaxableFragment. 2015-11-14 06:35:56 +00:00
ByteStreamer.h -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11 2015-08-03 20:12:58 +00:00
CMakeLists.txt
DbgValueHistoryCalculator.cpp
DbgValueHistoryCalculator.h
DebugLocEntry.h Replace a forward declaration with an #include. 2015-10-15 20:58:55 +00:00
DebugLocStream.cpp
DebugLocStream.h
DIE.cpp [DIE] Make DIE.h NDEBUG conditional-free. 2015-11-24 02:21:43 +00:00
DIEHash.cpp [AsmPrinter] Prune dead code. NFC. 2015-10-15 17:16:32 +00:00
DIEHash.h [AsmPrinter] Prune dead code. NFC. 2015-10-15 17:16:32 +00:00
DwarfAccelTable.cpp Fix some Clang-tidy modernize warnings, other minor fixes. 2015-11-04 22:32:32 +00:00
DwarfAccelTable.h
DwarfCFIException.cpp [EH] Handle non-Function personalities like unknown personalities 2015-08-31 20:02:16 +00:00
DwarfCompileUnit.cpp clang-format lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp 2015-11-11 18:09:47 +00:00
DwarfCompileUnit.h Move imported entities into DwarfCompilationUnit to speed up LTO linking. 2015-10-26 21:36:35 +00:00
DwarfDebug.cpp Set debugger tuning from TargetOptions (NFC) 2015-12-16 19:58:30 +00:00
DwarfDebug.h Set debugger tuning from TargetOptions (NFC) 2015-12-16 19:58:30 +00:00
DwarfException.h [AsmPrinter] Hide implementation details 2015-07-01 16:18:16 +00:00
DwarfExpression.cpp Fix debug info with SafeStack. 2015-09-30 19:55:43 +00:00
DwarfExpression.h
DwarfFile.cpp
DwarfFile.h
DwarfStringPool.cpp
DwarfStringPool.h
DwarfUnit.cpp [DIBuilder] Make createReferenceType take size and align 2015-11-16 07:57:32 +00:00
DwarfUnit.h [AsmPrinter] Prune dead code. NFC. 2015-10-15 17:16:32 +00:00
EHStreamer.cpp Use make_range(rbegin(), rend()) to allow foreach loops. NFC. 2015-07-24 21:13:43 +00:00
EHStreamer.h [WinEH] Emit __C_specific_handler tables for the new IR 2015-10-01 21:38:24 +00:00
ErlangGCPrinter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
LLVMBuild.txt
Makefile
OcamlGCPrinter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
WinCodeViewLineTables.cpp Use std::string instead of strdup() and free() in WinCodeViewLineTables 2015-12-02 22:34:30 +00:00
WinCodeViewLineTables.h Use std::string instead of strdup() and free() in WinCodeViewLineTables 2015-12-02 22:34:30 +00:00
WinException.cpp [WinEH] Update CoreCLR EH state numbering 2016-01-04 16:16:01 +00:00
WinException.h [WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunction 2015-11-17 21:10:25 +00:00