aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-03-24 22:28:45 +0000
committerPhilip Reames <listmail@philipreames.com>2015-03-24 22:28:45 +0000
commit2b969d7010c3a8478ea157cd326f7102a3832438 (patch)
tree00b4144b821488da7a9908c31cc9bebcb5a3053e /llvm/lib/CodeGen/MachineFunction.cpp
parent14ebbc6d99aa151dea17a8e0ebf2ccfdfcf1413d (diff)
downloadllvm-2b969d7010c3a8478ea157cd326f7102a3832438.zip
llvm-2b969d7010c3a8478ea157cd326f7102a3832438.tar.gz
llvm-2b969d7010c3a8478ea157cd326f7102a3832438.tar.bz2
Merge empty landing pads in SimplifyCFG
This patch tries to merge duplicate landing pads when they branch to a common shared target. Given IR that looks like this: lpad1: %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 cleanup br label %shared_resume lpad2: %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 cleanup br label %shared_resume shared_resume: call void @fn() ret void } We can rewrite the users of both landing pad blocks to use one of them. This will generally allow the shared_resume block to be merged with the common landing pad as well. Without this change, tail duplication would likely kick in - creating N (2 in this case) copies of the shared_resume basic block. Differential Revision: http://reviews.llvm.org/D8297 llvm-svn: 233125
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions