llvm-project/llvm/lib/Target/AVR
Chandler Carruth c73c0307fe [MI] Change the array of `MachineMemOperand` pointers to be
a generically extensible collection of extra info attached to
a `MachineInstr`.

The primary change here is cleaning up the APIs used for setting and
manipulating the `MachineMemOperand` pointer arrays so chat we can
change how they are allocated.

Then we introduce an extra info object that using the trailing object
pattern to attach some number of MMOs but also other extra info. The
design of this is specifically so that this extra info has a fixed
necessary cost (the header tracking what extra info is included) and
everything else can be tail allocated. This pattern works especially
well with a `BumpPtrAllocator` which we use here.

I've also added the basic scaffolding for putting interesting pointers
into this, namely pre- and post-instruction symbols. These aren't used
anywhere yet, they're just there to ensure I've actually gotten the data
structure types correct. I'll flesh out support for these in
a subsequent patch (MIR dumping, parsing, the works).

Finally, I've included an optimization where we store any single pointer
inline in the `MachineInstr` to avoid the allocation overhead. This is
expected to be the overwhelmingly most common case and so should avoid
any memory usage growth due to slightly less clever / dense allocation
when dealing with >1 MMO. This did require several ergonomic
improvements to the `PointerSumType` to reasonably support the various
usage models.

This also has a side effect of freeing up 8 bits within the
`MachineInstr` which could be repurposed for something else.

The suggested direction here came largely from Hal Finkel. I hope it was
worth it. ;] It does hopefully clear a path for subsequent extensions
w/o nearly as much leg work. Lots of thanks to Reid and Justin for
careful reviews and ideas about how to do all of this.

Differential Revision: https://reviews.llvm.org/D50701

llvm-svn: 339940
2018-08-16 21:30:05 +00:00
..
AsmParser Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Disassembler
InstPrinter
MCTargetDesc [AVR] Fix build after r334078 2018-06-07 15:29:09 +00:00
TargetInfo Add backend name to AVR Target to enable runtime info to be fed back into TableGen 2017-11-23 04:11:11 +00:00
AVR.h [AVR] Document some public functions 2018-07-15 07:24:27 +00:00
AVR.td
AVRAsmPrinter.cpp Fix a bunch more layering of CodeGen headers that are in Target 2017-11-17 01:07:10 +00:00
AVRCallingConv.td
AVRDevices.td
AVRExpandPseudoInsts.cpp [MI] Change the array of `MachineMemOperand` pointers to be 2018-08-16 21:30:05 +00:00
AVRFrameLowering.cpp MachineFunction: Return reference from getFunction(); NFC 2017-12-15 22:22:58 +00:00
AVRFrameLowering.h Move TargetFrameLowering.h to CodeGen where it's implemented 2017-11-03 22:32:11 +00:00
AVRISelDAGToDAG.cpp [SDAG] Update the AVR backend for the SelectionDAG API changes in 2018-08-15 01:22:50 +00:00
AVRISelLowering.cpp [AVR] Re-enable expansion of ADDE/ADDC/SUBE/SUBC in ISel 2018-07-29 11:38:36 +00:00
AVRISelLowering.h Fix a bunch more layering of CodeGen headers that are in Target 2017-11-17 01:07:10 +00:00
AVRInstrFormats.td
AVRInstrInfo.cpp [DebugInfo] Examine all uses of isDebugValue() for debug instructions. 2018-05-09 02:42:00 +00:00
AVRInstrInfo.h Target/TargetInstrInfo.h -> CodeGen/TargetInstrInfo.h to match layering 2017-11-08 01:01:31 +00:00
AVRInstrInfo.td [AVR] Remove the earlyclobber flag from LDDWRdYQ 2018-03-06 11:20:25 +00:00
AVRMCInstLower.cpp
AVRMCInstLower.h
AVRMachineFunctionInfo.h
AVRRegisterInfo.cpp MachineFunction: Return reference from getFunction(); NFC 2017-12-15 22:22:58 +00:00
AVRRegisterInfo.h [AVR] Set trackLivenessAfterRegAlloc 2018-06-11 14:46:48 +00:00
AVRRegisterInfo.td
AVRRelaxMemOperations.cpp Fix a bunch more layering of CodeGen headers that are in Target 2017-11-17 01:07:10 +00:00
AVRSelectionDAGInfo.h
AVRSubtarget.cpp
AVRSubtarget.h Fix a bunch more layering of CodeGen headers that are in Target 2017-11-17 01:07:10 +00:00
AVRTargetMachine.cpp [AVR] Set the program address space in the data layout 2018-02-19 10:40:59 +00:00
AVRTargetMachine.h Revert "TargetMachine: Merge TargetMachine and LLVMTargetMachine" 2017-10-12 22:57:28 +00:00
AVRTargetObjectFile.cpp
AVRTargetObjectFile.h
CMakeLists.txt Remove duplicate tablegen lines from AVR target. 2018-04-04 12:27:43 +00:00
LLVMBuild.txt
README.md
TODO.md

README.md

AVR backend

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