aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2017-02-21 22:56:05 +0000
committerArtem Belevich <tra@google.com>2017-02-21 22:56:05 +0000
commit29bbdc1c32498459bb87d26dde267f5c3ec06603 (patch)
treee0b55471270c001fa99fdf17c9d91fc3d8d62950 /llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp
parent7d6b71db4f7297940f0cf7787c0e2ad2ddb41252 (diff)
downloadllvm-29bbdc1c32498459bb87d26dde267f5c3ec06603.zip
llvm-29bbdc1c32498459bb87d26dde267f5c3ec06603.tar.gz
llvm-29bbdc1c32498459bb87d26dde267f5c3ec06603.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions