[PATCH] Move the personality function from LandingPadInst to Function

David Majnemer david.majnemer at gmail.com
Sat Jun 13 23:19:48 PDT 2015


Hi qcolombet,

The personality routine currently lives in the LandingPadInst.

This isn't desirable because:
- All LandingPadInsts in the same function must have the same
  personality routine.  This means that each LandingPadInst beyond the
  first has an operand which produces no additional information.

- There is ongoing work to introduce EH IR constructs other than
  LandingPadInst.  Moving the personality routine off of any one
  particular Instruction and onto the parent function seems a lot better
  than have N different places a personality function can sneak onto an
  exceptional function.

http://reviews.llvm.org/D10429

Files:
  docs/BitCodeFormat.rst
  docs/LangRef.rst
  include/llvm/Analysis/LibCallSemantics.h
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/IR/Function.h
  include/llvm/IR/IRBuilder.h
  include/llvm/IR/Instructions.h
  lib/Analysis/LibCallSemantics.cpp
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/Bitcode/Writer/ValueEnumerator.cpp
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/DwarfEHPrepare.cpp
  lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/CodeGen/ShadowStackGCLowering.cpp
  lib/CodeGen/SjLjEHPrepare.cpp
  lib/CodeGen/WinEHPrepare.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/Core.cpp
  lib/IR/Function.cpp
  lib/IR/Instructions.cpp
  lib/IR/TypeFinder.cpp
  lib/IR/Verifier.cpp
  lib/Linker/LinkModules.cpp
  lib/Target/X86/X86WinEHState.cpp
  lib/Transforms/IPO/GlobalDCE.cpp
  lib/Transforms/IPO/PruneEH.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp
  lib/Transforms/Utils/InlineFunction.cpp
  lib/Transforms/Utils/Local.cpp
  test/Analysis/CallGraph/do-nothing-intrinsic.ll
  test/Analysis/Dominators/invoke.ll
  test/Analysis/LazyCallGraph/basic.ll
  test/Analysis/Lint/cppeh-catch-intrinsics-clean.ll
  test/Analysis/Lint/cppeh-catch-intrinsics.ll
  test/Assembler/invalid-landingpad.ll
  test/Bitcode/miscInstructions.3.2.ll
  test/CodeGen/AArch64/arm64-big-endian-eh.ll
  test/CodeGen/AArch64/br-to-eh-lpad.ll
  test/CodeGen/AArch64/pic-eh-stubs.ll
  test/CodeGen/ARM/2009-08-31-LSDA-Name.ll
  test/CodeGen/ARM/2010-07-26-GlobalMerge.ll
  test/CodeGen/ARM/2010-08-04-EHCrash.ll
  test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll
  test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll
  test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll
  test/CodeGen/ARM/2014-05-14-DwarfEHCrash.ll
  test/CodeGen/ARM/arm-ttype-target2.ll
  test/CodeGen/ARM/big-endian-eh-unwind.ll
  test/CodeGen/ARM/crash.ll
  test/CodeGen/ARM/debug-frame-no-debug.ll
  test/CodeGen/ARM/debug-frame.ll
  test/CodeGen/ARM/dwarf-eh.ll
  test/CodeGen/ARM/eh-dispcont.ll
  test/CodeGen/ARM/eh-resume-darwin.ll
  test/CodeGen/ARM/ehabi-filters.ll
  test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll
  test/CodeGen/ARM/ehabi-handlerdata.ll
  test/CodeGen/ARM/ehabi.ll
  test/CodeGen/ARM/global-merge.ll
  test/CodeGen/ARM/gv-stubs-crash.ll
  test/CodeGen/ARM/invoke-donothing-assert.ll
  test/CodeGen/ARM/sjlj-prepare-critical-edge.ll
  test/CodeGen/ARM/sjljehprepare-lower-empty-struct.ll
  test/CodeGen/Generic/2007-02-25-invoke.ll
  test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll
  test/CodeGen/Generic/2007-12-17-InvokeAsm.ll
  test/CodeGen/Generic/2007-12-31-UnusedSelector.ll
  test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll
  test/CodeGen/Generic/donothing.ll
  test/CodeGen/Generic/exception-handling.ll
  test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
  test/CodeGen/Mips/eh.ll
  test/CodeGen/Mips/ehframe-indirect.ll
  test/CodeGen/Mips/insn-zero-size-bb.ll
  test/CodeGen/Mips/mips16ex.ll
  test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll
  test/CodeGen/PowerPC/extra-toc-reg-deps.ll
  test/CodeGen/PowerPC/fast-isel-icmp-split.ll
  test/CodeGen/PowerPC/glob-comp-aa-crash.ll
  test/CodeGen/PowerPC/pr18663-2.ll
  test/CodeGen/PowerPC/preincprep-invoke.ll
  test/CodeGen/SPARC/exception.ll
  test/CodeGen/Thumb/sjljehprepare-lower-vector.ll
  test/CodeGen/Thumb2/constant-islands.ll
  test/CodeGen/WinEH/cppeh-alloca-sink.ll
  test/CodeGen/WinEH/cppeh-catch-all.ll
  test/CodeGen/WinEH/cppeh-catch-and-throw.ll
  test/CodeGen/WinEH/cppeh-catch-scalar.ll
  test/CodeGen/WinEH/cppeh-catch-unwind.ll
  test/CodeGen/WinEH/cppeh-cleanup-invoke.ll
  test/CodeGen/WinEH/cppeh-demote-liveout.ll
  test/CodeGen/WinEH/cppeh-frame-vars.ll
  test/CodeGen/WinEH/cppeh-inalloca.ll
  test/CodeGen/WinEH/cppeh-min-unwind.ll
  test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll
  test/CodeGen/WinEH/cppeh-multi-catch.ll
  test/CodeGen/WinEH/cppeh-nested-1.ll
  test/CodeGen/WinEH/cppeh-nested-2.ll
  test/CodeGen/WinEH/cppeh-nested-3.ll
  test/CodeGen/WinEH/cppeh-nested-rethrow.ll
  test/CodeGen/WinEH/cppeh-nonalloca-frame-values.ll
  test/CodeGen/WinEH/cppeh-prepared-catch-all.ll
  test/CodeGen/WinEH/cppeh-prepared-catch-reordered.ll
  test/CodeGen/WinEH/cppeh-prepared-catch.ll
  test/CodeGen/WinEH/cppeh-prepared-cleanups.ll
  test/CodeGen/WinEH/cppeh-shared-empty-catch.ll
  test/CodeGen/WinEH/cppeh-similar-catch-blocks.ll
  test/CodeGen/WinEH/cppeh-state-calc-1.ll
  test/CodeGen/WinEH/seh-catch-all.ll
  test/CodeGen/WinEH/seh-inlined-finally.ll
  test/CodeGen/WinEH/seh-outlined-finally.ll
  test/CodeGen/WinEH/seh-prepared-basic.ll
  test/CodeGen/WinEH/seh-resume-phi.ll
  test/CodeGen/WinEH/seh-simple.ll
  test/CodeGen/X86/2007-05-05-Personality.ll
  test/CodeGen/X86/2008-04-17-CoalescerBug.ll
  test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll
  test/CodeGen/X86/2009-03-13-PHIElimBug.ll
  test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
  test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll
  test/CodeGen/X86/2009-11-25-ImpDefBug.ll
  test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll
  test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll
  test/CodeGen/X86/2010-08-04-MingWCrash.ll
  test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
  test/CodeGen/X86/2012-05-19-CoalescerCrash.ll
  test/CodeGen/X86/2012-11-30-misched-dbg.ll
  test/CodeGen/X86/asm-label2.ll
  test/CodeGen/X86/block-placement.ll
  test/CodeGen/X86/branchfolding-landingpads.ll
  test/CodeGen/X86/catch.ll
  test/CodeGen/X86/cfi.ll
  test/CodeGen/X86/code_placement_eh.ll
  test/CodeGen/X86/dwarf-eh-prepare.ll
  test/CodeGen/X86/eh-label.ll
  test/CodeGen/X86/exception-label.ll
  test/CodeGen/X86/fast-isel-cmp-branch.ll
  test/CodeGen/X86/fast-isel-gep.ll
  test/CodeGen/X86/gcc_except_table.ll
  test/CodeGen/X86/gcc_except_table_functions.ll
  test/CodeGen/X86/global-sections.ll
  test/CodeGen/X86/inalloca-invoke.ll
  test/CodeGen/X86/indirect-hidden.ll
  test/CodeGen/X86/large-gep-chain.ll
  test/CodeGen/X86/patchpoint-invoke.ll
  test/CodeGen/X86/personality.ll
  test/CodeGen/X86/personality_size.ll
  test/CodeGen/X86/pr3522.ll
  test/CodeGen/X86/scev-interchange.ll
  test/CodeGen/X86/seh-catch-all-win32.ll
  test/CodeGen/X86/seh-catch-all.ll
  test/CodeGen/X86/seh-except-finally.ll
  test/CodeGen/X86/seh-filter.ll
  test/CodeGen/X86/seh-finally.ll
  test/CodeGen/X86/seh-safe-div-win32.ll
  test/CodeGen/X86/seh-safe-div.ll
  test/CodeGen/X86/setjmp-spills.ll
  test/CodeGen/X86/split-eh-lpad-edges.ll
  test/CodeGen/X86/stack-protector.ll
  test/CodeGen/X86/statepoint-invoke.ll
  test/CodeGen/X86/statepoint-stack-usage.ll
  test/CodeGen/X86/win32-eh-states.ll
  test/CodeGen/X86/win32-eh.ll
  test/CodeGen/X86/win64_call_epi.ll
  test/CodeGen/X86/win64_eh.ll
  test/CodeGen/X86/win_eh_prepare.ll
  test/CodeGen/XCore/exception.ll
  test/DebugInfo/AArch64/eh_frame_personality.ll
  test/DebugInfo/AArch64/frameindices.ll
  test/DebugInfo/SystemZ/eh_frame_personality.ll
  test/DebugInfo/X86/arange-and-stub.ll
  test/DebugInfo/X86/sret.ll
  test/DebugInfo/inline-debug-info-multiret.ll
  test/DebugInfo/inline-debug-info.ll
  test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
  test/ExecutionEngine/MCJIT/eh-lg-pic.ll
  test/ExecutionEngine/MCJIT/eh-sm-pic.ll
  test/ExecutionEngine/MCJIT/eh.ll
  test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
  test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll
  test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
  test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
  test/ExecutionEngine/OrcMCJIT/eh.ll
  test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
  test/Feature/callingconventions.ll
  test/Feature/calltest.ll
  test/Feature/exception.ll
  test/Feature/seh-nounwind.ll
  test/Instrumentation/AddressSanitizer/instrument-no-return.ll
  test/LTO/X86/linkonce_odr_func.ll
  test/Other/2008-10-15-MissingSpace.ll
  test/Other/2009-03-31-CallGraph.ll
  test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll
  test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll
  test/Transforms/ADCE/dce_pure_invoke.ll
  test/Transforms/ArgumentPromotion/crash.ll
  test/Transforms/BDCE/dce-pure.ll
  test/Transforms/BDCE/order.ll
  test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll
  test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll
  test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll
  test/Transforms/FunctionAttrs/nocapture.ll
  test/Transforms/GVN/2010-05-08-OneBit.ll
  test/Transforms/GVN/2011-09-07-TypeIdFor.ll
  test/Transforms/GVN/cond_br2.ll
  test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll
  test/Transforms/GlobalOpt/invoke.ll
  test/Transforms/IPConstantProp/return-argument.ll
  test/Transforms/IPConstantProp/return-constant.ll
  test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll
  test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll
  test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll
  test/Transforms/IndVarSimplify/crash.ll
  test/Transforms/IndVarSimplify/interesting-invoke-use.ll
  test/Transforms/Inline/2003-09-14-InlineValue.ll
  test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll
  test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll
  test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll
  test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll
  test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll
  test/Transforms/Inline/2007-04-15-InlineEH.ll
  test/Transforms/Inline/callgraph-update.ll
  test/Transforms/Inline/crash.ll
  test/Transforms/Inline/debug-invoke.ll
  test/Transforms/Inline/inline-invoke-tail.ll
  test/Transforms/Inline/inline-invoke-with-asm-call.ll
  test/Transforms/Inline/inline_invoke.ll
  test/Transforms/Inline/inline_returns_twice.ll
  test/Transforms/Inline/invoke-cleanup.ll
  test/Transforms/Inline/invoke-combine-clauses.ll
  test/Transforms/Inline/invoke-cost.ll
  test/Transforms/Inline/invoke_test-1.ll
  test/Transforms/Inline/invoke_test-2.ll
  test/Transforms/Inline/invoke_test-3.ll
  test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll
  test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll
  test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll
  test/Transforms/InstCombine/AddOverFlow.ll
  test/Transforms/InstCombine/LandingPadClauses.ll
  test/Transforms/InstCombine/call.ll
  test/Transforms/InstCombine/cast.ll
  test/Transforms/InstCombine/crash.ll
  test/Transforms/InstCombine/gepphigep.ll
  test/Transforms/InstCombine/invoke.ll
  test/Transforms/InstCombine/malloc-free-delete.ll
  test/Transforms/InstCombine/objsize-64.ll
  test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll
  (60 more files...)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10429.27636.patch
Type: text/x-patch
Size: 446538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150614/4c5e1659/attachment.bin>


More information about the llvm-commits mailing list