1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib
Simon Dardis 0a381d6586 [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.

Reviewers: zoran.jovanovic, jaydeep, vkalintiris, slthakur

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

llvm-svn: 299766
2017-04-07 13:03:52 +00:00
..
Analysis [InstSimplify] Use Instruction::BinaryOps instead of unsigned for a few function operands to remove some casts. NFC 2017-04-07 05:57:51 +00:00
AsmParser getPristineRegs is not accurately considering shrink wrapping puts 2017-03-30 22:34:20 +00:00
Bitcode Bitcode: Do not create FNENTRYs for aliases of functions. 2017-04-06 19:39:24 +00:00
CodeGen [SelectionDAG] Enable target specific vector scalarization of calls and returns 2017-04-07 13:03:52 +00:00
DebugInfo [PDB] Save one type record copy 2017-04-04 00:56:34 +00:00
Demangle Add support for demangling C++11 thread_local variables. 2017-01-31 15:56:36 +00:00
ExecutionEngine [Orc] Make orcError return an error_code rather than Error. 2017-04-06 01:35:13 +00:00
Fuzzer [Fuzzer] Flush std::cout before aborting in CxxStringEqTest 2017-04-03 23:00:25 +00:00
IR Revert "Turn some C-style vararg into variadic templates" 2017-04-06 20:23:57 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
LTO LTO: call getRealLinkageName on IRNames before feeding to getGUID 2017-03-31 21:56:30 +00:00
MC StringTableBuilder: Don't assert when writing an empty raw string table. 2017-04-06 00:10:17 +00:00
Object [WASM] Remove other comparison of unsigned expression >= 0. 2017-04-01 19:47:52 +00:00
ObjectYAML Add virtual destructor to WasmYAML::Section or avoid memory leak 2017-03-31 22:14:14 +00:00
Option Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
Passes [PGO] Memory intrinsic calls optimization based on profiled size 2017-04-04 16:42:20 +00:00
ProfileData [PGO] Memory intrinsic calls optimization based on profiled size 2017-04-04 16:42:20 +00:00
Support Implement host CPU detection for AArch64 2017-04-04 19:06:04 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target [SelectionDAG] Enable target specific vector scalarization of calls and returns 2017-04-07 13:03:52 +00:00
Transforms [InstCombine] Handle more commuted cases of ((A & B) | ~A) -> (~A | B) 2017-04-07 07:32:00 +00:00
XRay [XRay] - Fix spelling error to test commit access. 2017-04-06 03:32:01 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt