llvm-project/llvm/lib/Transforms/Utils
Chen Li c6e28782d8 [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.
Summary: Currently SimplifyResume can convert an invoke instruction to a call instruction if its landing pad is trivial. In practice we could have several invoke instructions with trivial landing pads and share a common rethrow block, and in the common rethrow block, all the landing pads join to a phi node. The patch extends SimplifyResume to check the phi of landing pad and their incoming blocks. If any of them is trivial, remove it from the phi node and convert the invoke instruction to a call instruction.  

Reviewers: hfinkel, reames

Subscribers: llvm-commits

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

llvm-svn: 251061
2015-10-22 20:48:38 +00:00
..
ASanStackFrameLayout.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
AddDiscriminators.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
BasicBlockUtils.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
BreakCriticalEdges.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
BuildLibCalls.cpp Simplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only 2015-05-18 22:13:54 +00:00
BypassSlowDivision.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
CMakeLists.txt TransformUtils: Introduce module splitter. 2015-08-21 02:48:20 +00:00
CloneFunction.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
CloneModule.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
CmpInstAnalysis.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
CodeExtractor.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
CtorUtils.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
DemoteRegToStack.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
FlattenCFG.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
GlobalStatus.cpp GlobalOpt does not treat externally_initialized globals correctly 2015-10-12 13:20:52 +00:00
InlineFunction.cpp [InlineFunction] Correctly inline TerminatePadInst 2015-10-13 22:08:17 +00:00
InstructionNamer.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
IntegerDivision.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LCSSA.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LLVMBuild.txt [PM/AA] Remove the last relics of the separate IPA library from LLVM, 2015-08-18 17:51:53 +00:00
Local.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LoopSimplify.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LoopUnroll.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LoopUnrollRuntime.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LoopUtils.cpp [LoopUtils,LV] Propagate fast-math flags on generated FCmp instructions 2015-09-21 19:41:19 +00:00
LoopVersioning.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LowerInvoke.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
LowerSwitch.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
Makefile
Mem2Reg.cpp [PM] Split the AssumptionTracker immutable pass into two separate APIs: 2015-01-04 12:03:27 +00:00
MetaRenamer.cpp Whoops, remove trailing whitespace. 2015-08-27 05:37:12 +00:00
ModuleUtils.cpp [asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead of abusing '__asan_init' 2015-07-23 10:54:06 +00:00
PromoteMemoryToRegister.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
SSAUpdater.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
SimplifyCFG.cpp [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad. 2015-10-22 20:48:38 +00:00
SimplifyIndVar.cpp [IndVars] Preserve LCSSA in `eliminateIdentitySCEV` 2015-10-07 17:38:31 +00:00
SimplifyInstructions.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
SimplifyLibCalls.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
SplitModule.cpp TransformUtils: Introduce module splitter. 2015-08-21 02:48:20 +00:00
SymbolRewriter.cpp Remove unnecessary includes 2015-08-08 00:41:53 +00:00
UnifyFunctionExitNodes.cpp TransformUtils: Remove implicit ilist iterator conversions, NFC 2015-10-13 02:39:05 +00:00
Utils.cpp Pass to emit DWARF path discriminators. 2014-03-03 20:06:11 +00:00
ValueMapper.cpp [opaque pointer type]: Pass explicit pointee type when building a constant GEP. 2015-08-21 20:16:51 +00:00