1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/lib/Target/Mips
Simon Dardis 398cd5e620 Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns"
By target hookifying getRegisterType, getNumRegisters, getVectorBreakdown,
backends can request that LLVM to scalarize vector types for calls
and returns.

The MIPS vector ABI requires that vector arguments and returns are passed in
integer registers. With SelectionDAG's new hooks, the MIPS backend can now
handle LLVM-IR with vector types in calls and returns. E.g.
'call @foo(<4 x i32> %4)'.

Previously these cases would be scalarized for the MIPS O32/N32/N64 ABI for
calls and returns if vector types were not legal. If vector types were legal,
a single 128bit vector argument would be assigned to a single 32 bit / 64 bit
integer register.

By teaching the MIPS backend to inspect the original types, it can now
implement the MIPS vector ABI which requires a particular method of
scalarizing vectors.

Previously, the MIPS backend relied on clang to scalarize types such as "call
@foo(<4 x float> %a) into "call @foo(i32 inreg %1, i32 inreg %2, i32 inreg %3,
i32 inreg %4)".

This patch enables the MIPS backend to take either form for vector types.

The previous version of this patch had a "conditional move or jump depends on
uninitialized value".

Reviewers: zoran.jovanovic, jaydeep, vkalintiris, slthakur

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

llvm-svn: 305083
2017-06-09 14:37:08 +00:00
..
AsmParser Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
Disassembler Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
InstPrinter
MCTargetDesc Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
TargetInfo Move the global variables representing each Target behind accessor function 2016-10-09 23:00:34 +00:00
CMakeLists.txt [mips][microMIPS] Adding code size reduction pass for MicroMIPS 2017-04-27 13:10:48 +00:00
LLVMBuild.txt
MicroMips32r6InstrFormats.td
MicroMips32r6InstrInfo.td [mips] seb, seh instruction aliases 2016-11-22 19:17:23 +00:00
MicroMips64r6InstrFormats.td
MicroMips64r6InstrInfo.td [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
MicroMipsDSPInstrFormats.td
MicroMipsDSPInstrInfo.td
MicroMipsInstrFormats.td [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
MicroMipsInstrFPU.td [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
MicroMipsInstrInfo.td [mips][ias] Further relax operands of certain assembly instructions 2017-02-23 12:40:58 +00:00
MicroMipsSizeReduction.cpp [mips][microMIPS] Extending size reduction pass with LBU16, LHU16, SB16 and SH16 2017-06-02 14:14:21 +00:00
Mips16FrameLowering.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Mips16FrameLowering.h
Mips16HardFloat.cpp [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
Mips16HardFloatInfo.cpp
Mips16HardFloatInfo.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp Use StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (NFC) 2016-10-01 06:46:33 +00:00
Mips16InstrInfo.h
Mips16InstrInfo.td [mips] Correct mips16 return instructions definitions 2017-02-14 21:53:23 +00:00
Mips16ISelDAGToDAG.cpp
Mips16ISelDAGToDAG.h
Mips16ISelLowering.cpp
Mips16ISelLowering.h
Mips16RegisterInfo.cpp
Mips16RegisterInfo.h
Mips32r6InstrFormats.td [mips] Add IAS support for dvp, evp 2016-10-13 12:12:56 +00:00
Mips32r6InstrInfo.td [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
Mips64InstrInfo.td [Mips] Add support to match more patterns for DEXT and CINS 2017-03-15 13:10:08 +00:00
Mips64r6InstrInfo.td [mips] Fix aui/daui/dahi/dati for MIPSR6 2016-10-14 09:31:42 +00:00
Mips.h [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
Mips.td [mips] Add madd4 subtarget feature 2017-06-06 15:33:01 +00:00
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MipsAsmPrinter.h [LLVM][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el 2017-02-15 10:48:11 +00:00
MipsCallingConv.td Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00
MipsCCState.cpp Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +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
MipsConstantIslandPass.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MipsDelaySlotFiller.cpp [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
MipsDSPInstrFormats.td
MipsDSPInstrInfo.td [mips][dsp] Modify repl.ph to accept signed immediate values 2017-06-07 14:48:46 +00:00
MipsEVAInstrFormats.td [mips] Add IAS support for dvp, evp 2016-10-13 12:12:56 +00:00
MipsEVAInstrInfo.td
MipsFastISel.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MipsFrameLowering.cpp Move size and alignment information of regclass to TargetRegisterInfo 2017-04-24 18:55:33 +00:00
MipsFrameLowering.h
MipsHazardSchedule.cpp [mips] Deal with empty blocks in the mips hazard scheduler 2017-04-04 11:28:53 +00:00
MipsInstrFormats.td [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
MipsInstrFPU.td [mips] Add madd4 subtarget feature 2017-06-06 15:33:01 +00:00
MipsInstrInfo.cpp [mips][msa] Prevent output operand from commuting for dpadd_[su].df ins 2017-03-31 14:31:55 +00:00
MipsInstrInfo.h [mips][msa] Prevent output operand from commuting for dpadd_[su].df ins 2017-03-31 14:31:55 +00:00
MipsInstrInfo.td [mips] Add madd4 subtarget feature 2017-06-06 15:33:01 +00:00
MipsISelDAGToDAG.cpp
MipsISelDAGToDAG.h Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
MipsISelLowering.cpp Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00
MipsISelLowering.h Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00
MipsLongBranch.cpp [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
MipsMachineFunction.cpp evert "[mips] Fix test mips64fpldst.ll with machine verifier enabled" 2017-06-07 11:21:37 +00:00
MipsMachineFunction.h [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-30 23:21:32 +00:00
MipsMCInstLower.cpp
MipsMCInstLower.h
MipsModuleISelDAGToDAG.cpp [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
MipsMSAInstrFormats.td
MipsMSAInstrInfo.td [mips][msa] Mask vectors holding shift amounts 2017-04-20 13:26:46 +00:00
MipsOptimizePICCall.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MipsOptionRecord.h [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-01 01:22:51 +00:00
MipsOs16.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MipsRegisterInfo.cpp Reland "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-06-09 14:37:08 +00:00
MipsRegisterInfo.h
MipsRegisterInfo.td [mips] Expansion of LI.S and LI.D 2017-05-30 09:33:43 +00:00
MipsSchedule.td Recommit: "[mips] Add rsqrt, recip for MIPS" 2016-10-05 16:11:01 +00:00
MipsScheduleGeneric.td Recommit: "[mips] Add rsqrt, recip for MIPS" 2016-10-05 16:11:01 +00:00
MipsScheduleP5600.td Recommit: "[mips] Add rsqrt, recip for MIPS" 2016-10-05 16:11:01 +00:00
MipsSEFrameLowering.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MipsSEFrameLowering.h [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-01 01:22:51 +00:00
MipsSEInstrInfo.cpp Move value type list from TargetRegisterClass to TargetRegisterInfo 2017-04-24 19:51:12 +00:00
MipsSEInstrInfo.h
MipsSEISelDAGToDAG.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MipsSEISelDAGToDAG.h [LLC][MIPS] Fix crash after enabling LLVM_ENABLE_EXPENSIVE_CHECKS 2017-01-04 09:34:37 +00:00
MipsSEISelLowering.cpp [mips][msa] Mask vectors holding shift amounts 2017-04-20 13:26:46 +00:00
MipsSEISelLowering.h [mips][msa] Implement f16 support 2016-11-18 16:17:44 +00:00
MipsSERegisterInfo.cpp
MipsSERegisterInfo.h
MipsSubtarget.cpp [mips] Add madd4 subtarget feature 2017-06-06 15:33:01 +00:00
MipsSubtarget.h Test commit: remove whitespace 2017-06-09 07:57:05 +00:00
MipsTargetMachine.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MipsTargetMachine.h TargetMachine: Indicate whether machine verifier passes. 2017-05-31 18:41:23 +00:00
MipsTargetObjectFile.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
MipsTargetObjectFile.h [mips] Fix debug information for __thread variable 2017-01-20 17:53:30 +00:00
MipsTargetStreamer.h
MSA.txt Revert: r286868 - Test commit 2016-11-14 19:10:56 +00:00
Relocation.txt [Mips] Document Mips Backend Relocation Principles 2017-04-21 14:49:27 +00:00