llvm-project/llvm/lib/Transforms/IPO
David Majnemer fa36bde2f6 [DeadArgElim] Split the invoke successor edge
Invoking a function which returns an aggregate can sometimes be
transformed to return a scalar value.  However, this means that we need
to create an insertvalue instruction(s) to recreate the correct
aggregate type.  We achieved this by inserting an insertvalue
instruction at the invoke's normal successor.  However, this is not
feasible if the normal successor uses the invoke's return value inside a
PHI node.

Instead, split the edge between the invoke and the unwind successor and
create the insertvalue instruction in the new basic block.  The new
basic block's successor will be the old invoke successor which leaves
us with IR which is well behaved.

This fixes PR24906.

llvm-svn: 248387
2015-09-23 15:41:09 +00:00
..
ArgumentPromotion.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
BarrierNoopPass.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CMakeLists.txt Convert SampleProfile pass into a Module pass. 2015-08-25 15:25:11 +00:00
ConstantMerge.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DeadArgumentElimination.cpp [DeadArgElim] Split the invoke successor edge 2015-09-23 15:41:09 +00:00
ElimAvailExtern.cpp Remove two unused includes and C++11 rangify for loops. 2015-09-04 20:24:24 +00:00
ExtractGV.cpp [llvm-extract] Drop comdats from declarations 2015-07-06 18:48:02 +00:00
FunctionAttrs.cpp [FunctionAttrs] Extract a helper function for the core logic used to 2015-09-21 17:39:41 +00:00
GlobalDCE.cpp Rangify for loops in GlobalDCE, NFC. 2015-07-18 19:57:34 +00:00
GlobalOpt.cpp Assume intrinsic handling in global opt 2015-08-25 01:34:15 +00:00
IPConstantPropagation.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
IPO.cpp Convert SampleProfile pass into a Module pass. 2015-08-25 15:25:11 +00:00
InlineAlways.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
InlineSimple.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
Inliner.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
Internalize.cpp Internalize: internalize comdat members as a group, and drop comdat on such members. 2015-07-16 17:42:21 +00:00
LLVMBuild.txt Update libdeps in LLVMipo and LLVMScalarOpts, corresponding to r245940. 2015-08-25 17:11:17 +00:00
LoopExtractor.cpp Drive-by fixes for LandingPad -> EHPad 2015-08-04 08:21:40 +00:00
LowerBitSets.cpp [opaque pointer types] Switch a few cases of getElementType over, since I had them lying around anyway 2015-09-14 20:29:26 +00:00
Makefile
MergeFunctions.cpp [opaque pointer types] Switch a few cases of getElementType over, since I had them lying around anyway 2015-09-14 20:29:26 +00:00
PartialInlining.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
PassManagerBuilder.cpp [GlobalsAA] Disable globals-aa by default 2015-09-15 10:44:06 +00:00
PruneEH.cpp [PruneEH] A naked, noinline function can return via InlineAsm 2015-06-27 07:52:53 +00:00
SampleProfile.cpp Fix memory leak in sample profile pass. 2015-08-26 20:00:27 +00:00
StripDeadPrototypes.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
StripSymbols.cpp Use foreach loop over constant operands. NFC. 2015-06-25 20:51:38 +00:00