1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2024-12-14 11:32:34 +00:00
llvm-6502/lib/CodeGen/SelectionDAG
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
..
CMakeLists.txt
DAGCombiner.cpp [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
FastISel.cpp Move function dependent resetting of a subtarget variable out of the 2014-07-04 01:55:26 +00:00
FunctionLoweringInfo.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
InstrEmitter.cpp This reapplies r207235 with an additional bugfixes caught by the msan 2014-04-25 20:49:25 +00:00
InstrEmitter.h
LegalizeDAG.cpp [DAG] Pass the argument list to the CallLoweringInfo via move semantics. NFCI. 2014-07-01 22:01:54 +00:00
LegalizeFloatTypes.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
LegalizeIntegerTypes.cpp [DAG] Pass the argument list to the CallLoweringInfo via move semantics. NFCI. 2014-07-01 22:01:54 +00:00
LegalizeTypes.cpp [DAG] Pass the argument list to the CallLoweringInfo via move semantics. NFCI. 2014-07-01 22:01:54 +00:00
LegalizeTypes.h Legalizer: Add support for splitting insert_subvectors. 2014-06-21 12:56:42 +00:00
LegalizeTypesGeneric.cpp Fix ppcf128 component access on little-endian systems 2014-07-03 15:06:47 +00:00
LegalizeVectorOps.cpp [cleanup] Hoist an if-else chain on ISD opcodes (really designed for 2014-07-02 06:23:34 +00:00
LegalizeVectorTypes.cpp [x86] Fix the completely broken vector widening legalization of bswap. 2014-07-03 07:04:38 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp Fix 'platform-specific' hyphenations 2014-06-30 18:57:16 +00:00
ScheduleDAGFast.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
ScheduleDAGRRList.cpp The hazard recognizer only needs a subtarget, not a target machine 2014-06-13 22:38:52 +00:00
ScheduleDAGSDNodes.cpp Convert SelectionDAG::MorphNodeTo to use ArrayRef. 2014-04-27 19:21:16 +00:00
ScheduleDAGSDNodes.h
ScheduleDAGVLIW.cpp The hazard recognizer only needs a subtarget, not a target machine 2014-06-13 22:38:52 +00:00
SDNodeDbgValue.h This reapplies r207235 with an additional bugfixes caught by the msan 2014-04-25 20:49:25 +00:00
SelectionDAG.cpp [x86,SDAG] Sink the logic for folding shuffles of splats more 2014-07-08 08:45:38 +00:00
SelectionDAGBuilder.cpp Fix ppcf128 component access on little-endian systems 2014-07-03 15:06:47 +00:00
SelectionDAGBuilder.h Fix 'platform-specific' hyphenations 2014-06-30 18:57:16 +00:00
SelectionDAGDumper.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
SelectionDAGISel.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
SelectionDAGPrinter.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
TargetLowering.cpp [SDAG] Actually check for a non-constant splat and clarify comments 2014-07-08 07:44:15 +00:00
TargetSelectionDAGInfo.cpp Have TargetSelectionDAGInfo take a DataLayout initializer rather than 2014-06-06 19:04:48 +00:00