1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/include/llvm/IR
David Sherwood 42a72164a2 [IR][SVE] Add new llvm.experimental.stepvector intrinsic
This patch adds a new llvm.experimental.stepvector intrinsic,
which takes no arguments and returns a linear integer sequence of
values of the form <0, 1, ...>. It is primarily intended for
scalable vectors, although it will work for fixed width vectors
too. It is intended that later patches will make use of this
new intrinsic when vectorising induction variables, currently only
supported for fixed width. I've added a new CreateStepVector
method to the IRBuilder, which will generate a call to this
intrinsic for scalable vectors and fall back on creating a
ConstantVector for fixed width.

For scalable vectors this intrinsic is lowered to a new ISD node
called STEP_VECTOR, which takes a single constant integer argument
as the step. During lowering this argument is set to a value of 1.
The reason for this additional argument at the codegen level is
because in future patches we will introduce various generic DAG
combines such as

  mul step_vector(1), 2 -> step_vector(2)
  add step_vector(1), step_vector(1) -> step_vector(2)
  shl step_vector(1), 1 -> step_vector(2)
  etc.

that encourage a canonical format for all targets. This hopefully
means all other targets supporting scalable vectors can benefit
from this too.

I've added cost model tests for both fixed width and scalable
vectors:

  llvm/test/Analysis/CostModel/AArch64/neon-stepvector.ll
  llvm/test/Analysis/CostModel/AArch64/sve-stepvector.ll

as well as codegen lowering tests for fixed width and scalable
vectors:

  llvm/test/CodeGen/AArch64/neon-stepvector.ll
  llvm/test/CodeGen/AArch64/sve-stepvector.ll

See this thread for discussion of the intrinsic:
https://lists.llvm.org/pipermail/llvm-dev/2021-January/147943.html
2021-03-23 10:43:35 +00:00
..
AbstractCallSite.h
Argument.h Add a couple of missing attribute query methods [NFC] 2021-03-18 17:33:20 -07:00
AssemblyAnnotationWriter.h
Assumptions.h [Clang][Attr] Introduce the assume function attribute 2020-12-15 16:51:34 -06:00
Attributes.h [IR] Add vscale_range IR function attribute 2021-03-22 12:05:06 +00:00
Attributes.td [IR] Add vscale_range IR function attribute 2021-03-22 12:05:06 +00:00
AutoUpgrade.h
BasicBlock.h Ensure SplitEdge to return the new block between the two given blocks 2020-12-18 17:37:17 +00:00
CallingConv.h [M68k](4/8) MC layer and object file support 2021-03-08 12:30:57 -08:00
CFG.h Revert multiple patches based on "Introduce CfgTraits abstraction" 2020-10-27 20:33:30 +01:00
CMakeLists.txt [VE] Support vld intrinsics 2020-11-13 07:34:42 +09:00
Comdat.h
Constant.h [llvm][IR] Do not place constants with static relocations in a mergeable section 2021-02-18 15:39:00 -08:00
ConstantFolder.h
ConstantRange.h [ConstantRange] Introduce getMinSignedBits() method 2020-09-22 21:37:30 +03:00
Constants.h Add ConstantDataVector::getRaw() to create a constant data vector from raw data. 2021-03-16 11:57:53 -07:00
ConstrainedOps.def
DataLayout.h [llvm] Use llvm::is_contained (NFC) 2021-02-14 08:36:20 -08:00
DebugInfo.h Transforms: Clone distinct nodes in metadata mapper unless RF_ReuseAndMutateDistinctMDs 2021-02-24 12:57:52 -08:00
DebugInfoFlags.def
DebugInfoMetadata.h Revert "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-03-11 14:48:01 +00:00
DebugLoc.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
DerivedTypes.h [NFC][IR] Type: add getWithNewType() method 2021-03-23 00:50:58 +03:00
DerivedUser.h
DiagnosticHandler.h
DiagnosticInfo.h [Diagnose] Unify MCContext and LLVMContext diagnosing 2021-03-01 15:58:37 -08:00
DiagnosticPrinter.h
DIBuilder.h [DebugInfo] Support Fortran 'use <external module>' statement. 2020-12-18 13:10:57 -05:00
Dominators.h [gvn] Precisely propagate equalities to phi operands 2021-03-08 08:59:00 -08:00
FixedMetadataKinds.def Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2020-11-14 13:12:38 +03:00
FixedPointBuilder.h [Fixed Point] Add codegen for conversion between fixed-point and floating point. 2021-01-12 13:53:01 +01:00
FPEnv.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Function.h Add a couple of missing attribute query methods [NFC] 2021-03-18 17:33:20 -07:00
GetElementPtrTypeIterator.h
GlobalAlias.h
GlobalIFunc.h
GlobalIndirectSymbol.h
GlobalObject.h [IR] Merge metadata manipulation code into Value 2020-10-23 11:08:26 +07:00
GlobalValue.h
GlobalVariable.h Add a default address space for globals to DataLayout 2020-11-20 15:46:52 +00:00
GVMaterializer.h
InlineAsm.h
InstIterator.h
InstrTypes.h [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
Instruction.def
Instruction.h [IR] Move willReturn() to Instruction 2021-02-19 11:56:01 +01:00
Instructions.h Revert "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-03-11 14:48:01 +00:00
InstVisitor.h
IntrinsicInst.h Reapply "[DebugInfo] Handle multiple variable location operands in IR" 2021-03-17 16:45:25 +00:00
Intrinsics.h Support intrinsic overloading on unnamed types 2021-03-19 14:34:25 +01:00
Intrinsics.td [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
IntrinsicsAArch64.td [AArch64][SVE/NEON] Add support for FROUNDEVEN for both NEON and fixed length SVE 2021-03-17 11:41:22 +00:00
IntrinsicsAMDGPU.td [AMDGPU] Restrict image_msaa_load to MSAA dimension types 2021-03-12 09:47:24 +09:00
IntrinsicsARM.td [TableGen] Continue cleaning up .td files 2021-01-01 10:21:02 -05:00
IntrinsicsBPF.td BPF: make __builtin_btf_type_id() return 64bit int 2020-11-16 07:08:41 -08:00
IntrinsicsHexagon.td
IntrinsicsHexagonDep.td [Hexagon] Add LLVM instruction definitions for Hexagon V68 2021-02-03 13:59:34 -06:00
IntrinsicsMips.td
IntrinsicsNVVM.td [TableGen] Continue cleaning up .td files 2021-01-01 10:21:02 -05:00
IntrinsicsPowerPC.td [PowerPC] add has side effect for SAT bit clobber intrinsics/instructions 2020-12-20 19:48:26 -05:00
IntrinsicsRISCV.td [RISCV] Starting fixing issues that prevent us from testing vXi64 intrinsics on RV32. 2021-03-10 09:45:38 -08:00
IntrinsicsSystemZ.td
IntrinsicsVE.td [VE] Support intrinsic to isnert/extract_subreg of v512i1 2021-01-11 20:40:10 +09:00
IntrinsicsVEVL.gen.td [VE] Add logical mask intrinsic instructions 2020-12-15 01:34:31 +09:00
IntrinsicsWebAssembly.td [WebAssembly] Finalize SIMD names and opcodes 2021-03-18 11:21:25 -07:00
IntrinsicsX86.td [X86] Support amx-bf16 intrinsic. 2021-02-25 09:06:48 +08:00
IntrinsicsXCore.td
IRBuilder.h [IR][SVE] Add new llvm.experimental.stepvector intrinsic 2021-03-23 10:43:35 +00:00
IRBuilderFolder.h
IRPrintingPasses.h [NewPM] Support --print-before/after in NPM 2020-12-03 16:52:14 -08:00
LegacyPassManager.h [opt] Error if -debug-pass is specified alongside the new PM 2021-03-02 15:59:28 -08:00
LegacyPassManagers.h [IR] Use range-based for loops (NFC) 2021-02-28 10:59:23 -08:00
LegacyPassNameParser.h
LLVMContext.h [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
LLVMRemarkStreamer.h [Remarks][1/2] Expand remarks hotness threshold option support in more tools 2020-11-30 21:55:49 -08:00
Mangler.h
MatrixBuilder.h [Matrix] Add support for matrix-by-scalar division. 2021-03-11 22:21:23 +00:00
MDBuilder.h [CSSPGO] Pseudo probe encoding and emission. 2020-12-10 17:29:28 -08:00
Metadata.def [DebugInfo] Add DIArgList MD to store multple values in DbgVariableIntrinsics 2021-03-05 17:02:24 +00:00
Metadata.h [DebugInfo] Add DIArgList MD to store multple values in DbgVariableIntrinsics 2021-03-05 17:02:24 +00:00
Module.h Support intrinsic overloading on unnamed types 2021-03-19 14:34:25 +01:00
ModuleSlotTracker.h
ModuleSummaryIndex.h [LTO] Perform DSOLocal propagation in combined index 2021-02-12 22:58:26 -08:00
ModuleSummaryIndexYAML.h [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
NoFolder.h
OperandTraits.h
Operator.h Revert "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-03-11 14:48:01 +00:00
OptBisect.h Make NPM OptBisectInstrumentation use global singleton OptBisect 2020-12-20 13:47:56 -08:00
PassInstrumentation.h [NewPM] Don't error when there's an unrecognized pass name 2021-01-07 22:33:32 -08:00
PassManager.h [Analysis, IR, CodeGen] Use llvm::erase_if (NFC) 2020-12-20 09:19:35 -08:00
PassManagerImpl.h
PassManagerInternal.h
PassTimingInfo.h [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation 2020-12-08 10:13:19 -08:00
PatternMatch.h [SimplifyCFG] Update FoldTwoEntryPHINode to handle and/or of select and binop equally 2021-03-01 13:34:51 +09:00
PredIteratorCache.h [llvm] Construct SmallVector with iterator ranges (NFC) 2021-01-04 11:42:44 -08:00
PrintPasses.h [NewPM] Support --print-before/after in NPM 2020-12-03 16:52:14 -08:00
ProfileSummary.h
PseudoProbe.h [CSSPGO] Deduplicating dangling pseudo probes. 2021-03-03 22:44:42 -08:00
ReplaceConstant.h [HIP] Support __managed__ attribute 2021-01-22 11:43:58 -05:00
RuntimeLibcalls.def [RISCV] Support Zfh half-precision floating-point extension. 2020-12-03 09:16:33 +08:00
SafepointIRVerifier.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
Statepoint.h [Statepoint Lowering] Handle the case with several gc.result 2021-03-11 18:44:44 +07:00
StructuralHash.h
SymbolTableListTraits.h Replace T(x) with reinterpret_cast<T>(x) everywhere it means reinterpret_cast. NFC. 2020-12-22 19:54:29 -05:00
TrackingMDRef.h
Type.h [NFC][IR] Type: add getWithNewType() method 2021-03-23 00:50:58 +03:00
TypeFinder.h
Use.h
UseListOrder.h
User.h Avoid redundant inline with LLVM_ATTRIBUTE_ALWAYS_INLINE 2020-12-01 14:43:16 -08:00
Value.def Adding PoisonValue for representing poison value explicitly in IR 2020-11-25 17:33:51 -07:00
Value.h Update basic deref API to account for possiblity of free [NFC] 2021-03-19 11:17:19 -07:00
ValueHandle.h [NFC] Minor cleanup for ValueHandle code. 2021-01-20 16:27:55 -08:00
ValueMap.h
ValueSymbolTable.h
Verifier.h
VPIntrinsics.def [VP][NFC] ISD::VP_Sub -> ISD::VP_SUB 2020-12-21 11:43:07 +01:00