llvm-6502/lib
Andrea Di Biagio 60e9a53c21 [CostModel][x86] Improved cost model for alternate shuffles.
This patch:
 1) Improves the cost model for x86 alternate shuffles (originally
added at revision 211339);
 2) Teaches the Cost Model Analysis pass how to analyze alternate shuffles.

Alternate shuffles are a special kind of blend; on x86, we can often
easily lowered alternate shuffled into single blend
instruction (depending on the subtarget features).

The existing cost model didn't take into account subtarget features.
Also, it had a couple of "dead" entries for vector types that are never
legal (example: on x86 types v2i32 and v2f32 are not legal; those are
always either promoted or widened to 128-bit vector types).

The new x86 cost model takes into account what target features we have
before returning the shuffle cost (i.e. the number of instructions
after the blend is lowered/expanded).

This patch also teaches the Cost Model Analysis how to identify and analyze
alternate shuffles (i.e. 'SK_Alternate' shufflevector instructions):
 - added function 'isAlternateVectorMask';
 - added some logic to check if an instruction is a alternate shuffle and, in
   case, call the target specific TTI to get the corresponding shuffle cost;
 - added a test to verify the cost model analysis on alternate shuffles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212296 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-03 22:24:18 +00:00
..
Analysis [CostModel][x86] Improved cost model for alternate shuffles. 2014-07-03 22:24:18 +00:00
AsmParser IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
Bitcode IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
CodeGen bug fix for PR20020: anti-dependency-breaker causes miscompilation 2014-07-03 15:19:40 +00:00
DebugInfo Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
ExecutionEngine ExecutionEngine::create(): fix interpreter fallback when JIT is unavailable 2014-07-01 03:18:49 +00:00
IR IR: cleanup Module::dropReferences 2014-07-03 16:12:55 +00:00
IRReader IRReader: don't mark MemoryBuffers const 2014-06-27 09:19:14 +00:00
LineEditor
Linker Include <tuple> to make buildbots happy 2014-06-27 18:38:12 +00:00
LTO LTO depends on Object now. 2014-07-03 20:19:03 +00:00
MC Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
Object Add support for inline asm symbols to IRObjectFile. 2014-07-03 18:59:23 +00:00
Option Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
ProfileData Renaming SwapByteOrder() to getSwappedBytes() 2014-06-14 11:36:01 +00:00
Support Remove obsolete function TargetRegistry::getClosestTargetForJIT() 2014-07-01 10:47:13 +00:00
TableGen Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
Target [CostModel][x86] Improved cost model for alternate shuffles. 2014-07-03 22:24:18 +00:00
Transforms Run interprocedural const prop before global optimizer 2014-07-03 19:28:15 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile