llvm/lib/Transforms/Utils
Mark Seaborn 615f9b7162 Fix inlining to not produce duplicate landingpad clauses
Before this change, inlining one "invoke" into an outer "invoke" call
site can lead to the outer landingpad's catch/filter clauses being
copied multiple times into the resulting landingpad.  This happens:

 * when the inlined function contains multiple "resume" instructions,
   because forwardResume() copies the clauses but is called multiple
   times;

 * when the inlined function contains a "resume" and a "call", because
   HandleCallsInBlockInlinedThroughInvoke() copies the clauses but is
   redundant with forwardResume().

Fix this by deduplicating the code.

This problem doesn't lead to any incorrect execution; it's only
untidy.

This change will make fixing PR17872 a little easier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196710 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-08 00:50:58 +00:00
..
ASanStackFrameLayout.cpp [asan] fix ndebug build with strict warnings (-Wunused-variable) 2013-12-06 09:26:09 +00:00
BasicBlockUtils.cpp
BreakCriticalEdges.cpp
BuildLibCalls.cpp
BypassSlowDivision.cpp
CloneFunction.cpp
CloneModule.cpp
CMakeLists.txt [asan] rewrite asan's stack frame layout 2013-12-06 09:00:17 +00:00
CmpInstAnalysis.cpp
CodeExtractor.cpp
DemoteRegToStack.cpp
FlattenCFG.cpp
GlobalStatus.cpp
InlineFunction.cpp Fix inlining to not produce duplicate landingpad clauses 2013-12-08 00:50:58 +00:00
InstructionNamer.cpp
IntegerDivision.cpp Add support for software expansion of 64-bit integer division instructions. 2013-11-19 06:54:19 +00:00
LCSSA.cpp Quick look-up for block in loop. 2013-10-26 03:08:02 +00:00
LLVMBuild.txt
Local.cpp Debug info: Let LowerDbgDeclare perfom the dbg.declare -> dbg.value 2013-11-18 23:04:38 +00:00
LoopSimplify.cpp
LoopUnroll.cpp Don't #include heavy Dominators.h file in LoopInfo.h. This change reduces 2013-12-07 21:20:17 +00:00
LoopUnrollRuntime.cpp
LowerExpectIntrinsic.cpp
LowerInvoke.cpp
LowerSwitch.cpp
Makefile
Mem2Reg.cpp
MetaRenamer.cpp
ModuleUtils.cpp
PromoteMemoryToRegister.cpp Correct word hyphenations 2013-12-05 05:44:44 +00:00
SimplifyCFG.cpp FoldBranchToCommonDest merges branches into a single branch with or/and of the condition. It has a heuristics for estimating when some of the dependencies are processed by out-of-order processors. This patch adds another rule to the heuristics that says that if the "BonusInstruction" that we speculatively execute is used by the condition of the second branch then it is okay to hoist it. This change exposes more opportunities for other passes to transform the code. It does not matter that much that we if-convert the code because the selectiondag builder splits or/and branches into multiple branches when profitable. 2013-11-12 22:37:16 +00:00
SimplifyIndVar.cpp
SimplifyInstructions.cpp
SimplifyLibCalls.cpp Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, x) ―> __exp10(x) 2013-12-05 22:42:50 +00:00
SpecialCaseList.cpp
SSAUpdater.cpp
UnifyFunctionExitNodes.cpp
Utils.cpp
ValueMapper.cpp