llvm-project/llvm/lib/Target/NVPTX
Artem Belevich 29bbdc1c32 [NVPTX] Unify vectorization of load/stores of aggregate arguments and return values.
Original code only used vector loads/stores for explicit vector arguments.
It could also do more loads/stores than necessary (e.g v5f32 would
touch 8 f32 values). Aggregate types were loaded one element at a time,
even the vectors contained within.

This change attempts to generalize (and simplify) parameter space
loads/stores so that vector loads/stores can be used more broadly.
Functionality of the patch has been verified by compiling thrust
test suite and manually checking the differences between PTX
generated by llvm with and without the patch.

General algorithm:
* ComputePTXValueVTs() flattens input/output argument into a flat list
  of scalars to load/store and returns their types and offsets.
* VectorizePTXValueVTs() uses that data to create vectorization plan
  which returns an array of flags marking boundaries of vectorized
  load/stores. Scalars are represented as 1-element vectors.
* Code that generates loads/stores implements a simple state machine
  that constructs a vector according to the plan.

Differential Revision: https://reviews.llvm.org/D30011

llvm-svn: 295784
2017-02-21 22:56:05 +00:00
..
InstPrinter [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
MCTargetDesc [NVPTX] Remove string constants from NVPTXBaseInfo.h. 2016-12-14 22:32:44 +00:00
TargetInfo Move the global variables representing each Target behind accessor function 2016-10-09 23:00:34 +00:00
CMakeLists.txt NVPTX: Move InferAddressSpaces to generic code 2017-01-31 01:10:58 +00:00
LLVMBuild.txt NVPTXCodeGen: Add IPO to libdeps, since r293189. 2017-01-27 02:11:10 +00:00
ManagedStringPool.h [NVPTX] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-09 22:16:51 +00:00
NVPTX.h NVPTX: Move InferAddressSpaces to generic code 2017-01-31 01:10:58 +00:00
NVPTX.td [NVPTX] Added intrinsics for atom.gen.{sys|cta}.* instructions. 2016-09-28 17:25:38 +00:00
NVPTXAllocaHoisting.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
NVPTXAllocaHoisting.h
NVPTXAsmPrinter.cpp [NVPTX] Support global variables of integer type larger than i64. 2017-01-18 00:29:53 +00:00
NVPTXAsmPrinter.h [NVPTX] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-09 22:16:51 +00:00
NVPTXAssignValidGlobalNames.cpp
NVPTXFrameLowering.cpp MachineFunction: Return reference for getFrameInfo(); NFC 2016-07-28 18:40:00 +00:00
NVPTXFrameLowering.h Change eliminateCallFramePseudoInstr() to return an iterator 2016-03-31 18:33:38 +00:00
NVPTXGenericToNVVM.cpp CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses 2016-08-24 01:52:46 +00:00
NVPTXISelDAGToDAG.cpp [NVPTX] Move getDivF32Level, usePrecSqrtF32, and useF32FTZ into out of DAGToDAG and into TargetLowering. 2017-01-21 01:00:14 +00:00
NVPTXISelDAGToDAG.h [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXISelLowering.cpp [NVPTX] Unify vectorization of load/stores of aggregate arguments and return values. 2017-02-21 22:56:05 +00:00
NVPTXISelLowering.h [NVPTX] Enable combineRepeatedFPDivisors for NVPTX. 2017-02-03 15:13:50 +00:00
NVPTXImageOptimizer.cpp Add optimization bisect opt-in calls for NVPTX passes 2016-04-26 23:44:31 +00:00
NVPTXInstrFormats.td
NVPTXInstrInfo.cpp [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXInstrInfo.h [NVPTX] Remove dead code. 2016-12-14 23:20:40 +00:00
NVPTXInstrInfo.td [NVPTX] Implement NVPTXTargetLowering::getSqrtEstimate. 2017-01-31 05:58:22 +00:00
NVPTXIntrinsics.td [NVPTX] Add intrinsics to support named barriers. 2017-01-28 16:38:15 +00:00
NVPTXLowerAggrCopies.cpp NVPTX: Extract mem intrinsic expansions into utilities 2017-02-08 17:49:52 +00:00
NVPTXLowerAggrCopies.h
NVPTXLowerAlloca.cpp [NVPTX] Remove NVPTXFavorNonGenericAddrSpaces pass. 2016-10-31 21:51:42 +00:00
NVPTXLowerArgs.cpp [NVPTX] Remove NVPTXFavorNonGenericAddrSpaces pass. 2016-10-31 21:51:42 +00:00
NVPTXMCExpr.cpp [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXMCExpr.h [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXMachineFunctionInfo.h
NVPTXPeephole.cpp [CodeGen] Rename MachineInstrBuilder::addOperand. NFC 2017-01-13 09:58:52 +00:00
NVPTXPrologEpilogPass.cpp MachineFunction: Return reference for getFrameInfo(); NFC 2016-07-28 18:40:00 +00:00
NVPTXRegisterInfo.cpp [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXRegisterInfo.h
NVPTXRegisterInfo.td [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXReplaceImageHandles.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
NVPTXSection.h Only print architecture dependent flags for that architecture. 2017-01-30 15:38:43 +00:00
NVPTXSubtarget.cpp [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXSubtarget.h [NVPTX] Added support for half-precision floating point. 2017-01-13 20:56:17 +00:00
NVPTXTargetMachine.cpp NVPTX: Move InferAddressSpaces to generic code 2017-01-31 01:10:58 +00:00
NVPTXTargetMachine.h Replace addEarlyAsPossiblePasses callback with adjustPassManager 2017-01-26 16:49:08 +00:00
NVPTXTargetObjectFile.h [NVPTX] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-09 22:16:51 +00:00
NVPTXTargetTransformInfo.cpp [X86] updating TTI costs for arithmetic instructions on X86\SLM arch. 2017-01-11 08:23:37 +00:00
NVPTXTargetTransformInfo.h NVPTX: Refactor NVPTXInferAddressSpaces to check TTI 2017-01-30 23:02:12 +00:00
NVPTXUtilities.cpp [NVPTX] Remove dead code. 2016-12-14 23:20:40 +00:00
NVPTXUtilities.h [NVPTX] Remove dead #defines from NVPTXUtilities.h. 2016-12-15 00:45:06 +00:00
NVPTXVector.td
NVVMIntrRange.cpp [NVVMIntrRange] Only set range metadata if none is already present 2016-12-22 00:51:59 +00:00
NVVMReflect.cpp [NVPTX] Let there be One True Way to set NVVMReflect params. 2017-01-15 16:54:35 +00:00
cl_common_defines.h