llvm-project/llvm/lib/Target/Mips
Diana Picus c3dbe23977 [GlobalISel] Accept multiple vregs in lowerFormalArgs
Change the interface of CallLowering::lowerFormalArguments to accept
several virtual registers for each formal argument, instead of just one.
This is a follow-up to D46018.

CallLowering::lowerReturn was similarly refactored in D49660. lowerCall
will be refactored in the same way in follow-up patches.

With this change, we forward the virtual registers generated for
aggregates to CallLowering. Therefore, the target can decide itself
whether it wants to handle them as separate pieces or use one big
register. We also copy the pack/unpackRegs helpers to CallLowering to
facilitate this.

ARM and AArch64 have been updated to use the passed in virtual registers
directly, which means we no longer need to generate so many
merge/extract instructions.

AArch64 seems to have had a bug when lowering e.g. [1 x i8*], which was
put into a s64 instead of a p0. Added a test-case which illustrates the
problem more clearly (it crashes without this patch) and fixed the
existing test-case to expect p0.

AMDGPU has been updated to unpack into the virtual registers for
kernels. I think the other code paths fall back for aggregates, so this
should be NFC.

Mips doesn't support aggregates yet, so it's also NFC.

x86 seems to have code for dealing with aggregates, but I couldn't find
the tests for it, so I just added a fallback to DAGISel if we get more
than one virtual register for an argument.

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

llvm-svn: 364510
2019-06-27 08:54:17 +00:00
..
AsmParser [Mips] Add s.d instruction alias for Mips1 2019-06-12 17:52:05 +00:00
Disassembler Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
MCTargetDesc Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
TargetInfo Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
CMakeLists.txt [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
LLVMBuild.txt [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
MSA.txt
MicroMips32r6InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMips32r6InstrInfo.td [mips] Fix encoding of the `mov.d` command for microMIPS R6 2019-03-13 14:23:12 +00:00
MicroMipsDSPInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsDSPInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsInstrFPU.td [mips] Add more strict predicates to the RSQRT_S_MM and TAILCALL_MM 2019-06-18 17:00:08 +00:00
MicroMipsInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsInstrInfo.td [mips] Add more strict predicates to the RSQRT_S_MM and TAILCALL_MM 2019-06-18 17:00:08 +00:00
MicroMipsSizeReduction.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips.td [mips] Support for +abs2008 attribute 2019-01-28 14:59:30 +00:00
Mips16FrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16FrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16HardFloat.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
Mips16HardFloatInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16HardFloatInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelDAGToDAG.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelLowering.cpp Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC 2019-06-21 05:40:31 +00:00
Mips16ISelLowering.h [TargetLowering] Add MachineMemOperand::Flags to allowsMemoryAccess tests (PR42123) 2019-06-12 17:14:03 +00:00
Mips16InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16RegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16RegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips32r6InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips32r6InstrInfo.td [mips] Mark the `lwupc` instruction as MIPS64 R6 only 2019-06-19 22:08:06 +00:00
Mips64InstrInfo.td [mips] Add (GPR|PTR)_64 predicates to PseudoReturn64 and PseudoIndirectHazardBranch64 2019-06-19 22:07:46 +00:00
Mips64r6InstrInfo.td [mips] Mark the `lwupc` instruction as MIPS64 R6 only 2019-06-19 22:08:06 +00:00
MipsAnalyzeImmediate.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsAnalyzeImmediate.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsAsmPrinter.cpp Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
MipsAsmPrinter.h [AsmPrinter] refactor to remove remove AsmVariant. NFC 2019-04-10 16:38:43 +00:00
MipsBranchExpansion.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCCState.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCCState.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCallLowering.cpp [GlobalISel] Accept multiple vregs in lowerFormalArgs 2019-06-27 08:54:17 +00:00
MipsCallLowering.h [GlobalISel] Accept multiple vregs in lowerFormalArgs 2019-06-27 08:54:17 +00:00
MipsCallingConv.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCondMov.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsConstantIslandPass.cpp Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC 2019-06-21 05:40:31 +00:00
MipsDSPInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsDSPInstrInfo.td [MIPS][microMIPS] Fix PseudoMTLOHI_MM matching and expansion 2019-03-13 11:04:38 +00:00
MipsDelaySlotFiller.cpp [mips] Use range-based `for` loops. NFC 2019-05-15 21:26:25 +00:00
MipsEVAInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsEVAInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsExpandPseudo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsFastISel.cpp [Mips] Fix missing masking in fast-isel of br (PR40325) 2019-02-25 18:54:17 +00:00
MipsFrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelDAGToDAG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelDAGToDAG.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelLowering.cpp [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
MipsISelLowering.h [TargetLowering] Change getOptimalMemOpType to take a function attribute list 2019-04-30 08:38:12 +00:00
MipsInstrFPU.td [Mips] Add s.d instruction alias for Mips1 2019-06-12 17:52:05 +00:00
MipsInstrFormats.td [mips] Set the hasNoSchedulingInfo flag for the `MipsAsmPseudoInst` 2019-06-18 16:59:47 +00:00
MipsInstrInfo.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
MipsInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsInstrInfo.td [mips] Map SW instruction to its microMIPS R6 variant 2019-03-13 13:09:30 +00:00
MipsInstructionSelector.cpp GlobalISel: Remove unsigned variant of SrcOp 2019-06-24 16:16:12 +00:00
MipsLegalizerInfo.cpp [MIPS GlobalISel] Select integer to floating point conversions 2019-06-20 09:05:02 +00:00
MipsLegalizerInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMCInstLower.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMCInstLower.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMSAInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMSAInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMTInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMTInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMachineFunction.cpp GlobalISel: Remove unsigned variant of SrcOp 2019-06-24 16:16:12 +00:00
MipsMachineFunction.h GlobalISel: Remove unsigned variant of SrcOp 2019-06-24 16:16:12 +00:00
MipsModuleISelDAGToDAG.cpp CodeGen: Remove pipeline dependencies on StackProtector; NFC 2018-07-13 00:08:38 +00:00
MipsOptimizePICCall.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsOptionRecord.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsOs16.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsPreLegalizerCombiner.cpp [MIPS GlobalISel] Combine extending loads 2019-01-24 10:09:52 +00:00
MipsRegisterBankInfo.cpp [MIPS GlobalISel] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D63541 2019-06-21 01:51:50 +00:00
MipsRegisterBankInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsRegisterBanks.td [MIPS GlobalISel] Add floating point register bank 2019-03-25 11:30:46 +00:00
MipsRegisterInfo.cpp CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
MipsRegisterInfo.h CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
MipsRegisterInfo.td [mips] Extend range of register indexes accepted by cfcmsa/ctcmsa 2019-06-01 13:55:18 +00:00
MipsSEFrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSEFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSEISelDAGToDAG.cpp [mips] Extend range of register indexes accepted by cfcmsa/ctcmsa 2019-06-01 13:55:18 +00:00
MipsSEISelDAGToDAG.h [mips] Move initGlobalBaseReg to MipsFunctionInfo. NFC 2019-05-31 08:15:28 +00:00
MipsSEISelLowering.cpp CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
MipsSEISelLowering.h [TargetLowering] Add MachineMemOperand::Flags to allowsMemoryAccess tests (PR42123) 2019-06-12 17:14:03 +00:00
MipsSEInstrInfo.cpp [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
MipsSEInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSERegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSERegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSchedule.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsScheduleGeneric.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsScheduleP5600.td [mips] Add PTR_64 and GPR_64 predicates to some MIPS 64-bit instructions 2019-06-18 16:59:57 +00:00
MipsSubtarget.cpp [mips] Support for +abs2008 attribute 2019-01-28 14:59:30 +00:00
MipsSubtarget.h [mips] Support for +abs2008 attribute 2019-01-28 14:59:30 +00:00
MipsTargetMachine.cpp Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
MipsTargetMachine.h [Mips][CodeGen] Remove MachineFunction::setSubtarget. Change Mips to just copy the subtarget from the MachineFunction instead of recalculating it. 2019-04-24 06:48:31 +00:00
MipsTargetObjectFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsTargetObjectFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsTargetStreamer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Relocation.txt [mips] Removal of microMIPS64R6 2017-12-11 11:21:40 +00:00