llvm-6502/lib
Andrea Di Biagio b8245a4599 [DAG] Teach how to combine a pair of shuffles into a single shuffle if the resulting mask is legal.
This patch teaches how to fold a shuffle according to rule:
  shuffle (shuffle (x, undef, M0), undef, M1) -> shuffle(x, undef, M2)

We do this only if the resulting mask M2 is legal; this is to avoid introducing
illegal shuffles that are potentially expanded into a sub-optimal sequence
of target specific dag nodes.

This patch has the advantage of being target independent, since it works on ISD
nodes. Therefore, all targets (not only x86) can take advantage of this rule.
The idea behind this patch is that most shuffle pairs can be safely combined
before we run the legalizer on vector operations. This allows us to
combine/simplify dag nodes earlier in the process and not only immediately
before instruction selection stage.

That said. This patch is not meant to replace any existing target specific
combine rules; backends might still introduce new shuffles during legalization
stage. Also, this rule is very simple and avoids to aggressively optimize
shuffles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212539 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-08 15:22:29 +00:00
..
Analysis fixed typos in comments 2014-07-06 23:24:53 +00:00
AsmParser Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
Bitcode Fix a bug in the conversion to ErrorOr. 2014-07-04 20:05:56 +00:00
CodeGen [DAG] Teach how to combine a pair of shuffles into a single shuffle if the resulting mask is legal. 2014-07-08 15:22:29 +00:00
DebugInfo
ExecutionEngine
IR Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
IRReader Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
LineEditor
Linker
LTO Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
MC Mips.abiflags is a new implicitly generated section that will be present on all new modules. The section contains a versioned data structure which represents essentially information to allow a program loader to determine the requirements of the application. This patch implements mips.abiflags section and provides test cases for it. 2014-07-08 08:59:22 +00:00
Object Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
Option
ProfileData Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
Support Fix some Twine locals. 2014-07-08 14:55:06 +00:00
TableGen Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
Target [mips] Fixed struct/class mismatch introduced in r212522. 2014-07-08 13:13:42 +00:00
Transforms Fix some Twine locals. 2014-07-08 14:55:06 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile