You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By the time branch folding is reached the switch statement has been broken into a binary tree of
compares. The target block of the unconditional branch (LBB1_6) thus has two successors, one of which is
a fallthrough; the branch folder doesn't move the block up in that case:
// If the prior block doesn't fall through into this block, and if this
// block doesn't fall through into some other block, see if we can find a
// place to move this block where a fall-through will happen.
So that's why. The comment doesn't explain why, but obviously hoisting such a block gains no branches
in itself. If repeated enough times, however, you eventually get to a fallthrough that returns, and hoisting
that will gain a branch (in this case).
…llvm#1572)
On an iOS device, if debugserver is left to figure out how to launch
the binary provided, it looks at the filename to see if it contains
".app" and asks FrontBoard to launch it. However, if this is actually
a command line app with the characters ".app" in the name, it would
end up trying to launch that via the FrontBoard calls even though it
needed to be launched via posix_spawn. For instance, a command line
program called com.application.tester.
Jim suggested this patch where we only send binaries that end in ".app"
to FrontBoard.
Often debugsever is invoked with a --launch command line argument to
specify the launch method, and none of this code is hit in that
instance.
<rdar://problem/65297100>
(cherry picked from commit abf546d)
Extended Description
The attached LLVM code has an uncond branch that isn't removed by branch folding:
_main_bb_2E_i9_2E_i_2E_i932_2E_ce:
subl $28, %esp
movl %esi, 24(%esp)
movl %edi, 20(%esp)
movl 36(%esp), %esi
movl 32(%esp), %eax
jmp LBB1_6 #bb.i9.i.i932.ce
...
LBB1_6: #bb.i9.i.i932.ce
movl (%eax), %edi
movl L_outfile$non_lazy_ptr, %eax
movl (%eax), %eax
The entry block has a single successor, and LBB1_6 has a single predecessor, so branch folding should
merge them.
-Chris
The text was updated successfully, but these errors were encountered: