llvm-project/llvm/lib/Target/AVR
Dylan McKay 5c23410fdf [AVR] Insert unconditional branch when inserting MBBs between blocks with fallthrough
This updates the AVR Select8/Select16 expansion code so that, when
inserting the two basic blocks for true and false conditions, any
existing fallthrough on the previous block is preserved.

Prior to this patch, if the block before the Select pseudo fell through
to the subsequent block, two new basic blocks would be inserted at the
prior fallthrough point, changing the fallthrough destination.

The predecessor or successor lists were not updated, causing the
BranchFolding pass at -O1 and above the rearrange basic blocks, causing
an infinite loop. Not to mention the unconditional fallthrough to the
true block is incorrect in of itself.

This patch modifies the Select8/16 expansion so that, if inserting true
and false basic blocks at a fallthrough point, the implicit branch is
preserved by means of an explicit, unconditional branch to the previous
fallthrough destination.

Thanks to Carl Peto for reporting this bug.

This fixes avr-rust bug https://github.com/avr-rust/rust/issues/123.

llvm-svn: 351721
2019-01-21 04:32:02 +00:00
..
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Disassembler Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstPrinter Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MCTargetDesc [AVR] Enable emission of debug information 2019-01-21 04:27:08 +00:00
TargetInfo Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVR.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVR.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRAsmPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRCallingConv.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRDevices.td [AVR] Rename 'AVRTiny' to 'Tiny' 2017-07-11 04:45:15 +00:00
AVRExpandPseudoInsts.cpp [AVR] Fix codegen bug in 16-bit loads 2019-01-20 03:41:08 +00:00
AVRFrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRISelLowering.cpp [AVR] Insert unconditional branch when inserting MBBs between blocks with fallthrough 2019-01-21 04:32:02 +00:00
AVRISelLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRInstrInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRInstrInfo.td [AVR] Replace two references to ARM's 't2_so_imm' type comments 2019-01-20 03:45:29 +00:00
AVRMCInstLower.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRMCInstLower.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRMachineFunctionInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRRegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRRegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRRegisterInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRRelaxMemOperations.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRSelectionDAGInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRSubtarget.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRSubtarget.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRTargetMachine.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRTargetMachine.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRTargetObjectFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AVRTargetObjectFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Remove duplicate tablegen lines from AVR target. 2018-04-04 12:27:43 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.md
TODO.md

README.md

AVR backend

This experimental backend is for the 8-bit Atmel AVR microcontroller.