llvm-6502/utils/TableGen
Elena Demikhovsky 8be39c81b0 Masked Gather and Scatter Intrinsics.
Gather and Scatter are new introduced intrinsics, comming after recently implemented masked load and store.
This is the first patch for Gather and Scatter intrinsics. It includes only the syntax, parsing and verification.

Gather and Scatter intrinsics allow to perform multiple memory accesses (read/write) in one vector instruction.
The intrinsics are not target specific and will have the following syntax:
Gather:
declare <16 x i32> @llvm.masked.gather.v16i32(<16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x i32> <passthru>)
declare <8 x float> @llvm.masked.gather.v8f32(<8 x float*><vector of ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float><passthru>)

Scatter:
declare void @llvm.masked.scatter.v8i32(<8 x i32><vector value to be stored> , <8 x i32*><vector of ptrs> , i32 <alignment>, <8 x i1> <mask>)
declare void @llvm.masked.scatter.v16i32(<16 x i32> <vector value to be stored> , <16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1><mask> )

Vector of ptrs - a set of source/destination addresses, to load/store the value. 
Mask - switches on/off vector lanes to prevent memory access for switched-off lanes
vector of ptrs, value and mask should have the same vector width.

These are code examples where gather / scatter should be used and will allow function vectorization
;void foo1(int * restrict A, int * restrict B, int * restrict C) {
; for (int i=0; i<SIZE; i++) {
; A[i] = B[C[i]];
; }
;}

;void foo3(int * restrict A, int * restrict B) {
; for (int i=0; i<SIZE; i++) {
; A[B[i]] = i+5;
; }
;}

Tests will come in the following patches, with CodeGen and Vectorizer.

http://reviews.llvm.org/D7433



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228521 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-08 08:27:19 +00:00
..
AsmMatcherEmitter.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
AsmWriterEmitter.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
AsmWriterInst.cpp Remove dead code. 2014-11-25 20:11:29 +00:00
AsmWriterInst.h Remove dead code. 2014-11-25 20:11:29 +00:00
CallingConvEmitter.cpp Move DataLayout back to the TargetMachine from TargetSubtargetInfo 2015-01-26 19:03:15 +00:00
CMakeLists.txt Move SetTheory from utils/TableGen into lib/TableGen so Clang can use it. 2014-06-17 13:10:38 +00:00
CodeEmitterGen.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
CodeGenDAGPatterns.cpp Intrinsics: introduce llvm_any_ty aka ValueType Any 2015-01-22 20:14:38 +00:00
CodeGenDAGPatterns.h Revert "Improve memory ownership/management in TableGen by unique_ptrifying TreePattern's Tree member." 2014-11-17 22:55:41 +00:00
CodeGenInstruction.cpp Target: Allow target specific operand types 2015-01-12 19:33:09 +00:00
CodeGenInstruction.h Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now. 2014-11-26 04:11:14 +00:00
CodeGenIntrinsics.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
CodeGenMapTable.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
CodeGenRegisters.cpp STLExtras: Provide less/equal functors with templated function call operators, plus a deref'ing functor template utility 2015-02-02 18:35:10 +00:00
CodeGenRegisters.h STLExtras: Provide less/equal functors with templated function call operators, plus a deref'ing functor template utility 2015-02-02 18:35:10 +00:00
CodeGenSchedule.cpp Use range-based for loops. NFC. 2014-12-09 08:05:51 +00:00
CodeGenSchedule.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
CodeGenTarget.cpp Intrinsics: introduce llvm_any_ty aka ValueType Any 2015-01-22 20:14:38 +00:00
CodeGenTarget.h Use unique_ptr instead of DeleteContainerSeconds. 2014-12-10 06:18:57 +00:00
CTagsEmitter.cpp TableGen: unique_ptr-ify RecordKeeper 2014-08-24 19:10:57 +00:00
DAGISelEmitter.cpp Use unique_ptr to remove explicit delete. 2014-12-15 00:40:07 +00:00
DAGISelMatcher.cpp [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 07:20:03 +00:00
DAGISelMatcher.h Use unique_ptr to remove explicit delete. 2014-12-15 00:40:07 +00:00
DAGISelMatcherEmitter.cpp Use unique_ptr to handle ownership of TreePatterns in CodeGenDAGPatterns::PatternFragments 2014-11-13 21:40:02 +00:00
DAGISelMatcherGen.cpp Simplify ownership of RegClasses by using list<CodeGenRegisterClass> instead of vector<CodeGenRegisterClass*> 2014-12-03 19:58:45 +00:00
DAGISelMatcherOpt.cpp Use unique_ptr to remove explicit delete. 2014-12-15 00:40:07 +00:00
DFAPacketizerEmitter.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
DisassemblerEmitter.cpp AArch64/ARM64: implement diagnosis of unpredictable loads & stores 2014-05-06 14:15:14 +00:00
FastISelEmitter.cpp Change order of tablegen generated fast-isel instruction code to be 2014-11-14 21:05:45 +00:00
FixedLenDecoderEmitter.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
InstrInfoEmitter.cpp Target: Allow target specific operand types 2015-01-12 19:33:09 +00:00
IntrinsicEmitter.cpp Masked Gather and Scatter Intrinsics. 2015-02-08 08:27:19 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile Remove exception handling usage from tblgen. 2012-10-25 20:33:17 +00:00
module.modulemap [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
OptParserEmitter.cpp Option: Propagate flags from groups to options in each group 2014-07-12 00:18:58 +00:00
PseudoLoweringEmitter.cpp TableGen: unique_ptr-ify RecordKeeper 2014-08-24 19:10:57 +00:00
RegisterInfoEmitter.cpp STLExtras: Provide less/equal functors with templated function call operators, plus a deref'ing functor template utility 2015-02-02 18:35:10 +00:00
SequenceToOffsetTable.h Reduce size of some tables in tablegen register info output. 2014-11-22 18:30:18 +00:00
SubtargetEmitter.cpp Replace size method call of containers to empty method where appropriate 2015-01-15 11:41:30 +00:00
TableGen.cpp Use range-based for loops. NFC 2014-12-11 07:04:54 +00:00
TableGenBackends.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
tdtags Add TableGen ctags(1) emitter and helper script. 2013-03-21 23:40:38 +00:00
X86DisassemblerShared.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
X86DisassemblerTables.cpp [X86] Disassembler support for move to/from %rax with a 32-bit memory offset is REX.W and AdSize prefix are both present. 2015-01-03 00:00:20 +00:00
X86DisassemblerTables.h [X86] Make the instructions that use AdSize16/32/64 co-exist together without using mode predicates. 2015-01-02 07:02:25 +00:00
X86ModRMFilters.cpp Second attempt at Removing special form of AddRegFrm used by FP instructions. These instructions can be handled by MRMXr instead. 2014-01-01 14:22:37 +00:00
X86ModRMFilters.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
X86RecognizableInstr.cpp [X86] Teach disassembler to handle illegal immediates on AVX512 integer compare instructions. 2015-01-28 10:09:56 +00:00
X86RecognizableInstr.h [X86] Remove the single AdSize indicator and replace it with separate AdSize16/32/64 flags. 2014-12-24 06:05:22 +00:00