mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
To ensure that we have more accurate line information for a block
don't elide the branch instruction if it's the only one in the block, otherwise it's ok. PR9796 and rdar://11215207 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154417 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -821,8 +821,11 @@ FastISel::SelectInstruction(const Instruction *I) {
|
||||
/// the CFG.
|
||||
void
|
||||
FastISel::FastEmitBranch(MachineBasicBlock *MSucc, DebugLoc DL) {
|
||||
if (FuncInfo.MBB->isLayoutSuccessor(MSucc)) {
|
||||
// The unconditional fall-through case, which needs no instructions.
|
||||
|
||||
if (FuncInfo.MBB->getBasicBlock()->size() > 1 && FuncInfo.MBB->isLayoutSuccessor(MSucc)) {
|
||||
// For more accurate line information if this is the only instruction
|
||||
// in the block then emit it, otherwise we have the unconditional
|
||||
// fall-through case, which needs no instructions.
|
||||
} else {
|
||||
// The unconditional branch case.
|
||||
TII.InsertBranch(*FuncInfo.MBB, MSucc, NULL,
|
||||
|
Reference in New Issue
Block a user