1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/Target/Lanai
Chandler Carruth 8079aabce6 [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 Fix a bunch of places where operator-> was used directly on the return from dyn_cast. 2018-05-05 01:57:00 +00:00
Disassembler
InstPrinter
MCTargetDesc Fix MSVC '*/' found outside of comment warning. NFCI. 2018-06-06 11:10:11 +00:00
TargetInfo
CMakeLists.txt Consistently sort add_subdirectory calls in lib/Target/*/CMakeLists.txt 2018-04-23 12:49:34 +00:00
Lanai.h
Lanai.td
LanaiAluCode.h
LanaiAsmPrinter.cpp
LanaiCallingConv.td
LanaiCondCode.h
LanaiDelaySlotFiller.cpp [DebugInfo] Examine all uses of isDebugValue() for debug instructions. 2018-05-09 02:42:00 +00:00
LanaiFrameLowering.cpp
LanaiFrameLowering.h
LanaiInstrFormats.td
LanaiInstrInfo.cpp [DebugInfo] Examine all uses of isDebugValue() for debug instructions. 2018-05-09 02:42:00 +00:00
LanaiInstrInfo.h
LanaiInstrInfo.td [lanai] Handle atomic load of i8 like regular load. 2018-07-03 22:57:51 +00:00
LanaiISelDAGToDAG.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LanaiISelLowering.cpp Remove SETCCE use from Lanai's backend 2018-06-03 12:56:24 +00:00
LanaiISelLowering.h Remove SETCCE use from Lanai's backend 2018-06-03 12:56:24 +00:00
LanaiMachineFunctionInfo.cpp
LanaiMachineFunctionInfo.h
LanaiMCInstLower.cpp
LanaiMCInstLower.h
LanaiMemAluCombiner.cpp [MI] Change the array of MachineMemOperand pointers to be 2018-08-16 21:30:05 +00:00
LanaiRegisterInfo.cpp
LanaiRegisterInfo.h
LanaiRegisterInfo.td
LanaiSchedule.td
LanaiSelectionDAGInfo.cpp
LanaiSelectionDAGInfo.h
LanaiSubtarget.cpp
LanaiSubtarget.h
LanaiTargetMachine.cpp
LanaiTargetMachine.h
LanaiTargetObjectFile.cpp
LanaiTargetObjectFile.h
LanaiTargetTransformInfo.h
LLVMBuild.txt