1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/Target/Mips
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 Remove trailing space 2018-07-30 19:41:25 +00:00
Disassembler [mips] Fix the definitions of lwp, swp 2018-05-25 16:15:48 +00:00
InstPrinter [mips] Remove dead code. NFC 2018-07-11 09:41:28 +00:00
MCTargetDesc Remove trailing space 2018-07-30 19:41:25 +00:00
TargetInfo Add backend name to Target to enable runtime info to be fed back into TableGen 2017-11-15 23:55:44 +00:00
CMakeLists.txt [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
LLVMBuild.txt [MIPS GlobalISel] Adding GlobalISel 2018-02-23 11:06:40 +00:00
MicroMips32r6InstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MicroMips32r6InstrInfo.td [mips] Eliminate the usage of hasStdEnc in MipsPat. 2018-07-16 13:52:41 +00:00
MicroMipsDSPInstrFormats.td [mips] Fix the predicates of some DSP instructions from AdditionalPredicates to ASEPredicate 2018-06-20 13:29:57 +00:00
MicroMipsDSPInstrInfo.td [mips] Fix the predicates of some DSP instructions from AdditionalPredicates to ASEPredicate 2018-06-20 13:29:57 +00:00
MicroMipsInstrFormats.td [mips] Add licensing information of the microMIPS tablegen files. (NFC) 2018-06-15 13:29:35 +00:00
MicroMipsInstrFPU.td [mips] Eliminate the usage of hasStdEnc in MipsPat. 2018-07-16 13:52:41 +00:00
MicroMipsInstrInfo.td [mips] Fix local dynamic TLS with Sym64 2018-07-24 13:47:52 +00:00
MicroMipsSizeReduction.cpp [mips][microMIPS] Extending size reduction pass with LWP and SWP 2018-06-13 12:51:37 +00:00
Mips16FrameLowering.cpp [mips] Support shrink-wrapping 2018-06-29 16:37:16 +00:00
Mips16FrameLowering.h Add "Restored" flag to CalleeSavedInfo 2017-08-10 16:17:32 +00:00
Mips16HardFloat.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Mips16HardFloatInfo.cpp
Mips16HardFloatInfo.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp Change TII isCopyInstr way of returning arguments(NFC) 2018-06-06 16:36:30 +00:00
Mips16InstrInfo.h Change TII isCopyInstr way of returning arguments(NFC) 2018-06-06 16:36:30 +00:00
Mips16InstrInfo.td [mips] Fix local dynamic TLS with Sym64 2018-07-24 13:47:52 +00:00
Mips16ISelDAGToDAG.cpp [Mips] Remove uneeded variants of ADDC/ADDE lowering 2018-06-05 22:13:56 +00:00
Mips16ISelDAGToDAG.h
Mips16ISelLowering.cpp Target/TargetInstrInfo.h -> CodeGen/TargetInstrInfo.h to match layering 2017-11-08 01:01:31 +00:00
Mips16ISelLowering.h
Mips16RegisterInfo.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Mips16RegisterInfo.h
Mips32r6InstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
Mips32r6InstrInfo.td [mips] Correct the predicates of the cache and pref instructions 2018-05-22 10:55:05 +00:00
Mips64InstrInfo.td [mips] Sign extend i32 return values on MIPS64 2018-07-26 10:59:35 +00:00
Mips64r6InstrInfo.td [mips] Sign extend i32 return values on MIPS64 2018-07-26 10:59:35 +00:00
Mips.h [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
Mips.td [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00
MipsAnalyzeImmediate.cpp [Mips] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-08-03 22:12:30 +00:00
MipsAnalyzeImmediate.h [Mips] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-08-03 22:12:30 +00:00
MipsAsmPrinter.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
MipsAsmPrinter.h [X86][Mips] Remove unused method declaration from the X86 and Mips AsmPrinters. 2017-12-08 23:30:03 +00:00
MipsBranchExpansion.cpp [mips] Handle branch expansion corner cases 2018-08-07 10:45:45 +00:00
MipsCallingConv.td Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00
MipsCallLowering.cpp [GlobalISel] Rewrite CallLowering::lowerReturn to accept multiple VRegs per Value 2018-08-02 08:33:31 +00:00
MipsCallLowering.h [GlobalISel] Fix typo with missed override specifier 2018-08-02 08:55:05 +00:00
MipsCCState.cpp MachineFunction: Return reference from getFunction(); NFC 2017-12-15 22:22:58 +00:00
MipsCCState.h Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00
MipsCondMov.td [mips] Mark select instructions correctly 2018-05-15 16:05:04 +00:00
MipsConstantIslandPass.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
MipsDelaySlotFiller.cpp [mips][microMIPS] Extending size reduction pass with LWP and SWP 2018-06-13 12:51:37 +00:00
MipsDSPInstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MipsDSPInstrInfo.td [mips] Fix the predicates of some DSP instructions from AdditionalPredicates to ASEPredicate 2018-06-20 13:29:57 +00:00
MipsEVAInstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MipsEVAInstrInfo.td [mips] Correct the definitions of the unaligned word memory operation instructions 2018-04-19 13:33:51 +00:00
MipsExpandPseudo.cpp [mips] Fix atomic operations at O0, v3 2018-07-05 09:27:05 +00:00
MipsFastISel.cpp DAG: Add calling convention argument to calling convention funcs 2018-07-28 13:25:19 +00:00
MipsFrameLowering.cpp [mips] Use register scavenging with MSA. 2017-11-02 12:47:22 +00:00
MipsFrameLowering.h [mips] Support shrink-wrapping 2018-06-29 16:37:16 +00:00
MipsInstrFormats.td [mips] Mark standard encoded instructions as not being in MIPS16e 2018-07-12 08:50:11 +00:00
MipsInstrFPU.td [mips] Fix predicate for the MipsTruncIntFP pattern 2018-07-18 14:11:22 +00:00
MipsInstrInfo.cpp [MI] Change the array of MachineMemOperand pointers to be 2018-08-16 21:30:05 +00:00
MipsInstrInfo.h [mips] Add support for isBranchOffsetInRange and use it for MipsLongBranch 2018-05-16 10:03:05 +00:00
MipsInstrInfo.td [mips] Fix local dynamic TLS with Sym64 2018-07-24 13:47:52 +00:00
MipsInstructionSelector.cpp [MIPS GlobalISel] Select global address 2018-08-01 09:03:23 +00:00
MipsISelDAGToDAG.cpp CodeGen: Remove pipeline dependencies on StackProtector; NFC 2018-07-13 00:08:38 +00:00
MipsISelDAGToDAG.h CodeGen: Remove pipeline dependencies on StackProtector; NFC 2018-07-13 00:08:38 +00:00
MipsISelLowering.cpp DAG: Add calling convention argument to calling convention funcs 2018-07-28 13:25:19 +00:00
MipsISelLowering.h DAG: Add calling convention argument to calling convention funcs 2018-07-28 13:25:19 +00:00
MipsLegalizerInfo.cpp [MIPS GlobalISel] Select global address 2018-08-01 09:03:23 +00:00
MipsLegalizerInfo.h [MIPS GlobalISel] Adding GlobalISel 2018-02-23 11:06:40 +00:00
MipsMachineFunction.cpp [mips] Factor out register class selection for global base register. NFC 2018-07-21 16:16:08 +00:00
MipsMachineFunction.h
MipsMCInstLower.cpp [mips] Extend LONG_BRANCH_LUi/ADDiu with extra parameter 2018-06-12 10:23:49 +00:00
MipsMCInstLower.h [mips] Extend LONG_BRANCH_LUi/ADDiu with extra parameter 2018-06-12 10:23:49 +00:00
MipsModuleISelDAGToDAG.cpp CodeGen: Remove pipeline dependencies on StackProtector; NFC 2018-07-13 00:08:38 +00:00
MipsMSAInstrFormats.td [mips] Correct predicates for MSA pseudo instructions 2018-06-14 13:03:53 +00:00
MipsMSAInstrInfo.td [mips] Eliminate the usage of hasStdEnc in MipsPat. 2018-07-16 13:52:41 +00:00
MipsMTInstrFormats.td [mips] Sink PredicateControl further down the class hierarchy. 2018-05-30 12:40:53 +00:00
MipsMTInstrInfo.td Reland "[mips][mt][6/7] Add support for mftr, mttr instructions." 2017-11-14 22:26:42 +00:00
MipsOptimizePICCall.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsOptionRecord.h
MipsOs16.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsRegisterBankInfo.cpp [MIPS GlobalISel] Select global address 2018-08-01 09:03:23 +00:00
MipsRegisterBankInfo.h [MIPS GlobalISel] Select add i32, i32 2018-04-11 15:12:32 +00:00
MipsRegisterBanks.td [MIPS GlobalISel] Select add i32, i32 2018-04-11 15:12:32 +00:00
MipsRegisterInfo.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MipsRegisterInfo.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsRegisterInfo.td Trivial commit to force LLVM to run TableGen for Mips target after 2017-12-20 12:45:40 +00:00
MipsSchedule.td [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00
MipsScheduleGeneric.td [MIPS] Fix DIV/DIVU scheduling classes. 2018-05-02 13:37:28 +00:00
MipsScheduleP5600.td [mips] Update the P5600 scheduler model not to use instruction itineraries. 2018-07-11 13:21:10 +00:00
MipsSEFrameLowering.cpp [mips] Support shrink-wrapping 2018-06-29 16:37:16 +00:00
MipsSEFrameLowering.h [Mips] Remove dead code 2018-03-29 09:21:20 +00:00
MipsSEInstrInfo.cpp [Mips] Silencing warnings in instruction info (NFC) 2018-06-07 13:06:06 +00:00
MipsSEInstrInfo.h Change TII isCopyInstr way of returning arguments(NFC) 2018-06-06 16:36:30 +00:00
MipsSEISelDAGToDAG.cpp [mips] Correct predicates for loads, bit manipulation instructions and some pseudos 2018-06-20 19:59:58 +00:00
MipsSEISelDAGToDAG.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsSEISelLowering.cpp [Mips] Remove uneeded variants of ADDC/ADDE lowering 2018-06-05 22:13:56 +00:00
MipsSEISelLowering.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsSERegisterInfo.cpp [mips] Add microMIPSR6 ll/sc instructions. 2018-05-20 17:21:00 +00:00
MipsSERegisterInfo.h
MipsSubtarget.cpp [mips] Warn when crc, ginv, virt flags are used with too old revision 2018-07-04 19:26:31 +00:00
MipsSubtarget.h Remove trailing space 2018-07-30 19:41:25 +00:00
MipsTargetMachine.cpp [mips] Remove dead code from MipsPassConfig 2018-08-16 08:43:17 +00:00
MipsTargetMachine.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
MipsTargetObjectFile.cpp [MIPS] Don't crash on unsized extern types with -mgpopt 2018-01-26 15:56:14 +00:00
MipsTargetObjectFile.h
MipsTargetStreamer.h [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00
MSA.txt
Relocation.txt [mips] Removal of microMIPS64R6 2017-12-11 11:21:40 +00:00